query in Search.
Sources
sources takes web, news and images. categories takes pdf, research and videos. Each entry is a string or an object such as { "type": "web" }. Send up to 5 sources.
With only
research or videos, no web search runs, and the filters below return 400 invalidRequest. With research and web, web results are limited to academic sites, and includeDomains and excludeDomains return 400. An image search needs words next to imagesize: or larger:.
Filters
Top-level filters apply to every source they fit. Give web results their own with a source object:{ "type": "web", "tbs": "qdr:w", "country": "de" }.
tbs values, joined with commas, such as sbd:1,qdr:w:
tbs with only images returns 400. With other sources, images stay unfiltered and warning says so. A filter can leave fewer results than limit.
Page content
AddscrapeOptions to read the page behind each web and news result. Needs an API key. Images cannot be read, so scrapeOptions.formats with images returns 400.
markdown here) and a metadata object as in Page metadata. The web description is filled from the page. scrapeOptions takes the options in Scrape, so every format and option applies here.
For passages as their own list, use
{ "type": "highlights", "query": "refund policy" } in formats. See Highlights.
A page that fails does not fail the search. The row keeps its URL, title and description, has no page text, and carries metadata.error. Up to 10 pages are read at once.
Without a key,
scrapeOptions returns 401 apiKeyRequired. Pages read add to the price of the search. See Pricing.