apyhub
Back
▣ VERIFICATION KIT · MEDIA KIT

Check Robots.txt Crawl Access API

What it does

The Robots.txt Checker API tells you if a crawler may fetch a page. Send URLs and a user agent, and get back allowed, the exact rule that decided it, and the site's AI crawler policy.

Send urls with 1 to 25 page URLs or domains. Set userAgent to your crawler's token, such as GPTBot, or a full User-Agent string. The answer comes with matchedRule, such as Disallow: /, the group that applied and its line number.

Each result also lists the site's sitemaps, crawl-delay and rule counts. By default it shows which of 17 AI crawlers, plus Googlebot and Bingbot, are blocked, with each bot's operator and purpose. Set aiCrawlers to false to leave that out. Set includeRobotsTxt to true to get the raw file.

The checks follow the robots.txt standard (RFC 9309). A site with no robots.txt allows all crawling. A site whose robots.txt cannot be reached is treated as blocked.

Teams use this robots.txt checker API to gate web crawlers and scrapers before they fetch a page. Publishers use it to audit which AI bots they block. SEO teams use it to test robots.txt changes in bulk.

After a page is allowed, turn it into clean text with the Convert Webpages to Markdown API. For a full AI readiness score of a site, use the Bulk Website AI Readiness Check API.

POST
Check Robots.txt Crawl Access API - can I crawl this URL, AI bot blocks
https://api.eu.apyhub.com/martin10291/check-robots-txt-crawl-access

QUICKSTART

GUIDE

Quickstart

Check if a crawler may fetch a page: send the page in urls and your crawler in userAgent.

curl -X POST "https://api.eu.apyhub.com/martin10291/check-robots-txt-crawl-access" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://www.nytimes.com/section/world"],"userAgent":"GPTBot"}'

What you'll get back

Returns a JSON object with count and items, one result per URL. Here GPTBot is not allowed on the page: allowed is false because of the rule Disallow: / in the gptbot group. The result also shows the AI crawler matrix, a summary of which AI bots are blocked, and the sitemaps listed in robots.txt. The example is shortened: aiCrawlers (19 rows), sitemaps and userAgentsNamed show their first entries only.

{
  "count": 1,
  "items": [
    {
      "aiCrawlers": [
        {
          "bot": "GPTBot",
          "namedInRobotsTxt": true,
          "operator": "OpenAI",
          "pathAllowed": false,
          "purpose": "training",
          "rule": "Disallow: /",
          "siteAllowed": false
        },
        {
          "bot": "OAI-SearchBot",
          "namedInRobotsTxt": true,
          "operator": "OpenAI",
          "pathAllowed": false,
          "purpose": "search",
          "rule": "Disallow: /",
          "siteAllowed": false
        },
        {
          "bot": "ChatGPT-User",
          "namedInRobotsTxt": true,
          "operator": "OpenAI",
          "pathAllowed": false,
          "purpose": "user fetch",
          "rule": "Disallow: /",
          "siteAllowed": false
        }
      ],
      "aiSummary": {
        "aiBotsChecked": 17,
        "blockedBots": [
          "GPTBot",
          "OAI-SearchBot",
          "ChatGPT-User",
          "ClaudeBot",
          "Claude-SearchBot",
          "Claude-User",
          "Google-Extended",
          "Applebot-Extended",
          "PerplexityBot",
          "Perplexity-User",
          "CCBot",
          "Bytespider",
          "Meta-ExternalAgent",
          "cohere-ai",
          "DuckAssistBot"
        ],
        "blockedOnHomepage": 15,
        "blockedOnThisPath": 15,
        "stance": "blocks 15 of 17 AI bots, including AI search or user-fetch bots"
      },
      "allowed": false,
      "allowedForAnyBot": true,
      "cached": true,
      "checkedAt": "2026-11-26T10:24:36Z",
      "contentHash": "d0dbccfe5e661cfc",
      "contentSignals": null,
      "crawlDelay": null,
      "crawlDelays": null,
      "fetchMs": 34,
      "groups": 70,
      "httpStatus": 200,
      "issues": [],
      "llmsTxt": false,
      "matchedGroup": "gptbot",
      "matchedRule": "Disallow: /",
      "otherDirectives": null,
      "path": "/section/world",
      "policy": "rules",
      "productToken": "GPTBot",
      "reason": "longest match in group 'gptbot'",
      "robotsFinalUrl": "https://www.nytimes.com/robots.txt",
      "robotsTxtBytes": 8855,
      "robotsTxtFound": true,
      "robotsUrl": "https://www.nytimes.com/robots.txt",
      "ruleLine": 234,
      "rulesTotal": 187,
      "site": "https://www.nytimes.com",
      "sitemapCount": 25,
      "sitemaps": [
        "https://www.nytimes.com/sitemaps/new/news.xml.gz",
        "https://www.nytimes.com/sitemaps/new/sitemap.xml.gz"
      ],
      "url": "https://www.nytimes.com/section/world",
      "userAgent": "GPTBot",
      "userAgentsNamed": [
        "*",
        "aliyunsecbot",
        "amazonadbot",
        "amazonbot",
        "anthropic-ai"
      ]
    }
  ]
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body
urls*
Page URLs or domains to check, 1 to 25 per call, e.g. `https://www.nytimes.com/section/world` or `example.com`. Each URL is checked against its site's robots.txt.
Your crawler's product token or full User-Agent string, e.g. GPTBot or 'Mozilla/5.0 (compatible; MyBot/1.0)'. Empty = only the AI crawler matrix and '*' rules
Include the allowed/blocked matrix for 17 AI crawlers + Googlebot/Bingbot
Also return the raw robots.txt text (first 20,000 characters)

About this endpoint

What it does

Checks whether 1 to 25 page URLs or domains are allowed to be crawled according to robots.txt rules, and returns per-URL results with rule-matching details. You can also request AI crawler matrix data, the raw robots.txt text, or both.

Request Body

ParameterTypeMandatoryDescription
urlsString ArrayYesPage URLs or domains to check, 1 to 25 per call, e.g. ["https://www.nytimes.com/section/world", "example.com"]. Each URL is checked against its site's robots.txt.
userAgentStringNoYour crawler's product token or full User-Agent string, e.g. GPTBot or Mozilla/5.0 (compatible; MyBot/1.0). Empty means only the AI crawler matrix and * rules are considered.
aiCrawlersBooleanNoInclude the allowed/blocked matrix for 17 AI crawlers plus Googlebot/Bingbot.
includeRobotsTxtBooleanNoAlso return the raw robots.txt text, up to the first 20,000 characters.

Response

Returns a JSON object with a count integer and an items array with one result per URL. Each result says whether your userAgent may crawl the path (allowed), which rule and group decided it, and what the site's robots.txt says about 17 AI crawlers plus Googlebot and Bingbot. Rules follow the robots.txt standard (RFC 9309): no robots.txt means crawling is allowed, and an unreachable robots.txt means the site should be treated as blocked.

ParameterTypeDescription
countIntegerNumber of rows in items, one per URL in urls.
itemsObject ArrayOne robots.txt result per URL, in the order you sent them.
items[].urlStringThe URL or domain you sent.
items[].siteStringHost whose robots.txt was checked, e.g. www.nytimes.com.
items[].pathStringPath that was checked against the rules, e.g. /section/world.
items[].userAgentStringThe userAgent you sent. Only present when you send one.
items[].productTokenStringCrawler token read from your userAgent, e.g. gptbot from a full User-Agent string.
items[].allowedBooleantrue if your userAgent may crawl this path. Only present when you send userAgent.
items[].allowedForAnyBotBooleantrue if at least one crawler may fetch this path.
items[].policyStringHow the answer was reached: rules (robots.txt rules applied), allow-all (no robots.txt, for example HTTP 404) or disallow-all (robots.txt unreachable, so treat the site as blocked).
items[].reasonStringPlain-language reason for the result, e.g. longest match in group 'gptbot'.
items[].matchedRuleStringThe robots.txt rule that decided the result, e.g. Disallow: /. Empty if no rule matched.
items[].matchedGroupStringThe user-agent group that applied, e.g. gptbot or *.
items[].ruleLineIntegerLine number of the matched rule in robots.txt.
items[].aiCrawlersObject ArrayAllowed/blocked result for 17 AI crawlers plus Googlebot and Bingbot (19 rows). Leave out with aiCrawlers: false.
items[].aiCrawlers[].botStringCrawler name, e.g. GPTBot, ClaudeBot, PerplexityBot.
items[].aiCrawlers[].operatorStringCompany that runs the crawler, e.g. OpenAI.
items[].aiCrawlers[].purposeStringWhat the crawler is for, e.g. training, search or user fetch.
items[].aiCrawlers[].pathAllowedBooleantrue if the crawler may fetch this path.
items[].aiCrawlers[].siteAllowedBooleantrue if the crawler may fetch the homepage.
items[].aiCrawlers[].namedInRobotsTxtBooleantrue if robots.txt has a group for this crawler by name.
items[].aiCrawlers[].ruleStringThe rule that decided the result for this crawler.
items[].aiSummaryObjectSummary of the AI crawler check.
items[].aiSummary.aiBotsCheckedIntegerNumber of AI crawlers checked (17).
items[].aiSummary.blockedBotsString ArrayAI crawlers that are blocked.
items[].aiSummary.blockedOnHomepageIntegerNumber of AI crawlers blocked on the homepage.
items[].aiSummary.blockedOnThisPathIntegerNumber of AI crawlers blocked on this path.
items[].aiSummary.stanceStringPlain-language summary, e.g. blocks 15 of 17 AI bots, including AI search or user-fetch bots.
items[].robotsUrlStringrobots.txt URL that was fetched.
items[].robotsFinalUrlStringrobots.txt URL after redirects.
items[].robotsTxtFoundBooleantrue if a robots.txt file was found.
items[].httpStatusIntegerHTTP status of the robots.txt request. null if the site could not be reached.
items[].robotsTxtBytesIntegerSize of the robots.txt file in bytes.
items[].robotsTxtStringRaw robots.txt text (first 20,000 characters). Only with includeRobotsTxt: true.
items[].groupsIntegerNumber of user-agent groups in robots.txt.
items[].rulesTotalIntegerNumber of Allow/Disallow rules in robots.txt.
items[].userAgentsNamedString ArrayUser agents that robots.txt names.
items[].crawlDelayNumberCrawl-delay in seconds for your userAgent, or null.
items[].crawlDelaysObjectCrawl-delay per user agent, or null if none are set.
items[].sitemapsString ArraySitemap URLs listed in robots.txt.
items[].sitemapCountIntegerNumber of sitemaps listed.
items[].otherDirectivesObjectOther directives found (for example Host), or null.
items[].contentSignalsObjectContent-use signals declared in robots.txt, or null.
items[].llmsTxtBooleantrue if the site also has an /llms.txt file.
items[].issuesString ArrayProblems found, e.g. HTTP 404: no robots.txt - crawling allowed (RFC 9309 2.3.1.3).
items[].contentHashStringHash of the robots.txt content, useful to detect changes.
items[].fetchMsIntegerTime taken to fetch robots.txt, in milliseconds.
items[].checkedAtStringWhen the check ran (ISO 8601 UTC).
items[].cachedBooleantrue if the result was served from cache.
items[].cacheAgeSecondsIntegerAge of the cached result in seconds.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.