Context7 Context API

The Context API from Context7 — 1 operation(s) for context.

OpenAPI Specification

context7-context-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Context7 REST Add Context API
  version: '1.0'
  description: REST endpoints for searching libraries, retrieving documentation snippets for LLMs, refreshing indexed sources, managing teamspace policies, and submitting new sources (GitHub repos, OpenAPI specs, llms.txt files, websites, Confluence spaces) to Context7.
  x-generated-from: https://context7.com/docs/api-guide
  x-generated-by: claude-crawl-2026-05-08
servers:
- url: https://context7.com/api
  description: Context7 API
security:
- BearerAuth: []
tags:
- name: Context
paths:
  /v2/context:
    get:
      summary: Retrieve documentation snippets for a library
      operationId: getContext
      parameters:
      - name: libraryId
        in: query
        schema:
          type: string
      - name: query
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Documentation snippets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Resource'
      tags:
      - Context
components:
  schemas:
    Resource:
      type: object
      additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer