Skip to main content
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
)

Parameters

ParameterTypeRequiredDescription
user_promptstringYesSearch query description
num_resultsnumberNoNumber of websites to search (3-20)
extraction_modebooleanNoAI extraction (true) or markdown mode (false)
output_schemaobjectNoSchema for structured response
location_geo_codestringNoGeo code for location-based search
time_rangeTimeRangeNoTime range filter for results