Skip to main content
GET
Read one web page, optionally narrowed to a question

Authorizations

Authorization
string
header
required

Get your API key at context7.com/dashboard. Treat your API key like a password and store it securely. Every key can read the management API (/v2/teamspaces/*), except personal data: member and invitation emails, library requesters, visitor questions, Docs7 reader searches, conversations, feedback and feature requests, and the GitHub account behind a build. To read those or make changes there, the key must be created with Write access ticked; other keys get 403 write_access_required.

Query Parameters

url
string<uri>
required

The page to read. A public http or https address without credentials; local and private addresses are refused. The fragment is ignored.

Maximum string length: 2048
query
string

Optional question. When present, only the parts of the page that answer it are returned.

Maximum string length: 2000
tokens
integer

Maximum tokens to return (about four characters each). With query it caps the selected sections (default 1000); without, it sets the slice size (default 5000).

Required range: 100 <= x <= 10000
offset
integer

Character offset to read from when query is absent. Use nextOffset from the previous response to continue.

Required range: x >= 0
type
enum<string>
default:txt

Response format type

Available options:
json,
txt

Response

The relevant sections of the page (with query) or a slice of its Markdown (without)

The response is of type string.