> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# ScrapeGraphAI

> AI-powered scrape, extract, search and crawl with natural-language prompts (ScrapeGraphAI v2 API).

![](https://mintcdn.com/webrouter/T_A5Quwg50s_JK2y/logo/data-apis/scrapegraphai.webp?fit=max\&auto=format\&n=T_A5Quwg50s_JK2y\&q=85\&s=85db613ebd4e6f441a423b72f136883f)

[Web Catalog · Scraping](https://docs.webrouter.net/data-apis.md?category=scraping)

Needs&#x20;

`SGAI_API_KEY`

Endpoints

8

Auth

Key in header

[Vendor docs](https://docs.scrapegraphai.com/api-reference/introduction)

&#x20;·&#x20;

[Pricing](https://scrapegraphai.com/pricing)

## Setup

| Variable | | What it is |
| - | - | - |
| `SGAI_API_KEY` | required | a ScrapeGraphAI API key, starting sgai- (scrapegraphai.com/dashboard) |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Auth is the SGAI-APIKEY header. All paths are under /api. This is the v2 API; the v1 host and its smartscraper/searchscraper/markdownify/smartcrawler endpoints are deprecated.
* An optional SGAI-Session-Id header groups related requests for the history list.
* Crawls are asynchronous: start, poll status, then page through crawl.pages.
* Monitors (scheduled change detection) are not in this entry.

## Endpoints

POST

Scrape a URL

Fetch a page in one or more formats: markdown, HTML, links, images, summary, JSON extraction, branding or screenshot.

[Open](#scrapegraphai-scrape-url)

POST

Extract structured data with a prompt

Natural-language structured extraction from a URL, HTML or markdown.

[Open](#scrapegraphai-extract-ai)

POST

Search and fetch the top results

Web search with page content returned inline and optional AI extraction across results.

[Open](#scrapegraphai-search-web)

POST

Start a crawl

Start an asynchronous multi-page crawl and get a job id.

[Open](#scrapegraphai-crawl-start)

GET

Get a crawl's status

Progress and lightweight page metadata of a crawl job.

[Open](#scrapegraphai-crawl-status)

GET

Get a crawl's pages

Cursor-paginated pages of a crawl with their scrape results.

[Open](#scrapegraphai-crawl-pages)

GET

List past requests

Recent API calls on your account, newest first.

[Open](#scrapegraphai-history-list)

GET

Get credits, plan and job quotas

Remaining credits, plan name and crawl/monitor quotas; free and a quick key check.

[Open](#scrapegraphai-credits-get)

### Scrape a URL

POST

`/api/scrape`

`scrapegraphai.scrape.url`

Fetch a page in one or more formats: markdown, HTML, links, images, summary, JSON extraction, branding or screenshot.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`url` required</td><td>string</td><td>body</td><td>Public URL to fetch; private addresses are rejected. Example `https://example.com`</td></tr>
    <tr><td>`formats` required</td><td>array</td><td>body</td><td>Output formats, each \{"type": ...}: markdown, html, links, images, summary, json (with prompt and schema), branding or screenshot. Example `[{"type": "markdown"}]`</td></tr>

    <tr>
      <td>
        `contentType`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Override the detected content type.
      </td>
    </tr>

    <tr>
      <td>
        `allowedTypes`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        MIME allowlist; omit to allow all supported types.
      </td>
    </tr>

    <tr>
      <td>
        `processors`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        e.g. \[\{"type": "pdf", "maxPages": 10}]; PDFs are capped at 25 pages by default and cost 1 credit per page.
      </td>
    </tr>

    <tr>
      <td>
        `fetchConfig`
      </td>

      <td>
        object
      </td>

      <td>
        body
      </td>

      <td>
        Fetch options: mode (auto, fast, js), stealth, headers, cookies, scrolls, wait, timeout (ms), country.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.scrapegraphai.com/api-reference/endpoint/scrape.md) · Same job: [Andi AI Search](https://docs.webrouter.net/data-apis/andi.md#andi-fetch), [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-web-scrape), [Brave Search](https://docs.webrouter.net/data-apis/bravesearch.md#bravesearch-llm-context), [BytePlus Searchinfinity](https://docs.webrouter.net/data-apis/byteplus-search.md#byteplus-search-fetch), [cloro](https://docs.webrouter.net/data-apis/cloro.md#cloro-google-product), [Context7](https://docs.webrouter.net/data-apis/context7.md#context7-page-fetch)

```python Python theme={null}
router.call_data_api("scrapegraphai.scrape.url", {'url': 'https://example.com', 'formats': [{'type': 'markdown'}]})
```

```text MCP theme={null}
call_data_api(endpoint="scrapegraphai.scrape.url", params={"url": "https://example.com", "formats": [{"type": "markdown"}]})
```

> [!NOTE]
>
> * A read over POST: it fetches a page and changes nothing in your account.
> * Credits are per format; stealth adds 5.

### Extract structured data with a prompt

POST

`/api/extract`

`scrapegraphai.extract.ai`

Natural-language structured extraction from a URL, HTML or markdown.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`prompt` required</td><td>string</td><td>body</td><td>What to extract. Example `What is the title of this page?`</td></tr>

    <tr>
      <td>
        `url`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Page to extract from; send exactly one of url, html or markdown.
      </td>
    </tr>

    <tr>
      <td>
        `html`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Raw HTML, up to 2 MB.
      </td>
    </tr>

    <tr>
      <td>
        `markdown`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Markdown, up to 2 MB.
      </td>
    </tr>

    <tr>
      <td>
        `schema`
      </td>

      <td>
        object
      </td>

      <td>
        body
      </td>

      <td>
        JSON Schema the output must match.
      </td>
    </tr>

    <tr><td>`mode`</td><td>string</td><td>body</td><td>HTML pre-processing mode. One of `normal`, `reader`, `prune`</td></tr>

    <tr>
      <td>
        `fetchConfig`
      </td>

      <td>
        object
      </td>

      <td>
        body
      </td>

      <td>
        Fetch options: mode (auto, fast, js), stealth, headers, cookies, scrolls, wait, timeout (ms), country.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.scrapegraphai.com/api-reference/endpoint/extract.md) · Same job: [Andi AI Search](https://docs.webrouter.net/data-apis/andi.md#andi-fetch), [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-web-scrape), [Brave Search](https://docs.webrouter.net/data-apis/bravesearch.md#bravesearch-llm-context), [BytePlus Searchinfinity](https://docs.webrouter.net/data-apis/byteplus-search.md#byteplus-search-fetch), [cloro](https://docs.webrouter.net/data-apis/cloro.md#cloro-google-product), [Context7](https://docs.webrouter.net/data-apis/context7.md#context7-page-fetch)

```python Python theme={null}
router.call_data_api("scrapegraphai.extract.ai", {'prompt': 'What is the title of this page?'})
```

```text MCP theme={null}
call_data_api(endpoint="scrapegraphai.extract.ai", params={"prompt": "What is the title of this page?"})
```

> [!NOTE]
>
> * A read over POST: it extracts data and changes nothing in your account.
> * Costs 5 credits, plus 5 with stealth.

### Search and fetch the top results

POST

`/api/search`

`scrapegraphai.search.web`

Web search with page content returned inline and optional AI extraction across results.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`query` required</td><td>string</td><td>body</td><td>The search query. Example `scrapegraphai pricing`</td></tr>

    <tr>
      <td>
        `numResults`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Results to return and fetch, 1-20; default 3.
      </td>
    </tr>

    <tr>
      <td>
        `prompt`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Run AI extraction across the results; adds a json field to the response.
      </td>
    </tr>

    <tr>
      <td>
        `schema`
      </td>

      <td>
        object
      </td>

      <td>
        body
      </td>

      <td>
        JSON Schema for the extraction; requires prompt.
      </td>
    </tr>

    <tr><td>`format`</td><td>string</td><td>body</td><td>Inline content format. One of `markdown`, `html`</td></tr>
    <tr><td>`timeRange`</td><td>string</td><td>body</td><td>Recency filter. One of `past_hour`, `past_24_hours`, `past_week`, `past_month`, `past_year`</td></tr>

    <tr>
      <td>
        `locationGeoCode`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        ISO country code, e.g. us.
      </td>
    </tr>

    <tr>
      <td>
        `fetchConfig`
      </td>

      <td>
        object
      </td>

      <td>
        body
      </td>

      <td>
        Fetch options: mode (auto, fast, js), stealth, headers, cookies, scrolls, wait, timeout (ms), country.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.scrapegraphai.com/api-reference/endpoint/search.md) · Same job: [Andi AI Search](https://docs.webrouter.net/data-apis/andi.md#andi-search), [Apify](https://docs.webrouter.net/data-apis/apify.md#apify-store-search), [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-web-search), [Brave Search](https://docs.webrouter.net/data-apis/bravesearch.md#bravesearch-videos-search), [BytePlus Searchinfinity](https://docs.webrouter.net/data-apis/byteplus-search.md#byteplus-search-web-search), [Crawl4AI Cloud](https://docs.webrouter.net/data-apis/crawl4ai.md#crawl4ai-search)

```python Python theme={null}
router.call_data_api("scrapegraphai.search.web", {'query': 'scrapegraphai pricing'})
```

```text MCP theme={null}
call_data_api(endpoint="scrapegraphai.search.web", params={"query": "scrapegraphai pricing"})
```

> [!NOTE]
>
> * A read over POST: it runs a search and changes nothing in your account.
> * Costs 2 credits per result, or 5 with a prompt.

### Start a crawl

POST

`/api/crawl`

`scrapegraphai.crawl.start`

Start an asynchronous multi-page crawl and get a job id.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`url` required</td><td>string</td><td>body</td><td>Starting URL. Example `https://scrapegraphai.com/`</td></tr>
    <tr><td>`formats`</td><td>array</td><td>body</td><td>Output formats, each \{"type": ...}: markdown, html, links, images, summary, json (with prompt and schema), branding or screenshot. Example `[{"type": "markdown"}]`</td></tr>

    <tr>
      <td>
        `maxPages`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Most pages to crawl.
      </td>
    </tr>

    <tr>
      <td>
        `maxDepth`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Link levels to follow.
      </td>
    </tr>

    <tr>
      <td>
        `maxLinksPerPage`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Cap on links expanded per page.
      </td>
    </tr>

    <tr>
      <td>
        `includePatterns`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Glob URL patterns to include, e.g. \["/blog/\*"].
      </td>
    </tr>

    <tr>
      <td>
        `excludePatterns`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Glob URL patterns to exclude.
      </td>
    </tr>

    <tr>
      <td>
        `fetchConfig`
      </td>

      <td>
        object
      </td>

      <td>
        body
      </td>

      <td>
        Fetch options: mode (auto, fast, js), stealth, headers, cookies, scrolls, wait, timeout (ms), country.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.scrapegraphai.com/api-reference/endpoint/crawl/start.md) · Same job: [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-web-crawl), [Decodo](https://docs.webrouter.net/data-apis/decodo.md#decodo-crawl-start), [Firecrawl](https://docs.webrouter.net/data-apis/firecrawl.md#firecrawl-crawl-start), [Olostep](https://docs.webrouter.net/data-apis/olostep.md#olostep-crawls-create), [Search1API](https://docs.webrouter.net/data-apis/search1api.md#search1api-web-deepcrawl), [Spider Cloud](https://docs.webrouter.net/data-apis/spidercloud.md#spidercloud-crawl-site)

```python Python theme={null}
router.call_data_api("scrapegraphai.crawl.start", {'url': 'https://scrapegraphai.com/', 'formats': [{'type': 'markdown'}]})
```

```text MCP theme={null}
call_data_api(endpoint="scrapegraphai.crawl.start", params={"url": "https://scrapegraphai.com/", "formats": [{"type": "markdown"}]})
```

> [!NOTE]
>
> * Starts a billed job: it only produces data and changes nothing else in your account.
> * Async: poll crawl.status, then read content with crawl.pages. Costs 2 credits to start plus per-page scrape cost.

### Get a crawl's status

GET

`/api/crawl/{id}`

`scrapegraphai.crawl.status`

Progress and lightweight page metadata of a crawl job.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        Crawl job id returned by crawl.start.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.scrapegraphai.com/api-reference/endpoint/crawl/get-status.md) · Same job: [AI Ark](https://docs.webrouter.net/data-apis/aiark.md#aiark-people-find-emails-status), [AnyAPI](https://docs.webrouter.net/data-apis/anyapi.md#anyapi-requests-get), [Anymail Finder](https://docs.webrouter.net/data-apis/anymailfinder.md#anymailfinder-bulk-get), [Apify](https://docs.webrouter.net/data-apis/apify.md#apify-actors-list), [Aviato](https://docs.webrouter.net/data-apis/aviato.md#aviato-marketmap-get), [BounceBan](https://docs.webrouter.net/data-apis/bounceban.md#bounceban-single-status)

> [!NOTE]
>
> * Status is running, completed, failed or stopped.

### Get a crawl's pages

GET

`/api/crawl/{id}/pages`

`scrapegraphai.crawl.pages`

Cursor-paginated pages of a crawl with their scrape results.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        Crawl job id returned by crawl.start.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Pages per response, 1-100; default 50.
      </td>
    </tr>

    <tr>
      <td>
        `cursor`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Zero-based index to start at; use pagination.nextCursor from the last response.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.scrapegraphai.com/api-reference/endpoint/crawl/pages.md) · Same job: [BetterContact](https://docs.webrouter.net/data-apis/bettercontact.md#bettercontact-contacts-enrich-result), [Bright Data](https://docs.webrouter.net/data-apis/brightdata.md#brightdata-datasets-snapshot-download), [Clay](https://docs.webrouter.net/data-apis/clay.md#clay-routines-results), [Decodo](https://docs.webrouter.net/data-apis/decodo.md#decodo-task-results), [Dune](https://docs.webrouter.net/data-apis/dune.md#dune-execution-results), [Forager](https://docs.webrouter.net/data-apis/forager.md#forager-person-work-email-result)

### List past requests

GET

`/api/history`

`scrapegraphai.history.list`

Recent API calls on your account, newest first.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `page`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Page number, 1-indexed; default 1.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Entries per page; default 20.
      </td>
    </tr>

    <tr><td>`service`</td><td>string</td><td>query</td><td>Filter by service. One of `scrape`, `extract`, `search`, `monitor`, `crawl`, `schema`</td></tr>

    <tr>
      <td>
        `sessionId`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Case-insensitive partial match on session id.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.scrapegraphai.com/api-reference/endpoint/history.md)

```python Python theme={null}
router.call_data_api("scrapegraphai.history.list")
```

```text MCP theme={null}
call_data_api(endpoint="scrapegraphai.history.list")
```

### Get credits, plan and job quotas

GET

`/api/credits`

`scrapegraphai.credits.get`

Remaining credits, plan name and crawl/monitor quotas; free and a quick key check.

Input

No inputs.

[Vendor docs](https://docs.scrapegraphai.com/api-reference/endpoint/credits.md)

```python Python theme={null}
router.call_data_api("scrapegraphai.credits.get")
```

```text MCP theme={null}
call_data_api(endpoint="scrapegraphai.credits.get")
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.