# API overview

> Base URL, authentication, request conventions, idempotency, pagination and rate limits for the Deeper Research API.

Source: https://deeperesearch.com/docs/api/

The Deeper Research API is a JSON REST API. Everything you can do with research in the web app (start it, follow it, read and search reports, merge them, attach files) you can do from code.

Base URL

```txt
https://deeperesearch.com/v1
```

[New to the API?](https://deeperesearch.com/docs/quickstart/)Run your first research in five minutes.

## Authentication

Send an API key as a bearer token on every request:

```bash
curl https://deeperesearch.com/v1/credits \
  -H "Authorization: Bearer dr_live_..."
```

Create keys in [Settings → API keys](https://deeperesearch.com/app/settings/api-keys). A key belongs to your organization, not to you, and can be revoked there at any time. Keys have two scopes: `research:read` covers `GET` requests and `research:write` covers everything else. Keys created in Settings have both.

Caution

Keep keys on your server. Never put a key in a browser, a mobile app or a public repository.

## Requests and responses

- Request and response bodies are JSON. Send `Content-Type: application/json` with a body; bodies can be up to 128 KB.
- Field names are `snake_case`. Resources have an `object` field naming their type, such as `"research"` or `"report"`.
- Timestamps are ISO 8601 strings in UTC. Money is a number of US dollars, such as `1.25`.
- Ids are UUIDs.
- New fields may be added to responses at any time, so ignore fields you don’t recognize.

## Idempotency

`POST /v1/research` and `POST /v1/research/{id}/merge` spend money, so they accept an `Idempotency-Key` header of up to 255 characters. Use a new key, such as a UUID, for each thing you mean to start:

- Retrying with the same key and the same body returns the original research with status `200` instead of `202`. Nothing new is started or charged.
- Reusing a key with a different body fails with `409 idempotency_conflict`.

If a request times out or the connection drops, retry it with the same key.

## Pagination

`GET /v1/research` returns a page of results, newest first, and `has_more`. To get the next page, pass the last id you received as `after`:

```bash
curl "https://deeperesearch.com/v1/research?limit=50&after=LAST_ID" \
  -H "Authorization: Bearer $DEEPER_RESEARCH_API_KEY"
```

## Rate limits

Each organization can make 120 requests a minute, shared by all its API keys and coding agents. Every response has these headers:

| Header                  | Meaning                                 |
| ----------------------- | --------------------------------------- |
| `x-ratelimit-limit`     | Requests allowed per minute             |
| `x-ratelimit-remaining` | Requests left in the current minute     |
| `x-ratelimit-reset`     | When the minute resets, in Unix seconds |

Over the limit, you get `429 rate_limited` with a `Retry-After` header in seconds. Separately, how much research can run at once and how much can be spent each day are limited per organization. Over those limits, you get `429 quota_exceeded`.

## Errors

Errors use HTTP status codes and always have the same body:

```json
{ "error": { "code": "insufficient_credit", "message": "This research needs $4.80 of credit; you have $2.10 available" } }
```

Handle errors by `code`, which is stable. The `message` is written for people and may change. See [Errors](https://deeperesearch.com/docs/api/errors/) for every code.

## OpenAPI

The API is described by an OpenAPI 3.1 document, generated from the API’s own code and checked against its real responses:

```txt
https://deeperesearch.com/docs/openapi.json
```

Use it to generate a client, import the API into Postman or Insomnia, or give an AI agent the full API.
