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

# SearchScraper

> Search and extract information from multiple web sources (v1)

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

  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

SearchScraper enables you to search the web and extract structured information from multiple sources using AI.

## Usage

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

  ```javascript JavaScript theme={null}
  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",
  });
  ```
</CodeGroup>

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