Make a request
Get an API key in the Quickstart. This request keeps themain element of a docs page, drops its code blocks, writes links as numbered references, and returns the first 600 characters.
Read the response
The Markdown holds the selected part only. Links are written as⟨1⟩ and listed once at the end. The text was cut at 600 characters, so nextOffset says where the next part starts, and warning says the text was cut. This real response is cut to the fields that matter.
"offset": 529 and the same maxChars. Repeat until the answer has no nextOffset.
Options
All selector lists need at least one selector. A selector is plain CSS.
Which outputs change
The filters shape the page text thatmarkdown and html are made from, and everything built from the Markdown: summary, highlights, question and json. rawHtml is the page as sent.
Limits and errors
- If
includeTagsmatches nothing on the page, the call fails with503 sourceUnavailableand the messageThe page did not finish loading. Try again shortly.Nothing is charged. Check the selector against the page’s HTML before you retry. maxCharsbelow 500 returns400 invalidRequest.- Send
queryoroffset, not both. onlyCleanContentis skipped with awarningwhen the page is too long to clean or the model does not answer.
Price
$1 per 1,000 pages. Every field on this page adds nothing, andquery adds nothing either. A PDF read with maxChars, offset or query is charged for the share of its pages that comes back. See PDFs and documents.
Related
- Markdown is the format these fields shape.
- Highlights returns the passages that match a query as a format of its own.
- Links lists the URLs
linkStylehides. - Scrape overview lists every format and option.