Skip to main content

Setup

Put them in your environment or .env; Data APIs covers the other ways.

Notes

  • Library ids are URL paths: /owner/repo for GitHub (/vercel/next.js), /<source>/<id> otherwise; pin a version with /owner/repo/<version> or /owner/repo@<version>.
  • Typical flow: libs.search to find the id, then docs.context with it; or docs.search in one call when the library is known by name.
  • Answers are plain text by default; send type=json for structured results.
  • Over the limit answers 429 with Retry-After and RateLimit-Limit/-Remaining/-Reset headers; usage.get shows the month’s requests.

Endpoints

Get documentation for a library

  • A version that is not indexed is not an error: the nearest matching or newer stable release is served instead.

Read a web page, optionally only the parts answering a question

  • With query, a page that does not answer it returns 404 no_relevant_content: try another page.

Get API usage

  • Needs an API key. Calls to it are not counted.