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

# Scrape a page

> POST /v1/scrape returns markdown and signals for one URL.

`POST https://api.sila.sh/v1/scrape`

## Request

```json theme={null}
{
  "url": "https://example.com",
  "formats": ["markdown"],
  "render": "auto",
  "screenshot": { "width": 1920, "height": 1080, "waitMs": 2000 }
}
```

| Field | Description |
| - | - |
| `url` | Page to fetch. Required. |
| `formats` | Any of `markdown`, `html`, `signals`, `siteInfo`, `screenshot`. Default `["markdown"]`. |
| `render` | `auto` (falls back to a headless browser when blocked), `never` (static only), `always` (headless). Default `auto`. |
| `screenshot` | Size and wait time. Used with the `screenshot` format. |

Scrape never checks `robots.txt`.

## Response 200

Only the requested formats are present.

```json theme={null}
{
  "url": "https://example.com",
  "finalUrl": "https://example.com/",
  "statusCode": 200,
  "renderedViaHeadless": false,
  "creditsUsed": 1,
  "markdown": "# Example",
  "html": "<html>…</html>",
  "screenshot": { "base64": "…", "mimeType": "image/png", "width": 1920, "height": 1080 },
  "signals": {
    "title": "Example", "description": null, "language": "en", "category": "content",
    "ogImage": null, "imageUrls": [], "jsonLd": [], "forms": [], "integrations": []
  },
  "siteInfo": { "logoUrl": null, "siteName": "Example", "title": "Example" }
}
```

## Errors

| Status | Code | Meaning |
| - | - | - |
| 400 | `invalid_url` | The URL is malformed or not safe to fetch. |
| 400 | `invalid_request` | The body is invalid. |
| 401 | `unauthorized` | Invalid API key. |
| 402 | `credits_exhausted` | No credits left. |
| 422 | `target_http_error` | The target returned a non-2xx status. |
| 429 | `rate_limited` | Too many requests. |
| 500 | `fetch_failed` | Sila could not fetch the page. |

```json theme={null}
{ "error": { "code": "target_http_error", "message": "HTTP 404: Not Found", "targetStatus": 404 } }
```


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