markdownOptions.enabled to true to return each result’s page as Markdown, or highlightsOptions.enabled to return only the passages relevant to your query. A search result can remain useful even when its page content cannot be read.
Request page content
Send this body toPOST /web/search. See the Quickstart for authentication and SDK setup.
Request highlights
Highlights use the searchquery and read each page with the markdownOptions settings, so you can request them without Markdown.
highlights.highlights lists passages in page order. See Highlights for the passage format.
Read each outcome
Check the result’smarkdown.code and highlights.code before using their content:
Each result’s
markdown.finalDOMState is loaded, or still-loading when capture ended before the page finished loading. Highlights can succeed with an empty array when no passage is relevant.
Options
markdownOptions supports includeLinks (default true), includeImages (false), shortenBase64Images (true), useMainContentOnly (false), includeFrames (false), and maxAgeMs (180 days, or 365 days when only highlights are requested). maxAgeMs accepts at most 365 days (31,536,000,000 ms); 0 forces a fresh scrape. highlightsOptions.maxCharacters (default 4,000; 100–20,000) limits the combined passage length per result.
markdownOptions.pdf controls PDF results. shouldParse (default true) parses PDF URLs; when false, PDF results are skipped with WEBSITE_ACCESS_ERROR. start and end limit parsing to an inclusive, 1-based page range: end defaults to the final page and must be at least start.
waitForMs accepts 0–30,000 ms. Each page read has a default deadline of 20 seconds plus any waitForMs; set markdownOptions.timeoutOpts to change it. Its milliseconds (1–300,000) is required, and behavior is fail (default) or return-partial, which returns the available results and requires at least 5,000 ms. Top-level timeoutOpts limits the whole search.
Markdown and highlights add charges; see Credits and pricing.
Keep the URL, title, and description when a content read fails. For page-specific recovery, call Scrape with appropriate waits or filters.