Bulk get robots.txt rules
ai_audit.robots.bulk_get(RobotBulkGetParams**kwargs) -> RobotBulkGetResponse
POST/zones/{zone_id}/ai-audit/robots/bulk
Fetches and parses robots.txt files for multiple domains within a zone in a single request. Each domain must belong to the specified zone. Results are keyed by hostname.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Parameters
Bulk get robots.txt rules
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
response = client.ai_audit.robots.bulk_get(
zone_id="zone_id",
body=["example.com", "blog.example.com"],
)
print(response){
"errors": [],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"foo": {
"userAgents": {
"foo": {
"allow": [
"string"
],
"disallow": [
"string"
],
"contentSignals": {
"ai-input": "yes",
"ai-train": "yes",
"search": "yes"
},
"crawlDelay": 0
}
},
"sitemaps": [
"string"
],
"status": 0
}
}
}Returns Examples
{
"errors": [],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"foo": {
"userAgents": {
"foo": {
"allow": [
"string"
],
"disallow": [
"string"
],
"contentSignals": {
"ai-input": "yes",
"ai-train": "yes",
"search": "yes"
},
"crawlDelay": 0
}
},
"sitemaps": [
"string"
],
"status": 0
}
}
}