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.
1 min read
get/v2/context
Request example
Response
get/v2/context
Query parameters
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.Length: 1–500Pattern: ^/[^/]+/[^/]+([/@][^/]+)?$
User's original question or task - used for intelligent relevance ranking
Length: 1–500
When
true, skip LLM reranking and return top vector-search results directly. Trades relevance quality for lower latency.Default: "false"
Options:
truefalseOptional programming language the caller writes in, such as
Python or TypeScript. A soft ranking preference: the SDK and code examples in that language rank first, and other documentation is still returned when nothing in that language matches. Only the first 40 characters are used.Responses
Documentation context