/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
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, ads and cookie banners
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 hascacheState: "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
X-Docs-Example: hello.
Actions
actions run on the page, in order, before it is read.
cURL
Response