searchscraper endpoint. Returns the top pages with their content inline, and optionally runs an AI extraction across all results.
Request body
string
required
The search query.
integer
Number of results to return and fetch (1–20). Default:
3.string
Optional prompt for AI extraction across the fetched results. When provided, the response also includes a
json field.object
JSON schema for the extracted output. Requires
prompt.string
Format used for each result’s inline content:
"markdown" (default) or "html".string
Recency filter:
"past_hour", "past_24_hours", "past_week", "past_month", "past_year".string
ISO 3166-1 alpha-2 country code for localized results (e.g.
"us", "it").array
Optional MIME allowlist for fetched results. Omit this field to allow every supported type, including
application/pdf. There is no "all" or "*" keyword. When provided, it must be a non-empty array of exact supported MIME types, such as ["text/html", "application/pdf"]. Rejected types are reported as failed pages and do not appear in results.array
Optional processing configuration. Omit this field to use the 25-page PDF cap. You may also send
{"type":"pdf"} and omit maxPages; it defaults to 25. Set maxPages only to override the
default, using 1–500, or -1 for no page limit. PDF processing costs 1 credit per page
actually processed. See Configure PDF page limits
for examples. This does not change allowedTypes.object
Fetch-time options applied when crawling each result. See the Scrape endpoint for the full field list.
Example request
Example response
Search + extraction
Addprompt (and optionally schema) to roll all results into one structured payload:
prompt is supplied, the response includes three extra fields alongside results:
Related
- Service overview: Search
- SDK wrappers: Python · JavaScript