Skip to main content
GET
/
v1
/
{owner}
/
{repo}
/
{version}
Get Context (Specific Version)
curl --request GET \
  --url https://context7.com/api/v1/{owner}/{repo}/{version}
{
  "library": "/vercel/next.js",
  "version": "v15.1.8",
  "topic": "routing",
  "tokens": 2950,
  "chunks": [
    {
      "title": "Middleware overview",
      "content": "Next.js middleware runs before a request is completed...",
      "source": "docs/app/building-your-application/routing/middleware.mdx",
      "url": "https://nextjs.org/docs/app/building-your-application/routing/middleware"
    }
  ],
  "metadata": {
    "authentication": "paid"
  }
}

Path Parameters

owner
string
required

Repository owner (e.g., 'vercel', 'upstash')

repo
string
required

Repository name (e.g., 'next.js', 'docs')

version
string
required

Specific version tag (e.g., 'v15.1.8', 'v14.3.0-canary.87')

Query Parameters

type
enum<string>
default:txt

Format of the response: txt for plain text optimized for LLM contexts, or json for structured payload with metadata

Available options:
txt,
json
topic
string

Topic to search/rerank the results (e.g., 'routing', 'authentication', 'hooks')

tokens
integer
default:10000

Maximum token count to be included in the result

Required range: 100 <= x <= 100000

Response

Successful response with documentation content

Documentation content response with metadata and chunks

library
string

Library ID in format /owner/repo

Example:

"/vercel/next.js"

version
string

Version of the library

Example:

"v15.1.8"

topic
string

Requested topic (if specified)

Example:

"routing"

tokens
integer

Actual token count in the response

Example:

2950

chunks
object[]

Documentation chunks with content and metadata

metadata
object

API request metadata