Skip to main content
You are viewing the v1 (legacy) documentation. In v2, SearchScraper has been renamed to search(). See the v2 documentation.

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