Prometheus

Prometheus · GPT 작업

Context7 API

Busca bibliotecas e documentação técnica por meio da API da Context7.

  • GET /api/v1/searchBusca bibliotecas por palavra-chave

    Retorna uma lista de bibliotecas baseadas no termo de busca.

  • GET /api/v1/{library}Obtém documentação de uma biblioteca específica

    Retorna documentação detalhada de uma biblioteca informada.

원본 API 스키마
{
  "openapi": "3.1.0",
  "info": {
    "title": "Context7 API",
    "description": "Busca bibliotecas e documentação técnica por meio da API da Context7.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://context7.com",
      "description": "Servidor principal da API Context7"
    }
  ],
  "paths": {
    "/api/v1/search": {
      "get": {
        "operationId": "searchLibraries",
        "summary": "Busca bibliotecas por palavra-chave",
        "description": "Retorna uma lista de bibliotecas baseadas no termo de busca.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Termo de busca (ex: react hook form)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Lista de bibliotecas encontradas",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "totalTokens": {
                            "type": "integer"
                          },
                          "totalSnippets": {
                            "type": "integer"
                          },
                          "stars": {
                            "type": "integer"
                          },
                          "trustScore": {
                            "type": "number"
                          },
                          "versions": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/{library}": {
      "get": {
        "operationId": "getLibraryDocs",
        "summary": "Obtém documentação de uma biblioteca específica",
        "description": "Retorna documentação detalhada de uma biblioteca informada.",
        "parameters": [
          {
            "name": "library",
            "in": "path",
            "required": true,
            "description": "Nome da biblioteca (ex: vercel/next.js)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Formato da resposta (txt ou json)",
            "schema": {
              "type": "string",
              "enum": [
                "txt",
                "json"
              ]
            }
          },
          {
            "name": "topic",
            "in": "query",
            "required": false,
            "description": "Tópico a ser filtrado",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tokens",
            "in": "query",
            "required": false,
            "description": "Limite de tokens da resposta",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Documentação da biblioteca retornada com sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string",
                      "format": "uri"
                    },
                    "language": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {},
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}