Guides October 2026

How to Track AI Crawlers and Agents in Your Server Logs

Find GPTBot, ClaudeBot, PerplexityBot and the user-triggered AI agents in your server logs, with grep and awk commands, Cloudflare options and IP checks.

Mark HenryEditor

Disclosure: VisibilityOS is published by the team that builds Cituna, one of the tools discussed here. Read this as our view, not a neutral review.

To track AI crawlers in your server logs, search the access log for the user-agent names OpenAI, Anthropic, Perplexity, Google and Microsoft publish, sort the hits by job (training, search index or a live fetch for one user), and then check that each request came from the company's published IP ranges, because anyone can type "GPTBot" into a user-agent string. The names that decide whether you can be cited are OAI-SearchBot, Claude-SearchBot, Claude-User and PerplexityBot, plus Googlebot and Bingbot for the AI features built on Google and Bing. GPTBot and ClaudeBot are training crawlers.

This guide gives the user-agent table, copy-ready grep and awk commands for an nginx or Apache log, the two places Cloudflare shows the same data, and a verification step for each company. Every crawler fact comes from the owners' own documentation as read on 23 September 2026 and rechecked against their IP range files on 24 October 2026.

Logs tell you which pages a crawler fetched. They do not tell you whether an engine then cited you. Cituna runs your buyers' questions on ChatGPT, Perplexity, Gemini, Claude, Grok, Google AI Overviews and Google AI Mode every day and shows which pages each one cites, from $49 a month, so you can set the crawl data next to the answers.

The AI user agents to look for

AI crawler and agent names by job, from each company's documentation (read 23 September 2026) and IP range files (fetched 24 October 2026)
Name in the logCompanyJobFollows robots.txtPublished IP list
GPTBotOpenAITrainingYesopenai.com/gptbot.json
OAI-SearchBotOpenAISearch index for ChatGPT searchYesopenai.com/searchbot.json
ChatGPT-UserOpenAILive fetch when a ChatGPT user's request needs a pageOpenAI says its rules may not applyopenai.com/chatgpt-user.json
OAI-AdsBotOpenAIChecks landing pages submitted as ChatGPT adsOnly visits ad landing pagesopenai.com/adsbot.json
ClaudeBotAnthropicTrainingYesclaude.com/crawling/bots.json (one list for all three)
Claude-SearchBotAnthropicSearch index for ClaudeYessame list
Claude-UserAnthropicLive fetch when a user asks Claude a questionYes, Anthropic says it doessame list
PerplexityBotPerplexitySearch index; not used for trainingYeswww.perplexity.com/perplexitybot.json
Perplexity-UserPerplexityLive fetch when a user asks PerplexityPerplexity says it generally ignores itwww.perplexity.com/perplexity-user.json
GooglebotGoogleGoogle Search, AI Overviews and AI Mode includedYesgooglebot.json, plus reverse DNS
BingbotMicrosoftBing's index, which Copilot draws onMicrosoft lists blocking it among practices to avoidwww.bing.com/toolbox/bingbot.json, plus reverse DNS

Two names need a note. Google-Extended will never show up in a log: Google describes it as a robots.txt control name with no crawler of its own, covering Gemini training and grounding in Gemini Apps and Vertex AI. Anything Google fetches arrives as Googlebot or another Google crawler. And Anthropic's IP file is not split by agent, so an address match tells you a request came from Anthropic, not which of its three agents sent it; the user-agent string has to do that part.

You will also meet names outside this table. The Vercel and MERJ study of December 2024 tracked Meta-ExternalAgent, Bytespider, CCBot and AppleBot alongside the agents above. Count them the same way, but check their owners' own pages before you decide what each one does. What is an AI crawler? explains the three jobs in more depth.

Step 1: Find the access log and its format

On many nginx installs the access log is /var/log/nginx/access.log, with older days rotated into numbered and gzipped files beside it; the access_log line in your configuration gives the real path. The commands below assume the combined format, which nginx predefines as:

$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"

In that layout the client IP is the first field and the user agent is the last quoted string. If your server writes a custom format or JSON, open one line and adjust the field numbers before trusting a count.

Behind a CDN or load balancer, the first field may be the proxy's address rather than the crawler's. Log the real client IP before you get to the verification step, or every request will fail it.

Step 2: Count hits per AI agent

Read current and rotated logs together, keep only the AI names, and count them:

zcat -f /var/log/nginx/access.log* \
  | grep -oiE "GPTBot|OAI-SearchBot|ChatGPT-User|OAI-AdsBot|ClaudeBot|Claude-SearchBot|Claude-User|PerplexityBot|Perplexity-User|Googlebot|bingbot" \
  | sort | uniq -c | sort -rn

zcat -f passes plain files through untouched and unpacks the gzipped ones, so one command covers the whole rotation. The -i flag makes the match ignore capitalisation, so bingbot also catches Bingbot.

Group the result by the job column above. A site that sees plenty of GPTBot and ClaudeBot but no OAI-SearchBot or Claude-SearchBot is being read for training and not, or not yet, for search. A steady flow of ChatGPT-User, Claude-User or Perplexity-User means real people are asking those assistants questions that send them to your pages.

Step 3: See which pages each agent reads

Swap in any name from the table:

zcat -f /var/log/nginx/access.log* | grep "OAI-SearchBot" \
  | awk -F'"' '{split($2, r, " "); print r[2]}' \
  | sort | uniq -c | sort -rn | head -20

Splitting on the double quote makes the request line the second field, and the path is its second word. Compare the list with the pages you want cited: pricing, comparisons, product pages and the guides that answer your buyers' questions. A page a search agent never requests cannot be quoted from fresh.

Step 4: Check the status codes they get

zcat -f /var/log/nginx/access.log* | grep -E "Claude-SearchBot|Claude-User" \
  | awk -F'"' '{split($3, s, " "); print s[1]}' \
  | sort | uniq -c | sort -rn

Mostly 200 is healthy. A cluster of 403s or 429s means a firewall, bot-protection product or rate limit is turning the agent away, even when robots.txt allows it. 301 chains and 404s waste the visit; fix the links the agents keep hitting. A sudden run of 5xx answers on /robots.txt deserves attention too: under RFC 9309, a crawler that gets a 5xx for the file must treat the whole site as disallowed.

Step 5: Watch the trend by day

zcat -f /var/log/nginx/access.log* | grep "PerplexityBot" \
  | awk '{print substr($4, 2, 11)}' | sort | uniq -c

The fourth space-separated field starts with the bracketed date, so this prints a count per day such as 24/Oct/2026. Run it before and after a robots.txt or firewall change. OpenAI says its search systems take about 24 hours to reflect a robots.txt change, and Perplexity says up to 24 hours, so give a change a day before you judge it.

Step 6: Verify the requests are real

A user-agent string is a claim, not proof. Scrapers often borrow the AI names because some sites let them through. Check the addresses.

Against a published IP list (OpenAI, Perplexity, Anthropic, Google, Microsoft). Each company's file is JSON with a prefixes array of ipv4Prefix or ipv6Prefix entries. Pull the addresses that claim one name, then test them against that name's file:

curl -s https://openai.com/searchbot.json -o ranges.json
zcat -f /var/log/nginx/access.log* | grep "OAI-SearchBot" | awk '{print $1}' | sort -u > ips.txt

python3 - <<'PY'
import ipaddress, json
nets = [ipaddress.ip_network(p.get("ipv4Prefix") or p.get("ipv6Prefix"))
        for p in json.load(open("ranges.json"))["prefixes"]]
for ip in open("ips.txt").read().split():
    addr = ipaddress.ip_address(ip)
    print(ip, "ok" if any(addr in n for n in nets) else "NOT IN PUBLISHED RANGES")
PY

Swap the file and the name for the agent you are checking: gptbot.json for GPTBot, chatgpt-user.json for ChatGPT-User, perplexitybot.json or perplexity-user.json for Perplexity, bots.json for any of Anthropic's three. The lists change (OpenAI's ChatGPT-User file we fetched was regenerated on 20 October 2026), so download a fresh copy each time rather than saving one.

By reverse and forward DNS (Google and Microsoft). Google tells site owners to run a reverse lookup on the address, confirm the host name ends in googlebot.com, google.com or googleusercontent.com, then run a forward lookup on that name and confirm it returns the same address. Microsoft's method for Bingbot is the same, with host names ending in search.msn.com:

host <ip-from-your-log>          # expect a name ending in googlebot.com or search.msn.com
host <name-that-came-back>       # expect the original IP again

OpenAI, Anthropic and Perplexity do not describe a DNS method on the pages we read, so for them the IP file is the check.

A failed check does not have to mean blocking. Anthropic warns that blocking its IP addresses may not work reliably, because it stops its bots reading your robots.txt; robots.txt for AI crawlers is the documented way to say no.

If your site runs behind Cloudflare

Cloudflare sees the request before your server does, and it gives you two ways in.

  • AI Crawl Control. The dashboard lists AI crawlers by name, with their operator, request count and data transfer, and an allow or block action for each. Its metrics break activity down by crawler, category, operator, host and HTTP status code, and export to CSV. It is the fastest way to answer "which AI agents hit us last week" without touching a shell.
  • Logpush. For raw data, the http_requests dataset carries ClientIP, ClientRequestUserAgent, ClientRequestPath and VerifiedBotCategory, among other fields. Push it to storage or a warehouse and run the same counts as steps 2 to 5 on those columns, with VerifiedBotCategory standing in for part of the verification step.

If Cloudflare's bot protection blocks an agent, the request never reaches your origin, so your own log under-counts it. Perplexity's documentation gives Cloudflare and AWS firewall recipes that allow its bots by user agent and IP range together.

What the logs cannot tell you

  • Whether you were cited. A fetch by OAI-SearchBot or Claude-SearchBot means the page can be in the index. It does not mean an answer quoted it.
  • What the agent understood. The crawlers behind ChatGPT, Claude and Perplexity did not render JavaScript in Vercel and MERJ's December 2024 study, so a 200 can still carry an empty shell. JavaScript and AI crawlers shows how to check what they receive.
  • Visits from people. A click from a ChatGPT or Claude answer arrives as a normal browser visit. How to track AI referral traffic in GA4 covers that half.

What to do first

  1. Run the step 2 count on the last 30 days of logs and write down the total per agent.
  2. List the top 20 paths for OAI-SearchBot, Claude-SearchBot and PerplexityBot and compare them with the pages you want cited.
  3. Check the status codes those agents receive, and clear any 403 or 429 your firewall returns to verified addresses.
  4. Verify a sample of addresses for every agent name against its published list or by DNS.
  5. Decide who gets in with a robots.txt written for AI crawlers, then repeat the count a day after any robots.txt or firewall change.

The crawl data shows that an engine can read your pages. To see whether it then names you, Cituna checks your prompts on seven AI engines every day and writes the fix for each gap it finds, with Starter at $49 a month.

Sources

  1. OpenAI crawler IP ranges. Retrieved .
  2. Anthropic crawler IP ranges. Retrieved .
  3. Perplexity crawler IP ranges. Retrieved .
  4. Google, verifying Googlebot. Retrieved .
  5. nginx log module. Retrieved .