Skip to main content
Two tools. search finds URLs, fetch reads them. Neither runs JavaScript and neither carries a login — when the page needs either of those, you want the browser.
The full record for one result, and the envelope around it:
score is the aggregator’s ranking, not a relevance percentage: it falls off as 1, 0.5, 0.33 down the list. engine says which search engine produced the row, and engine_stats in the full response says which ones were asked and how long they took — useful exactly once, when results look wrong and you want to know whether one engine answered for all of them.
string
default:"web"
The vertical: web, news, images, videos, repos, science, x, tg or reddit. Picking the right one beats adding “site:” to the query.
string
day, week, month or year. Use it for anything where a stale answer is worse than no answer — prices, releases, what happened.
integer
default:"10"
1 to 50.
A vertical is a hint to the engines, not a filter you can lean on. Asking search_type="news" for a query with no news in it returns whatever the engines had — a GitHub README came back top for one of ours. Read the URLs before you trust the vertical.

fetch

fetch reads a page and gives back structured JSON, using an extractor that knows the site:
kind tells you which extractor ran. There are dedicated ones for Reddit threads and subreddits, Hacker News items, GitHub repositories, issues and files, arXiv papers, Wikipedia articles, YouTube transcripts and PDFs; anything else falls back to a generic browser extraction, and if that fails or answers 4xx/5xx, the Wayback Machine snapshot is tried automatically.

A batch is one call

Pass a list — up to 32 URLs — and they are fetched in parallel. One bad URL never aborts the batch:
A string returns one result dict; a list returns the envelope. Search first to find the URLs, then fetch the ones worth reading — in a single batch, because thirty-two pages in one call cost one round trip and thirty-two calls cost thirty-two.

When to use the browser instead

fetch sees what an HTTP client sees. Reach for agent-browser when:
  • the content is rendered by JavaScript after load
  • the page is behind a login or any session you had to establish
  • you need to click, type, scroll or submit something
  • the answer is Just a moment... — that is bot protection, and it needs a real browser with a real pointer
And stay with fetch when you just need the text of a public page. It is faster, it costs a fraction of the tokens, and it does not hold a browser open.