{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Bot Analytics & AI Crawler Checker (GPTBot, llms.txt)",
    "description": "Google Analytics for AI agents: see which AI bots (GPTBot, ClaudeBot, PerplexityBot, ChatGPT-User...) hit your site and what pages they want, from your access logs, with fake-bot detection. Plus an AI-readiness audit: robots.txt per AI bot, firewall blocks, llms.txt, sitemap, schema, score.",
    "version": "0.1",
    "x-build-id": "ZujzCnzEMhdxabKkg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-co~ai-bot-analytics/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-co-ai-bot-analytics",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/api-co~ai-bot-analytics/runs": {
      "post": {
        "operationId": "runs-sync-api-co-ai-bot-analytics",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/api-co~ai-bot-analytics/run-sync": {
      "post": {
        "operationId": "run-sync-api-co-ai-bot-analytics",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "startUrls": {
            "title": "Websites to audit",
            "type": "array",
            "description": "Domains or page URLs, e.g. 'example.com' or 'https://example.com/pricing'. Each gets an AI-readiness audit: robots.txt rules for 37 AI and search bots, a live firewall test, llms.txt, sitemap, structured data and text visible without JavaScript. Leave empty (and add no logs) to audit two example sites.",
            "items": {
              "type": "string"
            }
          },
          "probeBotAccess": {
            "title": "Live-test whether your firewall/CDN blocks AI bots",
            "type": "boolean",
            "description": "Requests each page with the GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot and PerplexityBot user agents and compares the answer with a normal browser. Catches Cloudflare 'Block AI bots', WAF rules and 403s that robots.txt does not show.",
            "default": true
          },
          "logUrls": {
            "title": "Access log file URLs",
            "type": "array",
            "description": "Direct links to server/CDN access logs (plain or .gz): a signed S3/GCS/R2 URL, a Dropbox/Drive direct link, or an Apify key-value store record URL. Formats are detected automatically: Apache/Nginx combined or common, JSON lines (Cloudflare Logpush, Vercel, Caddy, Fastly, Netlify and generic keys) and W3C logs with a #Fields: header (CloudFront, IIS).",
            "items": {
              "type": "string"
            }
          },
          "logText": {
            "title": "Or paste log lines",
            "type": "string",
            "description": "Paste access-log lines directly (good for a quick look; use log URLs for big files)."
          },
          "verifyBotIps": {
            "title": "Verify bots against official IP lists",
            "type": "boolean",
            "description": "Checks each hit against the IP ranges published by OpenAI, Perplexity, Google, Bing, Apple, Common Crawl, DuckDuckGo and Mistral, and counts hits from other IPs as suspected fake bots.",
            "default": true
          },
          "includeSearchEngines": {
            "title": "Include Googlebot and Bingbot rows",
            "type": "boolean",
            "description": "Add Googlebot and Bingbot to the per-bot report for comparison (they are never counted as AI bot traffic).",
            "default": true
          },
          "maxPathRows": {
            "title": "Top pages to report",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many 'most-requested by AI bots' page rows to output.",
            "default": 25
          },
          "maxLogLines": {
            "title": "Max log lines",
            "minimum": 1,
            "type": "integer",
            "description": "Safety limit on lines read across all log files.",
            "default": 20000000
          },
          "maxConcurrency": {
            "title": "Sites audited in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many websites to audit at the same time.",
            "default": 4
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many result rows (site audits + report rows). You are only charged per row.",
            "default": 1000
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}