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

# Introduction

> ScreenshotRender API Reference

> [!NOTE]
>
> **For AI agents:** [llms.txt](https://www.screenshotrender.com/llms.txt) describes the whole API in one plain text file: every endpoint with its options, credits and error codes.

The ScreenshotRender API gives you programmatic access to the web. All endpoints share a common base URL, authentication scheme and response format, described on this page.

## Features

> [card] [Scrape](/api-reference/endpoint/scrape.md)
>
> Read any page as Markdown, JSON, a screenshot and more.

> [card] [Search](/api-reference/endpoint/search.md)
>
> Search the web and get full page content in any format.

> [card] [Parse](/api-reference/endpoint/parse.md)
>
> Turn documents into Markdown, from a URL or an upload.

> [card] [Map](/api-reference/endpoint/map.md)
>
> Get the URLs of a website, quickly.

> [card] [Crawl](/api-reference/endpoint/crawl-post.md)
>
> Read a whole website, page by page.

## Base URL

All requests use the following base URL:

```bash
https://www.screenshotrender.com/api/v1
```

## Authentication

Send your API key in the `Authorization` header:

```bash
Authorization: Bearer sr-YOUR-API-KEY
```

The `x-api-key` header, or an `apiKey` query parameter, work too. Your API key is on your [dashboard](https://www.screenshotrender.com/dashboard). It starts with `sr-`.

Without a key, requests share a small daily allowance, to try the API. Each response then includes `playground` with the runs and credits left today.

## Response format

A successful response has `success: true`, the result in `data`, and the credits the call cost in `creditsUsed`:

```json
{
  "success": true,
  "data": { "markdown": "..." },
  "creditsUsed": 1
}
```

A crawl's start and status responses have their own shape: see [Crawl](/api-reference/endpoint/crawl-post.md).

A failed request has `success: false`, a message in `error`, a stable `code` to act on, and, when one option is the problem, its name in `field`:

```json
{
  "success": false,
  "error": "Invalid API key.",
  "code": "invalid_api_key"
}
```

## Response codes

| Status | Meaning |
| - | - |
| `200` | The request succeeded. |
| `400` | The request is not valid. `field` names the option at fault. |
| `401` | The API key is not valid. |
| `402` | Not enough credits for this request. |
| `404` | Not found, like a crawl id that doesn't exist. |
| `413` | The uploaded file is over 4 MB. |
| `415` | The uploaded file type is not supported. |
| `429` | Busy: retry after the seconds in the `Retry-After` header. |
| `502` | Something went wrong while reading the page. Try again. |

See [Errors](/api-reference/errors.md) for every error code and what to do about it.
