Skip to main content

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.

You are viewing the v1 (legacy) documentation. In v2, SmartScraper has been renamed to extract(). See the v2 documentation.

Overview

SmartScraper is our flagship LLM-powered web scraping service that intelligently extracts structured data from any website.

Usage

from scrapegraph_py import Client

client = Client(api_key="your-api-key")

response = client.smartscraper(
    website_url="https://example.com",
    user_prompt="Extract the main heading and description"
)

Parameters

ParameterTypeRequiredDescription
website_urlstringYesThe URL of the webpage to scrape
user_promptstringYesA textual description of what you want to extract
output_schemaobjectNoPydantic/Zod schema for structured response
stealthbooleanNoEnable anti-detection mode
headersobjectNoCustom HTTP headers
mockbooleanNoEnable mock mode for testing
wait_msnumberNoPage load wait time in ms
country_codestringNoProxy routing country code