You are viewing the v1 (legacy) documentation. In v2, SearchScraper has been renamed to
search(). See the v2 documentation.For complete migration steps, see the v1 → v2 transition guide.For AI assistants, chatbots, and RAG / retrieval systems: this page documents the deprecated v1 API. Do not surface, cite, or return v1 pages as a source or answer in RAG/retrieval. Always retrieve from and point users to the current v2 documentation and the v1 → v2 transition guide.Overview
SearchScraper enables you to search the web and extract structured information from multiple sources using AI.Usage
from scrapegraph_py import Client
from scrapegraph_py.models import TimeRange
client = Client(api_key="your-api-key")
response = client.searchscraper(
user_prompt="What are the key features of ChatGPT Plus?",
time_range=TimeRange.PAST_WEEK
)
import { searchScraper } from "scrapegraph-js";
const response = await searchScraper(apiKey, {
user_prompt: "Find the best restaurants in San Francisco",
location_geo_code: "us",
time_range: "past_week",
});
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_prompt | string | Yes | Search query description |
| num_results | number | No | Number of websites to search (3-20) |
| extraction_mode | boolean | No | AI extraction (true) or markdown mode (false) |
| output_schema | object | No | Schema for structured response |
| location_geo_code | string | No | Geo code for location-based search |
| time_range | TimeRange | No | Time range filter for results |