Skip to main content
GET
/
v2
/
docs
/
info
/
{owner}
/
{repo}
/
{version}
Get documentation content for a specific library version
curl --request GET \
  --url https://context7.com/api/v2/docs/info/{owner}/{repo}/{version} \
  --header 'Authorization: Bearer <token>'
{
"snippets": [
{
"pageId": "https://github.com/vercel/next.js/blob/canary/docs/04-community/01-contribution-guide.mdx",
"breadcrumb": "How to Contribute > Writing MDX",
"content": "The docs are written in [MDX](https://mdxjs.com/), a markdown format that supports JSX syntax. This allows us to embed React components in the docs. See the [GitHub Markdown Guide](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) for a quick overview of markdown syntax.",
"contentTokens": 84
}
],
"totalTokens": 84,
"pagination": {
"page": 1,
"limit": 10,
"totalPages": 10,
"hasNext": true,
"hasPrev": false
},
"metadata": {
"authentication": "none"
}
}

Authorizations

Authorization
string
header
required

Get your API key at context7.com/dashboard. Treat your API key like a password and store it securely.

Path Parameters

owner
string
required

Repository owner - GitHub username or organization name (case-insensitive)

Required string length: 1 - 500
repo
string
required

Repository name (case-insensitive)

Required string length: 1 - 500
version
string
required

Specific version (tag or branch) of the library

Required string length: 1 - 500

Query Parameters

topic
string

Filter snippets by topic or search term

Maximum string length: 500
type
enum<string>
default:txt

Response format type

Available options:
json,
txt
page
integer
default:1

Page number for pagination (1-indexed). Maximum 10 pages accessible for each topic.

Required range: x >= 1
limit
integer
default:10

Number of items per page

Required range: 1 <= x <= 10

Response

Successful response with info/documentation snippets

Response containing info/documentation snippets

snippets
object[]
required

Array of info snippets

totalTokens
integer
required

Total token count for all returned snippets

pagination
object
required

Pagination metadata

metadata
object
required

Response metadata