Skip to main content
get/v3/search
Request example
Response
get/v3/search

Query parameters

querystringrequired#
The question or task to search documentation for. Long questions and pasted error output are accepted.

Length: 1–2000

typeenum<string>#
Response format type

Default: "txt"

Options:jsontxt
librarystring[]#
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.

Items: max 4

versionstring#
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, 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). When only a prerelease tag matches a stable request, the reason is versionPrerelease. 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.

Pattern: ^([Ll][Aa][Tt][Ee][Ss][Tt]|[Vv]?[0-9]+([._][0-9]+){0,2}([-+][a-zA-Z0-9.-]+)?)$

languagestring#
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
codeSnippetsobject[]required#
Relevant code snippets
infoSnippetsobject[]required#
Relevant documentation snippets
rulesobject#
Optional library-specific rules and guidelines
versionobject#
Present when a version was requested by the version parameter or a version-like library tag. Says what each returned library served.