# Accessibility Audit — Whole Site (`moonweil/accessibility-scanner`) Actor

Crawl an entire website and check every page against WCAG 2.1 A and AA. Get a per-page accessibility score, the failing elements with fix guidance, and a site-wide ranking of which rules break the most pages, so you fix one template and clear dozens of pages.

- **URL**: https://apify.com/moonweil/accessibility-scanner.md
- **Developed by:** [Aleksandr Jelohhin](https://apify.com/moonweil) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.00 / 1,000 page scanneds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Accessibility Audit — Whole Site, WCAG 2.1 AA

Crawl an entire website and check **every page** for accessibility problems
against WCAG 2.1 level A and AA. For each page you get a score, the specific
violations with the elements that fail and how to fix them, and — the part that
saves you the most time — a **site-wide ranking of which rules break the most
pages**, so you fix one component or template and clear the issue everywhere.

Runs on demand, on a schedule, or from the API. No setup, no API keys.

### What you get

**Per page** (dataset row):

```json
{
  "url": "https://example.com/pricing",
  "score": 76,
  "hasViolations": true,
  "counts": { "critical": 0, "serious": 3, "moderate": 7, "minor": 2 },
  "passes": 84,
  "violations": [
    { "id": "color-contrast", "impact": "serious",
      "help": "Elements must meet minimum contrast ratio thresholds",
      "helpUrl": "https://...", "wcagTags": ["wcag2aa", "wcag143"],
      "targets": ["main > .card:nth-child(2) > a"] }
  ]
}
```

**Whole site** (`SUMMARY` in the key-value store):

```json
{
  "pagesScanned": 54,
  "pagesWithViolations": 21,
  "criticalViolations": 2,
  "seriousViolations": 28,
  "mostCommonRules": [
    { "rule": "color-contrast", "affectedPages": 14 },
    { "rule": "link-name", "affectedPages": 9 }
  ]
}
```

### Input

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

Optionally restrict to specific WCAG rule tags, cap the crawl, or exclude URL
patterns.

### Use it for

- A full-site accessibility audit before a compliance deadline (EAA, ADA, Section 508)
- Prioritising remediation work by impact and reach
- Regression testing in CI — fail the build if new critical issues appear
- Auditing many client sites from the API

### How it works

Each page is opened in a real browser and evaluated with an industry-standard
rules engine, so dynamic content, ARIA state and computed styles are all checked —
not just the raw HTML.

### Pricing

Pay per page scanned. Unreachable pages are not charged.

# Actor input Schema

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

URLs to scan / start crawling from.

## `crawl` (type: `boolean`):

Follow same-domain links from the start URLs.

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

Hard limit on the number of pages processed. Protects compute cost — the crawl stops once it is reached.

## `maxConcurrency` (type: `integer`):

How many pages to process in parallel.

## `sameDomainOnly` (type: `boolean`):

Restrict the crawl to the hostname of each start URL (www and apex are treated as equal).

## `includeSubdomains` (type: `boolean`):

Also follow links to subdomains of the start URL's registrable domain.

## `useSitemap` (type: `boolean`):

Seed the crawl from the site's /sitemap.xml (and /sitemap\_index.xml) in addition to the start URLs.

## `respectRobotsTxt` (type: `boolean`):

Skip URLs disallowed by the target site's robots.txt.

## `excludePatterns` (type: `array`):

Glob-style deny patterns for URLs to skip, e.g. /logout, /cart\*, \*.zip

## `runOnlyTags` (type: `array`):

Restrict the audit to these WCAG rule tags (e.g. wcag2a, wcag2aa, wcag21aa). Leave empty to run every check.

## `maxTargetsPerViolation` (type: `integer`):

Cap on the number of affected CSS selectors reported per accessibility violation.

## `navigationTimeoutSecs` (type: `integer`):

Per-page browser navigation timeout in seconds.

## `analyzerTimeoutSecs` (type: `integer`):

Timeout in seconds for a single analyzer on a single page. A slow analyzer fails that page's analyzer, not the run.

## `outputDetail` (type: `string`):

summary keeps the dataset compact; detailed includes the full analyzer evidence per page.

## `debug` (type: `boolean`):

Verbose logging. Also allows stack traces into the dataset.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "crawl": true,
  "maxPages": 100,
  "maxConcurrency": 5,
  "sameDomainOnly": true,
  "includeSubdomains": false,
  "useSitemap": false,
  "respectRobotsTxt": true,
  "excludePatterns": [],
  "runOnlyTags": [
    "wcag2a",
    "wcag2aa",
    "wcag21a",
    "wcag21aa",
    "best-practice"
  ],
  "maxTargetsPerViolation": 10,
  "navigationTimeoutSecs": 45,
  "analyzerTimeoutSecs": 60,
  "outputDetail": "detailed",
  "debug": false
}
```

# Actor output Schema

## `pages` (type: `string`):

One row per page: accessibility score, violation counts by impact (critical/serious/moderate/minor), pass and incomplete counts, and each failing rule with its WCAG tags, help text and the elements that fail.

## `summary` (type: `string`):

Pages scanned and pages with violations, total violations by impact, and a ranking of which rules break the most pages.

# 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 = {
    "startUrls": [
        {
            "url": "https://apify.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("moonweil/accessibility-scanner").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 = { "startUrls": [{ "url": "https://apify.com" }] }

# Run the Actor and wait for it to finish
run = client.actor("moonweil/accessibility-scanner").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 '{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ]
}' |
apify call moonweil/accessibility-scanner --silent --output-dataset

```

## MCP server setup

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

```

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/clENudnRbueFs6X6k/builds/wH8SVQ4368ZeyeIbE/openapi.json
