# Robots.txt AI Crawler Auditor (`xtracto/robots-txt-auditor`) Actor

Audit which AI crawlers a site allows — GPTBot, ClaudeBot, PerplexityBot, CCBot, Google-Extended and more. Parses robots.txt per RFC 9309, reads Content-Signal, and detects llms.txt. Keyless, HTTP-only.

- **URL**: https://apify.com/xtracto/robots-txt-auditor.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.67 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Robots.txt AI Crawler Auditor

Find out which AI crawlers a website allows. Give it a list of domains and get one row per domain showing exactly what its `robots.txt` permits for GPTBot, ClaudeBot, PerplexityBot, CCBot, Google-Extended, Applebot-Extended, Bytespider and 15 more AI agents, plus the site's `Content-Signal` declaration and whether it publishes an `llms.txt`.

### Why use this actor

- **No account, no login, no API key.** Paste domains and run.
- **22 known AI crawlers checked out of the box**, and you can add any other user-agent.
- **A one-word verdict per site** (`aiStance`) that is easy to filter and chart across hundreds of domains.
- **The exact rule behind every verdict**, so you can see why an agent is blocked or allowed.
- **AI-policy files included:** `Content-Signal`, `License:` links, `llms.txt`, `llms-full.txt` and `ai.txt`.
- **Stable JSON output** for spreadsheets and dashboards. Export to JSON, CSV or Excel, and schedule regular audits on Apify.

### How it works

1. Enter the domains you want to audit (a full URL works too; only the host is used).
2. The actor reads each site's `robots.txt` and applies the official matching rules (RFC 9309) for every AI agent.
3. It works out the verdict for the path you choose, by default `/` ("may this agent crawl the site at all").
4. Optionally it checks for `llms.txt` and `ai.txt` files.
5. You get one row per domain with the verdicts, the rules that decided them and the site's other directives.

You do not need to manage scrapers, browsers or blocks.

### Input

```json
{
  "domains": ["nytimes.com", "reddit.com"],
  "agents": [],
  "testPath": "/",
  "checkAiPolicyFiles": true,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

| Field | Type | Description |
|---|---|---|
| `domains` | array | One domain per line. A full URL also works. |
| `agents` | array | Leave empty to audit the 22 known AI crawlers. Add any user-agent string to check it too. |
| `testPath` | string | The path the allow/deny verdict is computed for. `/` means the whole site; use e.g. `/blog/` to check one section. |
| `checkAiPolicyFiles` | boolean | Also look for `/llms.txt`, `/llms-full.txt`, `/ai.txt` and `/.well-known/ai.txt`. |
| `proxyConfiguration` | object | Optional. A few hosts refuse data-centre addresses. |

### Output

One row per domain. Real output for `nytimes.com` (long lists shortened):

```json
{
  "_input": "nytimes.com",
  "_source": "S1-robots",
  "_scrapedAt": "2026-11-11T13:12:20Z",
  "domain": "nytimes.com",
  "robotsUrl": "https://nytimes.com/robots.txt",
  "robotsBytes": 8826,
  "groupCount": 70,
  "lineCount": 385,
  "aiStance": "blocks-some-ai",
  "namedAiAgents": ["GPTBot", "ChatGPT-User", "OAI-SearchBot", "… 17 more"],
  "blockedAiAgents": ["Applebot-Extended", "Bytespider", "CCBot", "… 16 more"],
  "allowedAiAgents": ["AI2Bot", "Amazonbot", "Webzio-Extended"],
  "partiallyRestrictedAgents": ["Amazonbot"],
  "agentRestrictedPaths": {
    "GPTBot": ["/"],
    "Amazonbot": ["/wirecutter/"],
    "… 18 more": []
  },
  "agentVerdicts": {
    "GPTBot": { "verdict": "disallowed", "via": "named", "rule": "Disallow: /" },
    "Amazonbot": { "verdict": "allowed", "via": "named", "rule": null },
    "AI2Bot": { "verdict": "allowed", "via": "wildcard", "rule": null },
    "… 19 more": {}
  },
  "contentSignal": null,
  "licenseUrls": [],
  "crawlDelay": null,
  "sitemapUrls": [
    "https://www.nytimes.com/sitemaps/new/news.xml.gz",
    "https://www.nytimes.com/sitemaps/new/sitemap.xml.gz",
    "… 23 more"
  ],
  "otherDirectives": [],
  "hasLlmsTxt": false,
  "llmsTxtTitle": null,
  "llmsTxtBytes": null,
  "hasLlmsFullTxt": false,
  "hasAiTxt": false
}
```

The same run for `reddit.com` returned `"aiStance": "blocks-all-crawlers"`, with all 22 agents blocked by a blanket `User-agent: *` / `Disallow: /` rule (`"via": "wildcard"`) and no AI agent named.

| Field | Type | Description |
|---|---|---|
| `domain`, `robotsUrl` | string | The audited host and the file that was read |
| `robotsBytes`, `groupCount`, `lineCount` | number | Size of the file, number of rule groups and lines |
| `aiStance` | string | One-word summary: `blocks-all-named-ai`, `blocks-some-ai`, `names-ai-and-allows`, `blocks-all-crawlers`, `silent-on-ai`, or a `signals-*` value when `Content-Signal` is present |
| `namedAiAgents` | array | AI agents the site names explicitly |
| `blockedAiAgents`, `allowedAiAgents` | array | The verdict at `testPath` |
| `partiallyRestrictedAgents` | array | Allowed at `testPath` but fenced out of some other section |
| `agentRestrictedPaths` | object | The `Disallow` patterns for each named agent |
| `agentVerdicts` | object | Per agent: `verdict`, `via` (`named` group or `wildcard`) and the exact `rule` that decided it |
| `contentSignal` | object | Parsed `Content-Signal`, e.g. `{"ai-train": "yes", "search": "yes"}` |
| `licenseUrls` | array | Any `License:` links |
| `crawlDelay` | number | `Crawl-delay`, if set |
| `sitemapUrls` | array | `Sitemap:` links |
| `otherDirectives` | array | Any other non-standard lines |
| `hasLlmsTxt`, `llmsTxtTitle`, `llmsTxtBytes`, `hasLlmsFullTxt`, `hasAiTxt` | boolean / string / number | AI-policy files found outside `robots.txt` |
| `_input`, `_source`, `_scrapedAt` | string | What you entered, the data source and the time of the check |
| `_error` | string | Only on failures: `no_robots_txt` (404, nothing restricted), `robots_not_text` (the site answered with an HTML page) or `robots_unreachable` |

### Notes and limits

- **A verdict is about one path.** The New York Times names `Amazonbot` with only `Disallow: /wirecutter/`, so it is allowed at `/` but listed in `partiallyRestrictedAgents`.
- **Matching follows RFC 9309.** An agent follows its own group if named, otherwise `*`; the longest matching rule wins, `Allow` beats `Disallow` on a tie, and `*` and `$` patterns are honoured.
- **`Content-Signal` is reported separately** from allow/deny, because it states intent (for example `ai-train=yes`) that no `Disallow` rule can express.
- **Naming no AI agent is not the same as allowing them.** A site that blocks every crawler reports `blocks-all-crawlers`, not `silent-on-ai`.
- **An `llms.txt` or `ai.txt` must be a real text file to count.** Sites that answer every path with their app page are not reported as having one.
- **Related:** Sitemap Crawler turns the `sitemapUrls` reported here into a site's full URL list.

# Actor input Schema

## `domains` (type: `array`):

One domain per line. A full URL works too — only the host is used.

## `agents` (type: `array`):

Leave empty to audit the 22 known AI crawlers. Add any user-agent string to check it too.

## `testPath` (type: `string`):

Which path the allow/deny verdict is computed for. '/' answers "may this agent crawl the site at all"; use e.g. /blog/ to check one section.

## `checkAiPolicyFiles` (type: `boolean`):

Looks for /llms.txt, /llms-full.txt, /ai.txt and /.well-known/ai.txt. Existence is judged on content type and an HTML sniff, because some sites answer 200 with their app shell for any path.

## `proxyConfiguration` (type: `object`):

Optional. A few hosts refuse datacentre addresses or answer bots with odd status codes.

## Actor input object example

```json
{
  "domains": [
    "nytimes.com",
    "cloudflare.com",
    "apify.com",
    "reddit.com"
  ],
  "agents": [],
  "testPath": "/",
  "checkAiPolicyFiles": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

One row per scraped record, stored in the run's default dataset.

# 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 = {
    "domains": [
        "nytimes.com",
        "cloudflare.com",
        "apify.com",
        "reddit.com"
    ],
    "agents": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/robots-txt-auditor").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 = {
    "domains": [
        "nytimes.com",
        "cloudflare.com",
        "apify.com",
        "reddit.com",
    ],
    "agents": [],
}

# Run the Actor and wait for it to finish
run = client.actor("xtracto/robots-txt-auditor").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 '{
  "domains": [
    "nytimes.com",
    "cloudflare.com",
    "apify.com",
    "reddit.com"
  ],
  "agents": []
}' |
apify call xtracto/robots-txt-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xtracto/robots-txt-auditor"
        }
    }
}
```

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/uU3gTCIFiPV3Tb5sU/builds/O2Tox0FczbVQtCfCD/openapi.json
