# Basic accessibility API

Run basic automated accessibility checks on a page, with an optional colour contrast check.

`GET /v1/accessibility`

- Price: Costs 2 credits per call; cached answers cost the same. Contrast mode costs 5 credits and runs as a job: reserved when it starts, charged when it finishes, and only 2 if the browser part fails. Calls that fail upstream (502) and 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: `audit_accessibility`

Basic automated accessibility checks of a page; optionally colour contrast and axe-core rules in a browser. Costs 2 credits per call; cached answers cost the same. Contrast mode costs 5 credits and runs as a job: reserved when it starts, charged when it finishes, and only 2 if the browser part fails. Calls that fail upstream (502) and 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. 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.

## Query parameters

| 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 |
| --- | --- | --- | --- |
| `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.mode` | "static" | "contrast" | yes |  |
| `data.disclaimer` | string | yes |  |
| `data.truncated` | boolean | yes |  |
| `data.counts` | object | yes |  |
| `data.headings` | array of object | yes |  |
| `data.instances` | object | yes |  |
| `data.axe` | object or null | 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`)
- `502` Every upstream source failed; not charged (`source_unavailable`). A Retry-After header says how long to wait when the source asked us to
- `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 "https://api.dnssuper.com/v1/accessibility?url=example.com" \
  -H "Authorization: Bearer $DNSSUPER_API_KEY"
```

```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.get("/v1/accessibility", params={
    "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/accessibility?${new URLSearchParams({"url":"example.com"})}`, {
  headers: { Authorization: `Bearer ${process.env.DNSSUPER_API_KEY}` },
});
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": "accessibility-checker",
  "target": "https://example.com/order",
  "status": "ok",
  "fetched_at": "2026-11-14T10:00:00Z",
  "cached": false,
  "credits_used": 2,
  "summary": "7 checks found problems on example.com/order. Automated checks find only some accessibility problems; this is a starting point, not a compliance certificate.",
  "findings": [
    {
      "id": "a11y.img_alt_missing",
      "severity": "fail",
      "title": "Images without alt text",
      "detail": "4 images have no text alternative.",
      "fix": "Add alt text; use alt=\"\" for decorative images."
    },
    {
      "id": "a11y.form_label_missing",
      "severity": "fail",
      "title": "Form fields without labels",
      "detail": "5 form fields have no label.",
      "fix": "Give each field a <label> or aria-label."
    },
    {
      "id": "a11y.link_name_missing",
      "severity": "fail",
      "title": "Links without text",
      "detail": "2 links have no text a screen reader can announce.",
      "fix": "Give each link text or an aria-label."
    },
    {
      "id": "a11y.button_name_missing",
      "severity": "fail",
      "title": "Buttons without text",
      "detail": "2 buttons have no text a screen reader can announce.",
      "fix": "Give each button text or an aria-label."
    },
    {
      "id": "a11y.duplicate_id_referenced",
      "severity": "warn",
      "title": "A referenced id is used more than once",
      "detail": "2 elements share an id that labels or controls refer to.",
      "fix": "Make ids unique."
    },
    {
      "id": "a11y.positive_tabindex",
      "severity": "warn",
      "title": "Elements use a positive tabindex",
      "detail": "1 elements have a tabindex above 0.",
      "fix": "Use tabindex 0 or -1 and the document order."
    },
    {
      "id": "a11y.frame_title_missing",
      "severity": "warn",
      "title": "A frame has no title",
      "detail": "1 frames have no title.",
      "fix": "Add a title to each iframe."
    }
  ],
  "data": {
    "url": "https://example.com/order",
    "final_url": "https://example.com/order",
    "status": 200,
    "mode": "static",
    "disclaimer": "Automated checks find only some accessibility problems; this is a starting point, not a compliance certificate.",
    "truncated": false,
    "counts": {
      "images": 4,
      "images_missing_alt": 4,
      "fields": 5,
      "unlabelled_fields": 5,
      "links": 2,
      "unnamed_links": 2,
      "buttons": 2,
      "unnamed_buttons": 2,
      "headings": 1
    },
    "headings": [
      {
        "level": 1,
        "text": "Order a widget"
      }
    ],
    "instances": {
      "a11y.img_alt_missing": [
        {
          "selector": "body > main > img",
          "snippet": "<img src=\"/images/blue.png\">"
        },
        {
          "selector": "body > main > p > a:nth-of-type(1) > img",
          "snippet": "<img src=\"/images/cart.png\">"
        },
        {
          "selector": "body > main > input",
          "snippet": "<input type=\"image\" src=\"/images/go.png\">"
        },
        {
          "selector": "body > main > div",
          "snippet": "<div role=\"img\" class=\"logo\">"
        }
      ],
      "a11y.form_label_missing": [
        {
          "selector": "body > main > form > input:nth-of-type(1)",
          "snippet": "<input type=\"text\" name=\"name\" placeholder=\"Your name\">"
        },
        {
          "selector": "input#email",
          "snippet": "<input id=\"email\" type=\"email\" name=\"email\">"
        },
        {
          "selector": "input#hint",
          "snippet": "<input id=\"hint\" type=\"checkbox\" aria-describedby=\"hint\">"
        },
        {
          "selector": "body > main > form > textarea",
          "snippet": "<textarea name=\"notes\">"
        },
        {
          "selector": "body > main > form > select",
          "snippet": "<select name=\"colour\">"
        }
      ],
      "a11y.link_name_missing": [
        {
          "selector": "body > main > p > a:nth-of-type(1)",
          "snippet": "<a href=\"/cart\">"
        },
        {
          "selector": "body > main > p > a:nth-of-type(2)",
          "snippet": "<a href=\"/help\">"
        }
      ],
      "a11y.button_name_missing": [
        {
          "selector": "body > main > form > button",
          "snippet": "<button type=\"submit\">"
        },
        {
          "selector": "body > main > form > div",
          "snippet": "<div role=\"button\" tabindex=\"3\">"
        }
      ],
      "a11y.duplicate_id_referenced": [
        {
          "selector": "span#hint",
          "snippet": "<span id=\"hint\">"
        },
        {
          "selector": "input#hint",
          "snippet": "<input id=\"hint\" type=\"checkbox\" aria-describedby=\"hint\">"
        }
      ],
      "a11y.positive_tabindex": [
        {
          "selector": "body > main > form > div",
          "snippet": "<div role=\"button\" tabindex=\"3\">"
        }
      ],
      "a11y.frame_title_missing": [
        {
          "selector": "body > main > iframe",
          "snippet": "<iframe src=\"https://www.example.org/embed\">"
        }
      ]
    }
  },
  "credits_remaining": 498
}
```

## With contrast on

`POST /v1/accessibility`

Costs 2 credits per call; cached answers cost the same. Contrast mode costs 5 credits and runs as a job: reserved when it starts, charged when it finishes, and only 2 if the browser part fails. Calls that fail upstream (502) and failed runs are free.

Request body with `contrast`:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | A page URL or a domain; a domain means its home page. |
| `contrast` | boolean | no | Also load the page in a headless browser and run axe-core, which adds colour contrast and more rules. Costs 5 credits and runs as a job. |
| `fresh` | boolean | no | Skip the cache and ask the source again; costs the same. |

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

```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/accessibility", json={
    "url": "example.com",
    "contrast": True,
})
response.raise_for_status()
result = response.json()
print(result["summary"], result["credits_used"])
```

```ts
const response = await fetch("https://api.dnssuper.com/v1/accessibility", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.DNSSUPER_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"url":"example.com","contrast":true}),
});
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 with `contrast`:

```json
{
  "job_id": "d91497b9-6183-589f-9d00-50d6766835d8",
  "status": "queued",
  "total": 1,
  "credits_reserved": 5,
  "duplicates_removed": 0,
  "job_url": "https://api.dnssuper.localhost/v1/jobs/d91497b9-6183-589f-9d00-50d6766835d8",
  "items_url": "https://api.dnssuper.localhost/v1/jobs/d91497b9-6183-589f-9d00-50d6766835d8/items",
  "events_url": "https://api.dnssuper.localhost/v1/jobs/d91497b9-6183-589f-9d00-50d6766835d8/events"
}
```

## MCP

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

```text
7 checks found problems on example.com/order. Automated checks find only some accessibility problems; this is a starting point, not a compliance certificate.
Images: 4 (4 without alt); fields: 5 (5 unlabelled); links: 2 (2 unnamed); buttons: 2 (2 unnamed)
Headings: 1
Image without alt: body > main > img <img src="/images/blue.png">
Field without label: body > main > form > input:nth-of-type(1) <input type="text" name="name" placeholder="Your name">
Link without a name: body > main > p > a:nth-of-type(1) <a href="/cart">
Automated checks find only some problems; this is a starting point, not a certificate.
- fail: Images without alt text. Fix: Add alt text; use alt="" for decorative images.
- fail: Form fields without labels. Fix: Give each field a <label> or aria-label.
- fail: Links without text. Fix: Give each link text or an aria-label.
- fail: Buttons without text. Fix: Give each button text or an aria-label.
+3 more findings (pass detail='full' to see all)
Credits: 2 credits used, 498 remaining | fresh | checked 2026-11-14 10:00 UTC
```
