# WCAG Accessibility Audit Crawler (`chosen_loafer/a11y-audit-actor`) Actor

Crawls a list of URLs (or a start URL up to a depth/page limit) and runs an axe-core WCAG audit on each page, returning only rule violations: no page text, no form data, no cookies.

- **URL**: https://apify.com/chosen_loafer/a11y-audit-actor.md
- **Developed by:** [Pavel Staurouski](https://apify.com/chosen_loafer) (community)
- **Categories:** Developer tools, SEO tools, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 audited pages

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## WCAG Accessibility Audit Crawler

Scans a list of URLs (or crawls from one start URL) and runs a full axe-core WCAG 2.1 AA
audit on each page.

### What you get

One record per audited page, containing only the accessibility rule violations found:
rule ID, impact level (critical/serious/moderate/minor), a human-readable description,
a link to the official rule documentation, how many elements are affected, and CSS
selectors pointing to them.

### What it does not do

No screenshots, no page text, no form data, no cookies. Output is limited to the rule
violations themselves, so it's safe to point at pages that contain sensitive or personal
content — this Actor never reads or stores it.

### Why you might need this

The European Accessibility Act's compliance deadline (28 June 2025) has already passed.
EU member states can now fine non-compliant private-sector sites (e-commerce, banking,
transport) and exclude them from public contracts that require a WCAG 2.1 AA conformance
statement. A one-off manual audit goes stale the moment a developer ships the next
redesign; agencies and in-house teams responsible for ongoing compliance need a
recurring, automatable check they can run on every deploy or on a schedule, not a
point-in-time report.

### Input

A list of URLs, or a single start URL with a crawl depth and page limit.

```json
{
  "startUrls": [{ "url": "https://example.com/" }],
  "maxPages": 20
}
```

### Sample output

One real record (this Actor's own axe-core scan, run against its test fixture,
`test/fixtures/broken.html`, through its own `buildPageRecord()` field mapping; a live run
reports the real page URL you gave it, and whatever violations and selectors axe-core finds
on that page's own markup):

```json
{
  "url": "https://example.com/contact",
  "auditedAt": "2026-10-13T20:33:05.273Z",
  "violationCount": 2,
  "violations": [
    {
      "id": "image-alt",
      "impact": "critical",
      "description": "Images must have alternative text",
      "helpUrl": "https://dequeuniversity.com/rules/axe/4.13/image-alt?application=playwright",
      "nodeCount": 1,
      "selectors": ["img"]
    },
    {
      "id": "label",
      "impact": "critical",
      "description": "Form elements must have labels",
      "helpUrl": "https://dequeuniversity.com/rules/axe/4.13/label?application=playwright",
      "nodeCount": 1,
      "selectors": ["input"]
    }
  ]
}
```

A page that fails to load (navigation timeout, DNS failure, and similar) pushes a
different-shaped record instead, `{ "url", "auditedAt", "error" }`, with no `violations`
key at all -- it never pushes a record with `"error": null` alongside a `violations` array.

### Pricing

Pay per run started, plus per page audited. See the Pricing tab for exact rates.

# Actor input Schema

## `startUrls` (type: `array`):

List of URLs to audit directly. Use this for a fixed set of pages.

## `startUrl` (type: `string`):

Single URL to start a same-domain crawl from. Ignored if startUrls is non-empty.

## `maxCrawlDepth` (type: `integer`):

How many link-hops from startUrl to follow. 0 audits only startUrl.

## `maxPages` (type: `integer`):

Hard cap on number of pages audited in this run, regardless of mode.

## `wcagTags` (type: `array`):

axe-core tags to run, e.g. wcag2a, wcag2aa, wcag21aa.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://example.com/"
    }
  ],
  "maxCrawlDepth": 0,
  "maxPages": 20,
  "wcagTags": [
    "wcag2a",
    "wcag2aa",
    "wcag21aa"
  ]
}
```

# Actor output Schema

## `auditResults` (type: `string`):

Per-page WCAG violation records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("chosen_loafer/a11y-audit-actor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("chosen_loafer/a11y-audit-actor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call chosen_loafer/a11y-audit-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,chosen_loafer/a11y-audit-actor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Ylj1h28iNCZpSbZME/builds/pd0ETshomDrWZk6jU/openapi.json
