# Cookie and tracker scan API

See the cookies, trackers and consent banner a first-time visitor meets, before any choice is made.

`POST /v1/cookies`

- Price: Costs 5 credits, reserved when the job starts and charged when it finishes. Failed runs are free.
- Cache: Answers are cached for up to 15 minutes, per account except for a site's home page; send fresh=true to ask the source again.
- MCP tool: `scan_cookies`

Cookies, storage, third parties and trackers seen on one visit before any consent, and the consent banner. Costs 5 credits, reserved when the job starts and charged when it finishes. Failed runs are free. Answers are cached for up to 15 minutes, per account except for a site's home page; send fresh=true to ask the source again.

## Request body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | A page URL or a domain; a domain means its home page. |
| `fresh` | boolean | no | Skip the cache and ask the source again; costs the same. |

## Response

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | string | yes | The job's ID; poll GET /v1/jobs/{id} |
| `tool` | string | yes |  |
| `target` | string | yes |  |
| `status` | "ok" | "partial" | "error" | yes |  |
| `fetched_at` | string | no |  |
| `cached` | boolean | no |  |
| `credits_used` | integer | no | Credits this call took from your balance. 0 for free tools, for a replay of an earlier call, and for a free check run on the website without signing in |
| `summary` | string | yes |  |
| `score` | integer or null | no |  |
| `findings` | array of object | no |  |
| `credits_remaining` | integer | yes | Your balance after this call. It can be below zero after a refund; free tools still work then |
| `data` | object | yes | This tool's result |
| `data.url` | string | yes |  |
| `data.final_url` | string or null | yes |  |
| `data.status` | integer or null | yes |  |
| `data.locale` | string | yes |  |
| `data.waited_s` | number | yes |  |
| `data.settled` | boolean | yes |  |
| `data.cookies` | array of object | yes |  |
| `data.storage` | array of object | yes |  |
| `data.third_parties` | array of object | yes |  |
| `data.websockets` | array of string | yes |  |
| `data.consent` | object | yes |  |
| `data.trackers_before_consent` | array of object | yes |  |
| `data.cname_cloaked` | array of object | yes |  |
| `data.screenshot` | object or null | yes |  |
| `data.budget` | object | yes |  |
| `data.catalog` | object | yes |  |

## Errors

- `400` Invalid domain, URL or parameter, a TLD this tool can't check, or an X-Request-Id already used for another call (`invalid_domain`, `invalid_url`, `invalid_request`, `unsupported_tld`)
- `401` Missing, unknown or revoked API key, or one whose creator is no longer a member of the account (`unauthorized`)
- `402` Balance below the call's price (`insufficient_credits`)
- `403` Account suspended, the key's creator is over the plan's seats, or an anonymous check without a valid proof-of-work or for a tool that needs an account, or bulk checks before a first purchase (`account_suspended`, `plan_limit`, `challenge_required`, `sign_in_required`, `bulk_locked`)
- `429` Too many requests, today's free checks are used up, or too many website scans at once; wait for the number of seconds in the Retry-After header (`rate_limited`, `free_limit_reached`, `too_many_jobs`). Not charged
- `500` Unexpected error (`internal_error`)
- `503` Too many open event streams on this server, the checked site is getting too many checks, or the browser or link checker is busy; try again after the seconds in the Retry-After header (`busy`, `site_busy`, `browser_busy`, `crawl_busy`). Not charged

## Example

```sh
curl -X POST "https://api.dnssuper.com/v1/cookies" \
  -H "Authorization: Bearer $DNSSUPER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"example.com"}'
```

```python
import os

import httpx

client = httpx.Client(
    base_url="https://api.dnssuper.com",
    headers={"Authorization": f"Bearer {os.environ['DNSSUPER_API_KEY']}"},
    timeout=60,
)
response = client.post("/v1/cookies", json={
    "url": "example.com",
})
response.raise_for_status()
result = response.json()
print(result["summary"], result["credits_used"])
```

```ts
const response = await fetch("https://api.dnssuper.com/v1/cookies", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.DNSSUPER_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"url":"example.com"}),
});
if (!response.ok) throw new Error((await response.json()).error.message);
const result = await response.json();
console.log(result.summary, result.credits_used);
```

Example response:

```json
{
  "job_id": "9dfc7215-93b7-54e5-a30d-04a95397f350",
  "status": "queued",
  "total": 1,
  "credits_reserved": 5,
  "duplicates_removed": 0,
  "job_url": "https://api.dnssuper.localhost/v1/jobs/9dfc7215-93b7-54e5-a30d-04a95397f350",
  "items_url": "https://api.dnssuper.localhost/v1/jobs/9dfc7215-93b7-54e5-a30d-04a95397f350/items",
  "events_url": "https://api.dnssuper.localhost/v1/jobs/9dfc7215-93b7-54e5-a30d-04a95397f350/events"
}
```

## MCP

```json
{
  "tool": "scan_cookies",
  "arguments": {
    "url": "example.com"
  }
}
```

```text
3 trackers loaded before any consent on www.example.com. These are technical observations from one visit from an EU server, not legal advice.
Consent: OneTrust banner showing (TCF)
Trackers before consent: Meta Pixel (advertising), Google Tag Manager (tag_manager), Google Analytics (analytics)
Cookies: 7 (6 first party, 1 third party); storage keys: 2
Other sites contacted: 6 (2 not in our catalog)
CNAME cloaking: metrics.example.com -> Adobe Analytics
screenshot: 800x49 WebP
- fail: Trackers load before consent. Fix: Load tracking scripts only after a visitor agrees.
- fail: Tracking cookies are set before consent. Fix: Set tracking cookies only after a visitor agrees.
- warn: A tracker hides behind your own domain. Fix: Review the subdomain that points to a tracking service.
- warn: Some cookies lack Secure. Fix: Add Secure to every cookie on an HTTPS site.
+5 more findings (pass detail='full' to see all)
Credits: 5 credits used, 498 remaining | fresh | checked 2026-11-14 10:00 UTC
```
