Skip to main content
sources picks the kinds of results a search returns, and categories adds PDFs, papers and videos. Each one comes back in its own list under data.

Search several sources

Get an API key in the Quickstart. This request asks for news, images, research papers and YouTube videos, two of each.

Read the response

data has a news, an images, a research and a videos list. This real response is cut to one row of each, and the snippets are shortened.
costUsd is $0.004: $0.001 for each of the four lists.

Sources and categories

Each entry is a string or an object with a type, such as "web" or { "type": "web" }. Send up to 5 sources. The web source is the only one that takes its own tbs, location, country and lang: { "type": "web", "tbs": "qdr:w", "country": "de" }. See Filters. With no sources you get web results. With only research or videos in categories, no web search runs. With research and web, the web results are limited to academic sites.

Search PDFs

categories: ["pdf"] searches for PDF files. Any web result whose address ends in .pdf also gets category: "pdf".
This real response is cut to one of the two rows.
To read a PDF you found, add page content or send its address to Scrape.

Limits and errors

  • A source that fails while others answer is left out, and warning names it, such as news: …. When every source fails, the call fails and costs nothing.
  • An empty list costs nothing. warning says when a list came back empty, for example research: no papers match these words. Try fewer or more general words.
  • With only research or videos and no sources, the fields that narrow web, news and image results return 400 invalidRequest: tbs, location, lang, includeDomains, excludeDomains, country and scrapeOptions. The error names the field, such as tbs narrows web, news and image results. Add them to sources or leave tbs out. Add a source or leave the field out.
  • An entry that is not web, news or images in sources returns 400 invalidRequest. The error says Send web, news or images, as a string or {"type":"web"}.
  • An entry that is not pdf, research or videos in categories returns 400 invalidRequest. The error says Send pdf, research or videos, as a string or {type}.
  • An images search needs words next to imagesize: or larger:, or it returns 400 invalidRequest.
  • Filters narrows each source by site, time, place and language.
  • Page content reads each web and news result.
  • Papers searches papers on their own and reads one by id.
  • Search overview lists every search field.