Search the web
POST/v1/search
Searches the web and optionally extracts the full content of every result in the same call. Accepts JSON or form-encoded bodies.
Every call is written to your usage records — including the query itself — so a
failed search can be traced back to what you searched for. Retention follows your
usage-record retention (12 months by default).
Request body
querystringrequiredmax_resultsintegersourcestringtime_range is rejected together with shopping/scholar; country is rejected with scholar.countrystringlanguagestringtime_rangestringextract_contentbooleanextract_optionsobjectextract_options accepts formats (markdown, raw_html, clean_html, links;
no duplicates), only_main_content, include_tags, exclude_tags,
advanced_mode, max_age_ms (0 … 172800000), timeout_ms
(1000 … 120000) and wait_for_ms (0 … 30000, at most half of timeout_ms).
headers, url and country are not accepted inside extract_options.
It only takes effect with extract_content: true. When extraction is off (or the
flag is omitted) the field is dropped before the request reaches the fetch service,
so a stale, default-filled object cannot fail the call.
Reading the result
data.outputsis an array of results, each withposition,title,url,snippetand — fornews— a human-readabledate.- With
extract_content: trueevery result also carriesextract; when that single extraction fails it is reported per result (extract.success: falsewithextract.code/extract.message) while the search itself still succeeds. - Zero results is a success:
data.outputsisnullanddata.meta.countis0.
Request
Responses
- 200
- 400
- 401
- 402
- 403
- 429
- 500
- 502
- 504
Search results, possibly a platform-level failure in data
Response Headers
Always no-store — no intermediary may cache these responses.
The fetch service's own request identifier for this call. Quote it together with
the envelope's request_id in support requests.
The request was rejected — see the error table for the code
The credential is missing, invalid, or expired
The account has no credits or quota left
The credential is valid but not allowed to do this
Too many requests — back off and retry
A fault on our side — retry later, and contact us if it persists
The fetch service failed — retry later
The fetch service did not answer in time — retry later