Is that really GPTBot? How to spot fake AI crawlers in your server logs A developer at Get AI Vizible published a Python script that verifies claimed AI crawler traffic by checking log IPs against the published IP-range JSON files from OpenAI, Perplexity and Google, flagging hits that spoof user-agent strings like GPTBot or PerplexityBot as fake. The script parses combined-format access logs, matches each claimed crawler against its operator's prefixes array, and recommends reverse-then-forward DNS lookups as a fallback for crawlers without published ranges. In a three-line test log, it correctly separated one real GPTBot hit from two spoofed ones. Disclosure: I work on Get AI Vizible, which includes AI crawler analytics. Everything below works with a log file and the Python standard library. This post was drafted by an AI agent for our team; the script was run against a test log before publishing. If you grep your access logs for GPTBot , PerplexityBot or ChatGPT-User , you'll probably find hits. The question is how many of them are real. A user-agent string is just text. Anyone can send GPTBot/1.2 in a header, and scrapers do, because some sites allow AI crawlers that they'd block for an unknown bot. So if you count AI crawler visits by user agent alone, the number is inflated, and if you allow-list by user agent alone, you're letting in whoever claims the name. The good news: several AI companies now publish the IP ranges their crawlers use. You can check every hit against them. At the time of writing November 2026 , these JSON files are live: | Crawler | What it does | IP ranges | |---|---|---| | GPTBot | OpenAI's training crawler | https://openai.com/gptbot.json | | OAI-SearchBot | Indexes pages for ChatGPT search | https://openai.com/searchbot.json | | ChatGPT-User | Fetches a page when a user's chat needs it | https://openai.com/chatgpt-user.json | | PerplexityBot | Perplexity's index crawler | https://www.perplexity.ai/perplexitybot.json | | Perplexity-User | Fetches pages on behalf of a user | https://www.perplexity.ai/perplexity-user.json | | Googlebot and Google's other crawlers | Search, AI Overviews | https://developers.google.com/static/crawling/ipranges/common-crawlers.json | They all use the same shape: a prefixes array of objects with an ipv4Prefix or ipv6Prefix . That makes checking easy. For crawlers whose operator doesn't publish a list, the fallback is a reverse DNS lookup followed by a forward lookup to confirm. If neither works, treat the hit as unverified rather than real. This reads a log in the common "combined" format nginx and Apache default , finds hits that claim to be an AI crawler, and checks the IP against the published ranges. python import ipaddress, json, re, sys, urllib.request RANGES = { "GPTBot": "https://openai.com/gptbot.json", "OAI-SearchBot": "https://openai.com/searchbot.json", "ChatGPT-User": "https://openai.com/chatgpt-user.json", "PerplexityBot": "https://www.perplexity.ai/perplexitybot.json", "Perplexity-User": "https://www.perplexity.ai/perplexity-user.json", } def load url : with urllib.request.urlopen url, timeout=15 as r: data = json.load r return ipaddress.ip network p.get "ipv4Prefix" or p.get "ipv6Prefix" for p in data "prefixes" nets = {bot: load url for bot, url in RANGES.items } Combined log format: IP is the first field, user agent is the last quoted field line re = re.compile r'^ \S+ . " ^" "$' counts = {} for line in open sys.argv 1 , encoding="utf-8", errors="replace" : m = line re.match line.strip if not m: continue ip, ua = m.groups for bot in nets: if bot.lower in ua.lower : addr = ipaddress.ip address ip real = any addr in n for n in nets bot key = bot, "verified" if real else "FAKE" counts key = counts.get key, 0 + 1 for bot, status , n in sorted counts.items : print f"{bot:15} {status:9} {n}" Run it with python verify ai bots.py /var/log/nginx/access.log . Output looks like this: GPTBot FAKE 1 GPTBot verified 1 PerplexityBot FAKE 1 That's from a three-line test log: one real GPTBot IP, one documentation IP pretending to be GPTBot, and one public DNS IP pretending to be PerplexityBot. $http cf connecting ip on Cloudflare, or X-Forwarded-For from a proxy you trust or every hit will look fake. creationTime field; cache it for a day, not forever. If you're trying to get your site cited by ChatGPT or Perplexity, the useful question isn't "did a bot visit?" but "did the real crawler fetch the pages I care about, and did it get a 200?" Real OAI-SearchBot and PerplexityBot hits on your key pages are a good sign. Lots of fake ones and no real ones means the AI engines probably haven't seen your content yet, whatever the raw user-agent counts say. If you'd rather not run this yourself, Get AI Vizible's crawler analytics does the same check continuously getvizible.online . The script above is free to use and needs nothing but Python.