# Robots.txt Checker & AI Crawler Blocking Audit (`klyve1/robots-txt-ai-crawler-checker`) Actor

Read the robots.txt of any list of websites: rules per user agent, sitemaps, crawl delay, and whether GPTBot, ClaudeBot, Google-Extended, CCBot, PerplexityBot and other AI crawlers are blocked.

- **URL**: https://apify.com/klyve1/robots-txt-ai-crawler-checker.md
- **Developed by:** [Nico Klyve](https://apify.com/klyve1) (community)
- **Categories:** SEO tools, 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 $1.00 / 1,000 website 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 Blocking Audit

Read the **robots.txt** of any list of websites and see at a glance **which AI crawlers are blocked**: GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Google-Extended, Applebot-Extended, PerplexityBot, CCBot, Meta-ExternalAgent, Bytespider, Amazonbot and more. You also get the sitemaps, crawl delay, rules per user agent, search engine access, an `llms.txt` check and allow or disallow tests for your own paths and bots.

### Who uses it

- **Publishers and SEO teams**: audit your sites and check that AI and search bots get the access you intend.
- **AI and data companies**: know which sources allow your crawler before you collect anything.
- **Researchers and journalists**: measure how many sites of a sector block AI training.
- **Scraping developers**: test whether a path is allowed for your user agent.

### Example output

```json
{
  "site": "https://www.nytimes.com",
  "statusCode": 200,
  "robotsTxtExists": true,
  "sitemaps": ["https://www.nytimes.com/sitemaps/new/news.xml.gz", "..."],
  "aiPolicy": "blocks some AI crawlers",
  "aiBlockedCount": 21,
  "blockedAiCrawlers": ["GPTBot", "OAI-SearchBot", "ChatGPT-User", "ClaudeBot", "Google-Extended", "PerplexityBot", "CCBot", "..."],
  "aiCrawlers": {
    "GPTBot": { "owner": "OpenAI (training)", "status": "blocked", "rule": "specific" },
    "Amazonbot": { "owner": "Amazon", "status": "partially blocked", "rule": "wildcard (*)" }
  },
  "searchEngines": { "Googlebot": "partially blocked", "Bingbot": "partially blocked" },
  "pathChecks": [
    { "userAgent": "*", "path": "/", "allowed": true },
    { "userAgent": "*", "path": "/search", "allowed": false }
  ],
  "llmsTxt": false,
  "issues": []
}
```

`blocked` means `/` is disallowed for that bot. `partially blocked` means the home page is allowed but some paths are disallowed. `rule` says whether the bot has its own group or falls back to `*`.

### Input

| Field | Description |
|---|---|
| Websites | Sites or URLs. One robots.txt per host. |
| Paths to test | Paths checked for `*` and your extra user agents. |
| Extra user agents | Your own bot names. |
| Check llms.txt | Look for `/llms.txt` (on by default). |
| Include raw robots.txt | Add the full file to each result. |

### Pricing

Pay per result: **$0.001 per website** whose robots.txt could be checked. Unreachable sites are free.

### Good to know

- Matching follows RFC 9309 (Google's rules): the most specific user agent group wins, the longest matching path wins, and `Allow` wins ties.
- A missing robots.txt (404) means everything is allowed. A 5xx error is reported as an error, crawlers then usually treat the site as disallowed.
- robots.txt is a request, not a technical block: it says what the site owner wants.

# Actor input Schema

## `urls` (type: `array`):

Websites or any of their URLs, one per line. Only the robots.txt at the root of each host is read.

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

URL paths to test against the rules, for example /blog/ or /search?q=. Default: /.

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

Your own crawler names (or any bot) to test against the paths above, in addition to the wildcard \*.

## `checkLlmsTxt` (type: `boolean`):

Also check whether the site publishes an /llms.txt file for AI assistants.

## `includeRawRobotsTxt` (type: `boolean`):

Add the full robots.txt text to each result.

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

How many websites are checked at the same time.

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

Time to wait for each robots.txt.

## Actor input object example

```json
{
  "urls": [
    "https://www.nytimes.com",
    "https://www.lemonde.fr",
    "https://apify.com",
    "https://github.com"
  ],
  "checkLlmsTxt": true,
  "includeRawRobotsTxt": false,
  "concurrency": 5,
  "timeoutSecs": 15
}
```

# Actor output Schema

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

All rows produced by the run.

# 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 = {
    "urls": [
        "https://www.nytimes.com",
        "https://www.lemonde.fr",
        "https://apify.com",
        "https://github.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("klyve1/robots-txt-ai-crawler-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 = { "urls": [
        "https://www.nytimes.com",
        "https://www.lemonde.fr",
        "https://apify.com",
        "https://github.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("klyve1/robots-txt-ai-crawler-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 '{
  "urls": [
    "https://www.nytimes.com",
    "https://www.lemonde.fr",
    "https://apify.com",
    "https://github.com"
  ]
}' |
apify call klyve1/robots-txt-ai-crawler-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,klyve1/robots-txt-ai-crawler-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/ZZHh5A5cEI5zFjYeH/builds/Di7scwbNFL3nP9XkU/openapi.json
