# Dangling record check API

Find DNS records that point to services, zones or domains you no longer control, before someone else claims them.

`POST /v1/dangling`

- Price: Costs 1 credit per name; cached answers cost the same. Names that fail upstream are free.
- Cache: Answers are cached for the lowest record TTL, between 1 minute and 1 hour; send fresh=true to ask the source again.
- MCP tool: `check_dangling_records`

For each name, whether its CNAME, NS or address records point to a service, zone or domain that someone else could claim. Costs 1 credit per name; cached answers cost the same. Names that fail upstream are free. Answers are cached for the lowest record TTL, between 1 minute and 1 hour; send fresh=true to ask the source again. A retry with the same `X-Request-Id` returns the stored result of the first call for 24 hours without charging again, marked with the `X-Replayed: true` header.

## Request body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `names` | array of string | yes | The names to check, one per line, such as shop.example.com. |
| `fresh` | boolean | no | Skip the cache and ask the source again; costs the same. |

## Response

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `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.name` | string | yes |  |
| `data.unicode` | string | yes |  |
| `data.exists` | boolean | yes |  |
| `data.cname_chain` | array of object | yes |  |
| `data.cname_chain.name` | string | yes |  |
| `data.cname_chain.target` | string | yes |  |
| `data.cname_chain.ttl` | integer | yes |  |
| `data.final_target` | string | yes |  |
| `data.final_status` | "ok" | "nxdomain" | "nodata" | "failed" | yes |  |
| `data.addresses` | array of string | yes |  |
| `data.provider` | object or null | no |  |
| `data.evidence` | object or null | no |  |
| `data.delegation` | object or null | no |  |
| `data.risk` | "high" | "medium" | "low" | "none" | "unknown" | yes | high: looks claimable now; medium: may be; low: broken but not claimable |
| `data.min_ttl` | integer or null | no |  |

## 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`)
- `502` Every upstream source failed; not charged (`source_unavailable`). A Retry-After header says how long to wait when the source asked us to

## Example

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

```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/dangling", json={})
response.raise_for_status()
result = response.json()
print(result["summary"], result["credits_used"])
```

```ts
const response = await fetch("https://api.dnssuper.com/v1/dangling", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.DNSSUPER_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
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
{
  "tool": "subdomain-takeover-check",
  "target": "shop.example.com",
  "status": "ok",
  "fetched_at": "2026-11-14T10:00:00Z",
  "cached": false,
  "credits_used": 1,
  "summary": "shop.example.com looks like it could be taken over: GitHub Pages says it has no site for this name.",
  "findings": [
    {
      "id": "dangling.service_unclaimed",
      "severity": "fail",
      "title": "This name points to a service where it looks unclaimed",
      "detail": "shop.example.com points to GitHub Pages, and its page says \"There isn't a GitHub Pages site here.\" (HTTP 404). The name looks unclaimed at the service, so someone else could claim it.",
      "fix": "Remove the DNS record now, or set the name up again in your account at that service."
    }
  ],
  "data": {
    "name": "shop.example.com",
    "unicode": "shop.example.com",
    "exists": true,
    "cname_chain": [
      {
        "name": "shop.example.com",
        "target": "gone-user.github.io",
        "ttl": 300
      }
    ],
    "final_target": "gone-user.github.io",
    "final_status": "ok",
    "addresses": [
      "185.199.108.153"
    ],
    "provider": {
      "id": "github-pages",
      "name": "GitHub Pages",
      "takeover": "possible"
    },
    "evidence": {
      "kind": "http",
      "http_status": 404,
      "matched": "There isn't a GitHub Pages site here."
    },
    "risk": "high",
    "min_ttl": 300
  },
  "credits_remaining": 498
}
```

## MCP

```json
{
  "tool": "check_dangling_records",
  "arguments": {}
}
```

```text
shop.example.com looks like it could be taken over: GitHub Pages says it has no site for this name.
Risk: high (GitHub Pages)
Chain: shop.example.com -> gone-user.github.io
Evidence: the page says "There isn't a GitHub Pages site here." (HTTP 404)
- fail: This name points to a service where it looks unclaimed. Fix: Remove the DNS record now, or set the name up again in your account at that service.
Credits: 1 credit used, 498 remaining | fresh | checked 2026-11-14 10:00 UTC
```
