Search documentation in one request
Select up to four relevant Context7 libraries, retrieve their documentation in parallel, deduplicate and globally rerank the evidence, and return one bounded response. Optional library, version, and language values improve routing and ranking.
1 min read
get/v3/search
Request example
Response
get/v3/search
Query parameters
User's original question or task - used for intelligent relevance ranking
Length: 1–500
Optional library hints. Repeat for up to four values; each may be a fuzzy product name such as
next.js or an exact Context7 ID such as /vercel/next.js.Items: max 4
Optional version constraint. Requires at least one library value. It is strict when one library is provided and contextual when multiple libraries are provided.
Pattern: ^v?[0-9]+([._][0-9]+){0,2}([-+][a-zA-Z0-9.-]+)?$
Optional programming-language preference used for library selection, retrieval, and reranking. This is a soft preference and does not exclude language-neutral documentation.
Length: 1–40
Responses
Bounded documentation evidence from the selected libraries
Relevant code snippets
Show child attributesHide child attributes
Title of the code snippet
Description of what the code does
Primary programming language
Token count for the snippet
URL to source location
Title of the documentation page
Code examples in different languages
Whether this snippet was recovered from the dynamic source-code index instead of the primary docs index
Repo-relative source file path for dynamic snippets
Relevant documentation snippets
Optional library-specific rules and guidelines
Show child attributesHide child attributes
Global team rules
Rules defined by the library owner
Library-specific rules from the team
Was this page helpful?