robots.txt

GET /api/v1/robots-txt

Fetch, parse and validate a site's robots.txt, including the AI-crawler rules (GPTBot, ClaudeBot, PerplexityBot, Google-Extended…) and Content-Signal directives. See which user-agents are allowed or disallowed, which sitemaps are declared, and whether AI bots are explicitly granted or denied access.

Query parameters

NameTypeDescription
url requiredstringAny URL on the site; we read robots.txt from its origin.
keystringYour API key, if not sent via the X-API-Key header.

Request

Response

200 · application/json
  1. {
  2. "url": "https://example.com/robots.txt",
  3. "found": true,
  4. "statusCode": 200,
  5. "valid": true,
  6. "stats": { "lines": 8, "comments": 1, "groups": 2, "sitemaps": 1 },
  7. "sitemaps": ["https://example.com/sitemap.xml"],
  8. "contentSignals": [],
  9. "aiBots": { "hasAnyAIRule": false, "perBot": {} },
  10. "groups": [ { "userAgents": ["*"], "rules": [ { "directive": "disallow", "value": "/admin" } ] } ],
  11. "errors": []
  12. }

Response fields

FieldTypeDescription
foundbooleanWhether a parseable robots.txt was served at the origin.
validbooleanTrue when found and no unparseable lines were encountered.
statusCodeintegerHTTP status returned for the robots.txt request.
statsobjectCounts of lines, comments, groups and sitemaps.
sitemapsarrayAll Sitemap: directives declared in the file.
contentSignalsarrayContent-Signal: directives (ai-train, search, ai-input preferences).
aiBotsobjecthasAnyAIRule plus perBot rules for each AI crawler we scan.
groupsarrayParsed user-agent groups, each with its userAgents and rules.
errorsarrayAny lines that could not be parsed.

To analyse the declared sitemaps, use Sitemap. See Errors for status codes.