Search documentation in one request
Changed onSelect 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.
Request
- Base URLhttps://context7.com/api
- URLhttps://context7.com/api/v3/search
- Auth
- none
- or HTTP bearer
Query parameters
The question or task to search documentation for. Long questions and pasted error output are accepted.
Response format type
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. An exact ID that is not indexed, or has no documentation to serve, is searched by its product name instead. A version-like tag (/vercel/next.js@15) is resolved like the version parameter for that library, including when the ID is searched by its product name.
Optional version preference. latest (any case) is the same as no version. Without a library value, the version applies when the question names one product; when it names several, the version is ignored. With one library, verified matching documentation is preferred; if unavailable, the newest stable release of the requested line when it is newer than the request (v2.3.1 for 2.0.0; below 1.0, the same minor) or else current documentation is returned, and the response says so (X-Context7-Search-Status: partial with reason versionUnverified, X-Context7-Search-Version, and the version field of JSON responses). A prerelease tag serves only a request for that prerelease. With multiple libraries, the version is a preference and each returned library reports what it served. A version-like tag on a library value (/vercel/next.js@15) is the same request scoped to that library. A version that is not indexed for a public GitHub library is queued for indexing in the background, so a later request for it can be answered.
Optional programming-language preference used for library selection, retrieval, and reranking. This is a soft preference and does not exclude language-neutral documentation.
Optional. broad appends more sections of the best-matching documentation pages, up to about 3,500 extra tokens, after the ranked results. How-to, migration, troubleshooting, and overview questions get these sections without it; use it when a question needs several facts but reads as a single-fact question.
Response
Bounded documentation evidence from the selected libraries
Example response
{
"codeSnippets": [
{
"rank": 1
}
],
"infoSnippets": [
{
"rank": 1
}
],
"version": {
"libraryId": "/vercel/next.js/v15.1.11",
"requested": "v15.0.0",
"served": "v15.1.11",
"status": "unverified"
}
}Changes
- info
added the optional property
////to the response with the status
- info
- breaking
the
/////response's property type changed fromobjectto no type for status - breaking
the
/////response's property type changed fromobjectto no type for status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - warning
removed the optional property
//////from the response with the status - warning
removed the optional property
//////from the response with the status - warning
removed the optional property
//////from the response with the status - warning
removed the optional property
//////from the response with the status - info
added
subschema #2to the/////response propertyallOflist for the response status - info
added
subschema #2to the/////response propertyallOflist for the response status
- breaking