This guide covers the page options of ScreenshotRender. They work on /scrape. Search and Crawl take them in scrapeOptions, for every page they read. Every example below was run against the API. Each one costs 1 credit, the price of a page.

Basic scraping

Send a URL and the formats you want. See Scrape for every format.

Main content only

By default, onlyMainContent is true and leaves out parts of the page around its main content, such as the site header. Set it to false to get the whole page.
cURL
On this page, the whole page is 26,712 characters of Markdown, and the default 23,681.

Include and exclude tags

includeTags keeps only the elements that match these tags or CSS selectors. excludeTags drops the ones that match.
cURL

Wait and timeout

waitFor waits this many milliseconds after the page loads, for content that comes late. timeout is the most milliseconds to wait for the page.
cURL

Location and language

location.country loads the page from a country (ISO code), and location.languages sets the languages the browser asks for. This request gets Google’s German home page.
cURL
mobile loads the page as a phone would. blockAds hides ads and cookie banners.
cURL

Cache and max age

A page can come from a recent copy: its metadata then has cacheState: "hit" and cachedAt, when the copy was made. Set maxAge to the oldest copy you accept, in milliseconds. 0 always loads the page fresh.
cURL

Headers

headers sends your own HTTP headers with the request, like a cookie or a custom header.
cURL
The page above echoes the headers it received, so its Markdown contains X-Docs-Example: hello.

Actions

actions run on the page, in order, before it is read.
cURL
Response
This request opens the Python docs, clicks the link to the tutorial, and takes a screenshot of the tutorial page.

Page options reference