searchscraper endpoint. Returns the top pages with their content inline, and optionally runs an AI extraction across all results.
Request body
The search query.
Number of results to return and fetch (1–20). Default:
3.Optional prompt for AI extraction across the fetched results. When provided, the response also includes a
json field.JSON schema for the extracted output. Requires
prompt.Format used for each result’s inline content:
"markdown" (default) or "html".Recency filter:
"past_hour", "past_24_hours", "past_week", "past_month", "past_year".ISO 3166-1 alpha-2 country code for localized results (e.g.
"us", "it").Fetch-time options applied when crawling each result. See the Scrape endpoint for the full field list.
Example request
Example response
| Field | Description |
|---|---|
id | UUID for this search call. |
results[] | Ordered list of fetched results. |
results[].url / .title / .content | Result URL, title, and inline page content in the requested format. |
metadata.pages.requested / .scraped | Requested vs. successfully fetched count. |
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:
| Field | Description |
|---|---|
json | Structured output matching the schema (free-form JSON when no schema is supplied). |
raw | Raw model output before JSON parsing, when available. |
usage.promptTokens / .completionTokens | LLM token accounting. |
Related
- Service overview: Search
- SDK wrappers: Python · JavaScript