v1

latestOpenAPI 3.0.02026-07-13162290.3 KB
Context

Get documentation context

Retrieve intelligent, LLM-reranked documentation context for natural language queries. Returns the most relevant code snippets and documentation for your specific question.

get/v2/context

Query parameters

libraryIdstring required

Context7-compatible library ID — the URL path of the library on context7.com. Use /owner/repo for GitHub repositories, or /<source>/<id> for other sources (websites, llms.txt, GitLab/Bitbucket, etc.). Optionally suffix with /<version> or @<version> to pin a specific version. See Library ID format.

querystring required

User's original question or task - used for intelligent relevance ranking

type'json' | 'txt'

Response format type

fast'true' | 'false'

When true, skip LLM reranking and return top vector-search results directly. Trades relevance quality for lower latency.

Response

Documentation context