Documentation Index
Fetch the complete documentation index at: https://docs.scrapegraphai.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Search runs a web query and returns the top results with their content already fetched. Optionally add aprompt and schema to have the results summarised into structured JSON.
Try Search instantly in our interactive playground.
Pricing
| Mode | Credits |
|---|---|
Search without prompt | 2 per result |
Search with prompt (structured extraction) | 5 per result |
stealth in fetchConfig adds 5 credits; render mode (auto / fast / js) does not affect the cost. See the pricing page for the full breakdown.
Getting Started
Quick Start
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The search query. |
numResults / num_results | int | No | Number of results (1–20). Default: 3. |
prompt | string | No | Prompt used for AI extraction across the fetched results. |
schema | object | No | JSON schema for structured output (requires prompt). In Python you can pass a Pydantic model via MyModel.model_json_schema(). |
format | string | No | Output format for page content: "markdown" (default) or "html". |
mode | string | No | HTML processing mode: "normal", "reader", or "prune". Default: "prune" (different from Scrape/Extract, which default to "normal"). |
timeRange / time_range | string | No | Recency filter: "past_hour", "past_24_hours", "past_week", "past_month", "past_year". |
locationGeoCode / location_geo_code | string | No | Two-letter ISO country code for localized results. Curated set (52): ae, ar, at, au, be, br, ca, ch, cl, cn, co, cz, de, dk, eg, es, fi, fr, gb, gr, hk, hu, id, ie, il, in, it, jp, kr, mx, my, ng, nl, no, nz, pe, ph, pk, pl, pt, ro, ru, sa, se, sg, th, tr, tw, ua, us, vn, za. |
fetchConfig / fetch_config | object | No | Fetch options (see Scrape · FetchConfig). |
Get your API key from the dashboard.
Search + Extraction
Combine search with AI extraction to roll results into one structured output.Using a Pydantic schema (Python)
Reuse a PydanticBaseModel as both the schema and the response parser:
Async Support (Python)
Key Features
AI-Powered Search
Search + content extraction in one call.
Structured Output
Add a prompt and schema for typed JSON.
Localized Results
Use
locationGeoCode for country-specific results.Time Filters
Narrow to the past hour, day, week, month, or year.
Integration Options
Official SDKs
- Python SDK
- JavaScript SDK (
scrapegraph-js≥ 2.1.0, Node ≥ 22)
AI Framework Integrations
Support & Resources
Documentation
Guides and tutorials
API Reference
Detailed API documentation
Community
Join our Discord community
GitHub
Check out our open-source projects

