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").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