# Robots.txt Checker – AI Crawler Policy & URL Tester (`adamplaenitz/robots-txt-checker`) Actor

Fetch and parse robots.txt for many sites: test URLs for Googlebot, Bingbot, GPTBot, ClaudeBot and other crawlers with Google/RFC 9309 matching, see which AI crawlers are blocked, sitemaps, crawl-delay, rule groups and syntax warnings.

- **URL**: https://apify.com/adamplaenitz/robots-txt-checker.md
- **Developed by:** [Adam Plänitz](https://apify.com/adamplaenitz) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 site checkeds

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

## Robots.txt Checker – AI Crawler Policy & URL Tester

**Fetch and analyse the robots.txt of many websites at once: which AI crawlers (GPTBot, ClaudeBot, Google-Extended, PerplexityBot, CCBot …) are blocked, whether specific URLs are allowed for Googlebot, Bingbot or any other crawler – with the exact rule that decides – plus sitemaps, crawl-delay, rule groups and syntax warnings.** Matching follows RFC 9309 and Google's robots.txt rules (longest match, `*` and `$` wildcards, Allow wins ties). Export as JSON, CSV or Excel, or connect to Google Sheets, Slack, Make, Zapier, n8n or webhooks.

### What does it do?

For every site in your list the Actor downloads `/robots.txt` (following up to 5 redirects, like Google) and reports:

- **Fetch result:** HTTP status, final URL, redirects, size, content type, and the **effect** crawlers apply: `rules-apply` (2xx), `allow-all` (404 and other 4xx – no restrictions), `disallow-all` (5xx / 429 – robots.txt unavailable).
- **AI crawler policy** for 28 known AI crawlers and control tokens – OpenAI (GPTBot, OAI-SearchBot, ChatGPT-User), Anthropic (ClaudeBot, Claude-SearchBot, Claude-User, anthropic-ai), Google-Extended, Applebot-Extended, Perplexity, Common Crawl (CCBot), Meta, ByteDance (Bytespider), Amazonbot, Cohere, Mistral, DuckAssistBot and more. For each bot: `blocked`, `partially-restricted` (home page allowed, some paths blocked) or `allowed`, whether it is **named explicitly** or only covered by `User-agent: *`, plus a one-line summary such as `blocks all known AI crawlers`, `blocks AI training crawlers`, `blocks some AI crawlers` or `allows AI crawlers`.
- **AI usage signals:** Cloudflare `Content-Signal` lines (`search`, `ai-input`, `ai-train`) and emerging directives such as RSL `License`, `Content-Usage` and `DisallowAITraining`.
- **URL tests:** every path × user agent combination you enter – `allowed` true/false, the matched group (`gptbot` or `*`), the deciding rule (`Disallow: /search`) with its line number and a plain-English reason.
- **Structure:** sitemaps listed in the file, crawl-delay per user agent, number of groups and rules, all user agents named, whether `User-agent: *` blocks everything, and a summary of every group (first 50 rules each).
- **Syntax warnings** with line numbers: rules before any user-agent line, misspelled directives (`Dissallow`), missing colons, unknown or non-standard directives (`Host`, `Clean-param`, `Noindex`), paths that never match, relative sitemap URLs, empty groups, HTML instead of plain text, files larger than Google's 500 KiB limit, 401/403 responses, cross-host redirects and more.
- **Optional:** the full robots.txt text.
- **Monitoring mode:** only output sites where at least one tested combination is blocked – e.g. schedule a weekly run to learn when a site starts blocking your crawler.

### Who is it for?

- **SEO specialists and agencies:** check that important URLs are crawlable for Googlebot and Bingbot across many client sites, find syntax errors and missing sitemaps.
- **AI, data and scraping teams:** check before crawling whether a site allows your bot (or GPTBot, ClaudeBot, CCBot …) for the URLs you need.
- **Publishers, media researchers and journalists:** survey which sites block AI training or AI search crawlers.
- **Website owners and developers:** verify a new robots.txt before and after deployment.

### Input

| Field | Default | Description |
|---|---|---|
| Websites | – | Domains, hosts or any URL; the origin's `/robots.txt` is checked. Bare domains use https with a fallback to http. |
| User agents to test | Googlebot, Bingbot, GPTBot, ClaudeBot, CCBot, PerplexityBot, Google-Extended, Applebot-Extended | Product tokens (up to 50). |
| URL paths to test | `/` | Paths with optional query, or full URLs (up to 100). |
| AI crawler policy | on | Adds the AI crawler summary. |
| Only output sites with blocked test paths | off | Monitoring mode; other sites are not stored and not charged. |
| Include the robots.txt text | off | Adds the field `robotsTxt`. |
| User-Agent header for fetching | `robots-txt-checker/0.1 (Apify Actor; robots.txt checker)` | Some sites answer unknown clients with 403/418 or a different file. |
| Parallel sites | 10 | 1–50. |
| Timeout per request | 15 s | 3–60 s. |

### Output example (shortened)

```json
{
  "input": "www.theguardian.com",
  "site": "https://www.theguardian.com",
  "httpStatus": 200,
  "fetchStatus": "ok",
  "effect": "rules-apply",
  "sizeBytes": 2873,
  "groupCount": 3,
  "ruleCount": 49,
  "userAgentsListed": ["*", "Mediapartners-Google", "NewsNow", "CCBot", "…"],
  "blocksAllCrawlers": false,
  "sitemaps": ["http://www.theguardian.com/sitemaps/news.xml", "http://www.theguardian.com/sitemaps/video.xml"],
  "crawlDelays": {},
  "contentSignals": [],
  "otherAiSignals": [{ "directive": "license", "value": "https://theguardian.com/license.xml", "line": 104 }],
  "aiPolicy": "blocks some AI crawlers",
  "aiTrainingBotsBlocked": "7/15",
  "aiBotsBlocked": ["ClaudeBot", "Claude-SearchBot", "Claude-User", "anthropic-ai", "Applebot-Extended", "PerplexityBot", "CCBot", "Meta-ExternalAgent", "…"],
  "aiBotsAllowed": ["GPTBot", "OAI-SearchBot", "ChatGPT-User", "Google-Extended", "…"],
  "aiCrawlers": [
    { "bot": "GPTBot", "operator": "OpenAI", "purpose": "training", "status": "partially-restricted", "explicitlyNamed": false, "matchedGroup": "*", "matchedRule": null },
    "…"
  ],
  "pathTests": [
    { "userAgent": "Googlebot", "path": "/", "allowed": true, "matchedGroup": "*", "matchedRule": null, "matchedLine": null, "reason": "No rule matches – allowed by default." },
    { "userAgent": "Googlebot", "path": "/search?q=test", "allowed": false, "matchedGroup": "*", "matchedRule": "Disallow: /search", "matchedLine": 32, "reason": "Disallow rule matches." },
    "…"
  ],
  "blockedPathTests": 16,
  "warningCount": 2,
  "warnings": [
    { "line": 104, "code": "nonstandard-directive", "message": "License (RSL – Really Simple Licensing) is an emerging AI-licensing directive; it is not part of RFC 9309 and ignored by Google.", "occurrences": 1 },
    { "line": 59, "code": "empty-group", "message": "The group for \"Mediapartners-Google\" has no rules (everything allowed for it)." }
  ],
  "groups": [
    { "userAgents": ["*"], "allowRules": 0, "disallowRules": 48, "blocksAll": false, "crawlDelay": null, "rules": ["Disallow: /sendarticle/", "Disallow: /Users/", "…"], "line": 9 },
    "…"
  ],
  "timeMs": 32,
  "checkedAt": "2026-11-17T21:11:12.670Z",
  "error": null
}
```

The **Overview** table shows site, HTTP status, fetch status, effect, AI policy, blocked AI bots, blocked tests, sitemaps, groups, rules, crawl-delay and warnings. The key-value store record `RUN-SUMMARY` contains counts per fetch status and AI policy, error codes and charged results.

### Matching rules

- A crawler obeys the group(s) whose `User-agent` equals its product token (case-insensitive, text after `/` or a space is ignored); groups for the same token are merged. Without such a group it obeys `User-agent: *`; without that, everything is allowed.
- The **longest matching pattern** wins; if an Allow and a Disallow pattern have the same length, **Allow wins**. `*` matches any characters, `$` at the end anchors the pattern. No matching rule = allowed. `/robots.txt` itself is always allowed.
- Paths and patterns are compared after percent-encoding non-ASCII characters (`/ä` = `/%C3%A4`); matching is case-sensitive.
- Like Google, common typos (`Dissallow`, `User agent`) and missing colons are accepted but reported.
- Specific crawlers do **not** inherit from related names: `Googlebot-News` without its own group uses `*`, not `Googlebot` (RFC 9309 behaviour; Google's own crawlers may have additional fallbacks).
- Product tokens may contain letters, digits, `-`, `_` and `.` (RFC 9309 only allows letters, `-` and `_`, but tokens such as `MJ12bot` are common).

### Pricing and speed

See the **Pricing** tab. You pay per **checked site** – any site whose server answered (including 404 "no robots.txt", which is a valid result). **Unreachable sites (DNS error, timeout, connection refused) and invalid inputs are free**, and in monitoring mode sites without blocked tests are not charged either. Duplicates are removed before checking.

One request per site (plus redirects). In a cloud test, the Tranco top 300 domains took about 45 seconds with the default 10 parallel sites and 256 MB memory; unreachable hosts wait for the timeout. You can set a maximum cost per run – the Actor stops cleanly when it is reached.

### How it works, privacy and responsible use

- Only `/robots.txt` is requested – no other page of the site is crawled. The Actor identifies itself with its own User-Agent by default.
- robots.txt is a public file intended to be read by automated clients. No personal data is processed or stored.
- The AI crawler list is curated from the operators' public documentation; tokens and purposes change, so check the operators' pages for authoritative details. Not affiliated with Google, OpenAI, Anthropic or any other crawler operator.
- robots.txt is a **voluntary** convention: a "blocked" result shows what the site asks for, not what a crawler actually does.
- Private, loopback and internal addresses/host names are refused.

### Limits

- The result reflects what this Actor receives. Sites with bot protection may return 403/418/429 or a different file to unknown clients (a warning is added); you can change the fetch User-Agent.
- When robots.txt is unavailable (5xx), Google may use a cached copy for up to 30 days; this Actor reports the RFC 9309 rule (complete disallow).
- Only the first 500 KiB of a robots.txt are parsed (Google's limit). Group summaries list up to 50 rules per group (counts are always complete); up to 100 warnings per file.
- Meta robots tags, `X-Robots-Tag` headers and `ai.txt`/`llms.txt` files are not checked.

Questions or feature requests? Please open an issue in the **Issues** tab.

# Actor input Schema

## `sites` (type: `array`):

One entry per line: domain (example.com), host (www.example.com) or any URL of the site. The robots.txt of the origin (scheme + host + port) is checked; bare domains use https:// with a fallback to http://. Duplicates are removed.

## `userAgents` (type: `array`):

Crawler product tokens to test the paths below with, e.g. Googlebot, Bingbot, GPTBot, ClaudeBot, CCBot, PerplexityBot, Google-Extended, Applebot-Extended. Matching follows RFC 9309: the crawler's own group if present, otherwise the \* group. Leave empty for these 8 defaults.

## `testPaths` (type: `array`):

Paths (with optional query string) or full URLs to test against every user agent, e.g. /, /search?q=test, /wp-admin/. Each result shows allowed / blocked and the deciding rule (longest match wins, \* and $ wildcards, Allow wins ties). Leave empty to test only /.

## `checkAiCrawlers` (type: `boolean`):

Adds a summary of which of 28 known AI crawlers (GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-SearchBot, Google-Extended, Applebot-Extended, PerplexityBot, CCBot, Meta-ExternalAgent, Bytespider, Amazonbot …) are blocked or allowed for the home page /.

## `onlyBlocked` (type: `boolean`):

Monitoring mode: only output sites where at least one tested user agent / path combination is blocked. Other sites are counted in the run summary but not stored and not charged.

## `includeRobotsTxt` (type: `boolean`):

Adds the full robots.txt content (up to 500 KiB) to every item in the field robotsTxt.

## `fetchUserAgent` (type: `string`):

User-Agent header sent when downloading robots.txt. Default: robots-txt-checker/0.1 (Apify Actor; robots.txt checker). Some sites return different files or 403 for unknown clients.

## `concurrency` (type: `integer`):

How many sites are checked at the same time (1–50). Only one request (plus redirects) is made per site.

## `timeoutSecs` (type: `integer`):

Maximum time for each HTTP request (3–60 s).

## Actor input object example

```json
{
  "sites": [
    "www.nytimes.com",
    "github.com",
    "en.wikipedia.org",
    "www.theguardian.com",
    "apify.com"
  ],
  "userAgents": [
    "Googlebot",
    "Bingbot",
    "GPTBot",
    "ClaudeBot",
    "CCBot",
    "PerplexityBot",
    "Google-Extended",
    "Applebot-Extended"
  ],
  "testPaths": [
    "/",
    "/search?q=test",
    "/api/"
  ],
  "checkAiCrawlers": true,
  "onlyBlocked": false,
  "includeRobotsTxt": false,
  "concurrency": 10,
  "timeoutSecs": 15
}
```

# Actor output Schema

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

One item per site with fetch status, AI crawler policy, path tests, sitemaps, groups and warnings.

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

Counts per fetch status and AI policy, errors and charged results.

# 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 = {
    "sites": [
        "www.nytimes.com",
        "github.com",
        "en.wikipedia.org",
        "www.theguardian.com",
        "apify.com"
    ],
    "userAgents": [
        "Googlebot",
        "Bingbot",
        "GPTBot",
        "ClaudeBot",
        "CCBot",
        "PerplexityBot",
        "Google-Extended",
        "Applebot-Extended"
    ],
    "testPaths": [
        "/",
        "/search?q=test",
        "/api/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("adamplaenitz/robots-txt-checker").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 = {
    "sites": [
        "www.nytimes.com",
        "github.com",
        "en.wikipedia.org",
        "www.theguardian.com",
        "apify.com",
    ],
    "userAgents": [
        "Googlebot",
        "Bingbot",
        "GPTBot",
        "ClaudeBot",
        "CCBot",
        "PerplexityBot",
        "Google-Extended",
        "Applebot-Extended",
    ],
    "testPaths": [
        "/",
        "/search?q=test",
        "/api/",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("adamplaenitz/robots-txt-checker").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 '{
  "sites": [
    "www.nytimes.com",
    "github.com",
    "en.wikipedia.org",
    "www.theguardian.com",
    "apify.com"
  ],
  "userAgents": [
    "Googlebot",
    "Bingbot",
    "GPTBot",
    "ClaudeBot",
    "CCBot",
    "PerplexityBot",
    "Google-Extended",
    "Applebot-Extended"
  ],
  "testPaths": [
    "/",
    "/search?q=test",
    "/api/"
  ]
}' |
apify call adamplaenitz/robots-txt-checker --silent --output-dataset

```

## MCP server setup

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

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/Cx6GUa9bi7Pnpe6tO/builds/IL5xW69IAtEMoSsq2/openapi.json
