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

# Zero Data Retention

> Opt individual requests out of Context.dev's shared caches and content logs so request and response bytes are never persisted.

Zero data retention (ZDR) is an opt-in mode on selected Context.dev endpoints. When you set `zdr=enabled` on a request:

* Shared caches are bypassed end-to-end for that request.
* Usage logs record operational metadata only — no request body, no response body, no query values, no user-agent, no tags.
* Uploaded bytes (parse) and captured screenshots are handled in memory and are never staged in shared object storage.
* The response carries `X-Context-ZDR: true` so you can confirm ZDR was honored.

Use it for regulated workloads, customer-uploaded documents, or any request where the source or response content must not persist on our infrastructure.

<Info>
  Zero data retention is a per-organization entitlement. Contact [support@context.dev](mailto:support@context.dev) to have it enabled on your account before sending ZDR requests.
</Info>

## Supported endpoints

ZDR is only accepted on the endpoints below. Every other endpoint rejects the parameter with `ZDR_NOT_SUPPORTED`.

| Endpoint                      | How to send `zdr` |
| ----------------------------- | ----------------- |
| `GET /v1/web/scrape/markdown` | Query parameter   |
| `GET /v1/web/scrape/html`     | Query parameter   |
| `GET /v1/web/scrape/sitemap`  | Query parameter   |
| `GET /v1/web/screenshot`      | Query parameter   |
| `GET /v1/brand/screenshot`    | Query parameter   |
| `POST /v1/parse`              | Query parameter   |
| `POST /v1/web/crawl`          | JSON body field   |

Sending `zdr` in the wrong location (for example, in the crawl query string or a scrape body) returns `400 INPUT_VALIDATION_ERROR`.

## Enable ZDR on a request

`zdr` accepts two values: `enabled` and `disabled`. Any other value returns `400 INPUT_VALIDATION_ERROR`. Omitting the parameter is equivalent to `disabled` and behaves exactly like a normal request.

### Query-parameter endpoints

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.context.dev/v1/web/scrape/markdown?url=https://example.com&zdr=enabled" \
    -H "Authorization: Bearer $CONTEXT_DEV_API_KEY"
  ```

  ```bash Parse theme={null}
  curl -X POST "https://api.context.dev/v1/parse?extension=pdf&zdr=enabled" \
    -H "Authorization: Bearer $CONTEXT_DEV_API_KEY" \
    -H "Content-Type: application/pdf" \
    --data-binary @confidential.pdf
  ```
</CodeGroup>

### Body-parameter endpoint (crawl)

```bash cURL theme={null}
curl -X POST "https://api.context.dev/v1/web/crawl" \
  -H "Authorization: Bearer $CONTEXT_DEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "zdr": "enabled"
  }'
```

## Confirm ZDR was honored

Successful ZDR responses include the CORS-exposed response header:

```
X-Context-ZDR: true
```

If the header is missing, the request was processed in standard mode — either you sent `zdr=disabled` (or omitted it) or the request was rejected before ZDR could take effect. Always check the header when you need to prove retention behavior to a compliance workflow.

## Trade-offs

Because ZDR skips shared caches and richer processing paths, expect:

* **Higher latency** — scrape HTML cache, screenshot cache, DNS resolution cache, and single-flight deduplication are all bypassed. Repeated ZDR requests to the same URL don't get faster.
* **No search-assisted sitemap discovery** — `GET /v1/web/scrape/sitemap` under ZDR relies on direct crawling only.
* **Reduced observability on your side** — request `tags` are dropped from usage logs, so you can't attribute ZDR spend by tag in the dashboard. Track ZDR usage in your own systems if you need per-workload attribution.

Pricing and rate limits are unchanged.

## Errors

| HTTP | `error_code`             | Meaning                                                                                                        |
| ---- | ------------------------ | -------------------------------------------------------------------------------------------------------------- |
| 400  | `ZDR_NOT_SUPPORTED`      | The endpoint doesn't accept `zdr`. Use a supported endpoint from the table above.                              |
| 400  | `INPUT_VALIDATION_ERROR` | `zdr` was sent in the wrong location, with an invalid value, or in both query and body.                        |
| 403  | `ZDR_NOT_ENABLED`        | Your organization doesn't have the ZDR entitlement. Contact [support@context.dev](mailto:support@context.dev). |

## Related

* [Tag requests for usage reporting](/optimization/tag-requests) — tags are dropped under ZDR; plan attribution accordingly.
* [Handle rate limits](/optimization/rate-limits) — ZDR requests count against the same limits as standard requests.
