# Scrape a single page

Costs one token. The token is returned when the page cannot be fetched.

`POST https://api.seoscraper.io/v1/scrape`

## Request body

- `url` string: Page address. Without a scheme, https:// is added.
- `include_html` boolean?: Return raw HTML in the response.

## Response 200

- `url` string: Requested address.
- `final_url` string: Address after all redirects.
- `path` string: Path of the final address.
- `status` integer: HTTP status of the page.
- `content_type` string: Content type sent by the server.
- `redirects` object[]: Redirects in order, with address and status.
  - `url` string:
  - `status` integer:
- `headers` object[]: HTTP headers of the page, names in lowercase.
  - `name` string:
  - `value` string:
- `duration_ms` integer: Fetch time in milliseconds.
- `size_bytes` integer: Size of the fetched content in bytes.
- `truncated` boolean: Whether the content was cut at the 10 MB limit.
- `lang` string: Language from the lang attribute.
- `title` string: Content of the title tag.
- `meta_description` string: Content of the meta description.
- `canonical` string: Canonical address.
- `robots` object: Meta robots and X-Robots-Tag, with the resulting index and follow.
  - `meta` string: Content of meta robots.
  - `x_robots_tag` string: Value of the X-Robots-Tag header.
  - `index` boolean: Whether the page may be indexed.
  - `follow` boolean: Whether its links may be followed.
- `word_count` integer: Number of words in the page content.
- `headings` object[]: Headings h1 to h6 in page order.
  - `level` integer: 1 for h1, 6 for h6.
  - `text` string:
- `links` object[]: Links: address, text, type, rel and nofollow.
  - `url` string:
  - `text` string:
  - `type` string (internal, external, other): other: mailto, tel and similar.
  - `rel` string: Value of the rel attribute.
  - `nofollow` boolean:
- `images` object[]: Images: src, alt, lazy and dimensions.
  - `src` string:
  - `alt` string | null: null: missing attribute, empty string: empty alt.
  - `lazy` boolean: Whether the image has loading=lazy.
  - `width` string:
  - `height` string:
- `html` string | null?: Raw HTML if you ask for include_html, otherwise null.
- `id` string: Result identifier.
- `created_at` string: Date and time of the scrape.
- `saved` boolean: Whether the result was saved in your team.

## Errors

- 401: unauthorized
- 403: forbidden
- 422: invalid_request, invalid_url, url_not_allowed, unsupported_content, too_many_redirects, dns_error
- 429: rate_limited, no_tokens
- 502: fetch_failed
- 503: busy, scraper_unavailable, unavailable
- 504: timeout

## Example

```bash
curl -X POST "https://api.seoscraper.io/v1/scrape" \
  -H "Authorization: Bearer ssk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://books.toscrape.com"}'
```

```json
{
  "url": "https://books.toscrape.com",
  "final_url": "https://books.toscrape.com/",
  "path": "/",
  "status": 200,
  "content_type": "text/html",
  "redirects": [],
  "headers": [
    {
      "name": "content-type",
      "value": "text/html"
    }
  ],
  "duration_ms": 826,
  "size_bytes": 51294,
  "truncated": false,
  "lang": "en-us",
  "title": "All products | Books to Scrape - Sandbox",
  "meta_description": "",
  "canonical": "",
  "robots": {
    "meta": "NOARCHIVE,NOCACHE",
    "x_robots_tag": "",
    "index": true,
    "follow": true
  },
  "word_count": 309,
  "headings": [
    {
      "level": 1,
      "text": "All products"
    }
  ],
  "links": [
    {
      "url": "https://books.toscrape.com/catalogue/page-2.html",
      "text": "next",
      "type": "internal",
      "rel": "",
      "nofollow": false
    }
  ],
  "images": [
    {
      "src": "https://books.toscrape.com/media/cache/2c/da/2cdad67c44b002e7ead0cc35693c0e8b.jpg",
      "alt": "A Light in the Attic",
      "lazy": false,
      "width": "",
      "height": ""
    }
  ],
  "html": null,
  "id": "0f5a8f5e-6d7c-4b1e-a8a1-8f5f0d3c2b11",
  "created_at": "2026-11-25T08:00:00Z",
  "saved": true
}
```
