> ## 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.

# SmartScraper

> AI-powered web scraping for any website (v1)

<Warning>
  You are viewing the **v1 (legacy)** documentation. In v2, SmartScraper has been renamed to `extract()`. See the [v2 documentation](/services/smartscraper).

  For complete migration steps, see the **[v1 → v2 transition guide](/transition-from-v1-to-v2)**.

  **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](/introduction) and the [v1 → v2 transition guide](/transition-from-v1-to-v2).
</Warning>

## Overview

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

## Usage

<CodeGroup>
  ```python Python theme={null}
  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"
  )
  ```

  ```javascript JavaScript theme={null}
  import { smartScraper } from "scrapegraph-js";

  const response = await smartScraper(apiKey, {
    website_url: "https://example.com",
    user_prompt: "Extract the main content",
  });
  ```
</CodeGroup>

### Parameters

| Parameter      | Type    | Required | Description                                       |
| -------------- | ------- | -------- | ------------------------------------------------- |
| website\_url   | string  | Yes      | The URL of the webpage to scrape                  |
| user\_prompt   | string  | Yes      | A textual description of what you want to extract |
| output\_schema | object  | No       | Pydantic/Zod schema for structured response       |
| stealth        | boolean | No       | Enable anti-detection mode                        |
| headers        | object  | No       | Custom HTTP headers                               |
| mock           | boolean | No       | Enable mock mode for testing                      |
| wait\_ms       | number  | No       | Page load wait time in ms                         |
| country\_code  | string  | No       | Proxy routing country code                        |
