Fetch a host's robots.txt and optionally test URLs against a user-agent
Fetch robots.txt for a domain and optionally check whether URLs are allowed
or disallowed for a given user-agent.
Matching uses Google's robots.txt parser. A 2xx body (including an empty
file) is passed to the matcher. A 4xx response other than 429 is treated as
no robots.txt, so every URL is allowed. A 429, a 5xx response, or a transport
failure is treated as a temporary full disallow, so every URL is disallowed.
The matcher does not fold a more specific bot such as Googlebot-Image into
Googlebot. Pass the user-agent token you want to test.
Playground
Log inLog in to try this tool. The request uses your session.
POST
item
domainrequired
Hostname (www.example.com) or absolute URL. Reduced to an origin (scheme + host + port). https is assumed when the scheme is omitted.
urls
URLs to test against the fetched robots.txt. Absolute http(s) URLs, or paths (/private) resolved against the origin. Each URL must use the same scheme, host, and port. At most 20.
user_agent
User-agent token passed to the matcher. Required when urls is non-empty. Not defaulted; a specific bot such as Googlebot-Image is not folded into Googlebot.
Credits
Fixed cost per call. A robots.txt we can fetch ourselves adds nothing. When the origin blocks the fetch (401, 403, 407, or 429) or returns a server error, a live page fetch is billed. A 5xx may be retried on harder routes, and only the route that got the file is billed. A private, loopback, or unresolvable host is not retried.
These usage SKUs can be charged on a call.
SKU
Credits
Description
Tool call
1 per request
Charged once per successful item, on top of any usage below.
Live page fetch
5 per 10 page
Fetches a page from the live web as an ordinary visitor would.
Live page fetch, hard-blocked page
75 per 10 page
A page that refused every gentler attempt. Charged instead of them: the attempts it refused cost nothing.
Live page fetch, protected page
25 per 10 page
A page that refused an ordinary fetch and had to be retried. Charged instead of the ordinary fetch, not on top of it.
Schemas
item is what you send, config how the tool behaves,
and the response is what you get back.
Item
object
Properties
domainstringrequired
Hostname (www.example.com) or absolute URL. Reduced to an origin (scheme + host + port). https is assumed when the scheme is omitted.
urlsarray
URLs to test against the fetched robots.txt. Absolute http(s) URLs, or paths (/private) resolved against the origin. Each URL must use the same scheme, host, and port. At most 20.
Default: []
max items 20
user_agentstring | null
User-agent token passed to the matcher. Required when urls is non-empty. Not defaulted; a specific bot such as Googlebot-Image is not folded into Googlebot.