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

# API Reference

> ScrapeGraphAI v1 API Reference

<Warning>
  You are viewing the **v1 (legacy)** API documentation. The v1 API uses `/v1/*` endpoints. Please migrate to the [v2 API](/api-reference/introduction) which uses `/api/v2/*` endpoints.

  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>

## Base URL

```
https://api.scrapegraphai.com/v1
```

## Authentication

All v1 API requests require the `SGAI-APIKEY` header:

```bash theme={null}
curl -X POST "https://api.scrapegraphai.com/v1/smartscraper" \
  -H "SGAI-APIKEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"website_url": "https://example.com", "user_prompt": "Extract data"}'
```

<Note>
  In v2, authentication uses the `Authorization: Bearer` header instead.
</Note>

## v1 Endpoints

| Endpoint                 | Method | Description                  |
| ------------------------ | ------ | ---------------------------- |
| `/v1/smartscraper`       | POST   | Start a SmartScraper job     |
| `/v1/smartscraper/{id}`  | GET    | Get SmartScraper job status  |
| `/v1/searchscraper`      | POST   | Start a SearchScraper job    |
| `/v1/searchscraper/{id}` | GET    | Get SearchScraper job status |
| `/v1/markdownify`        | POST   | Start a Markdownify job      |
| `/v1/markdownify/{id}`   | GET    | Get Markdownify job status   |
| `/v1/smartcrawler`       | POST   | Start a SmartCrawler job     |
| `/v1/smartcrawler/{id}`  | GET    | Get SmartCrawler job status  |
| `/v1/sitemap`            | POST   | Start a Sitemap job          |
| `/v1/sitemap/{id}`       | GET    | Get Sitemap job status       |
| `/v1/credits`            | GET    | Get remaining credits        |
| `/v1/feedback`           | POST   | Submit feedback              |

## Migration to v2

See the [v2 API Reference](/api-reference/introduction) for the latest endpoints and authentication methods.
