Skip to content

How to Track AI Crawlers Using Server Log Analysis

Server with a long log strip under a red magnifying glass, illustrating AI crawler log analysis

AI crawler log analysis is the most direct way to see whether AI systems can actually reach your website. Before asking why ChatGPT does not mention your company, check whether its search crawler is visiting your pages and getting a successful response. Server logs answer that question with facts, not guesses.

This guide shows how to identify AI user agents, verify that they are genuine, analyze crawl patterns, find blocked requests and build simple alerts. It includes a tested Python script that parses access logs and summarizes AI crawler activity.

What do server logs reveal about AI crawler activity?

Short answer: Server logs record every request, including the user agent, IP address, URL, status code and time. For AI crawlers, that shows which bots visit, how often, which pages they read and whether your server or firewall blocks them.

That is why AI crawler log analysis starts with raw logs. Analytics tools such as GA4 rely on JavaScript, so they usually miss crawlers completely. Logs from your web server or CDN capture every request, which makes them the ground truth for crawler behavior.

How does AI crawler log analysis identify user agents?

Short answer: Match the user agent string against known bot names, such as OAI-SearchBot, GPTBot, ClaudeBot, Claude-SearchBot and PerplexityBot. Group them by company and purpose, so you can separate search, training and user-triggered fetches.

Each vendor publishes its bot names and purposes, for example in OpenAI’s crawler documentation and Perplexity’s bot guide. Our guide to robots.txt for AI crawlers lists the main ones in a table.

One detail matters for matching: some names contain others. “ClaudeBot” is a substring check that could catch other Claude agents, so match longer names first, as the script below does.

How do you verify crawler authenticity using published IP ranges?

Short answer: Anyone can fake a user agent string. To confirm a request is genuine, check its IP address against the ranges the vendor publishes, such as OpenAI’s searchbot.json or Perplexity’s perplexitybot.json, or use reverse DNS for Googlebot.

OpenAI publishes separate IP files for OAI-SearchBot, GPTBot and ChatGPT-User. Perplexity and Anthropic publish their own lists, and Google documents a reverse DNS method for Googlebot. This helper checks one IP against any published JSON file:

#!/usr/bin/env python3
"""Check whether an IP belongs to a crawler's published ranges.
Usage: python verify_ip.py 20.1.2.3 https://openai.com/searchbot.json
"""
import ipaddress, json, sys, urllib.request

def networks(obj):
    # Walk any JSON shape and collect values that parse as IP networks.
    if isinstance(obj, dict):
        for v in obj.values():
            yield from networks(v)
    elif isinstance(obj, list):
        for v in obj:
            yield from networks(v)
    elif isinstance(obj, str):
        try:
            yield ipaddress.ip_network(obj, strict=False)
        except ValueError:
            pass

ip = ipaddress.ip_address(sys.argv[1])
with urllib.request.urlopen(sys.argv[2], timeout=10) as r:
    data = json.load(r)
match = any(ip in net for net in networks(data))
print("VERIFIED" if match else "NOT IN PUBLISHED RANGES")

In AI crawler log analysis, requests that claim to be an AI bot but come from other IPs are impersonators. Treat them like any other unknown traffic.

How do you run AI crawler log analysis with Python?

Short answer: Parse each log line, identify AI user agents, then count hits, status codes, unique IPs and top URLs per bot. The script below does this for standard combined-format logs from Nginx or Apache.

#!/usr/bin/env python3
"""Parse an access log (combined format) and summarize AI crawler activity.

Usage: python ai_log_parser.py access.log
"""
import re
import sys
from collections import Counter, defaultdict

# Bot name -> (company, purpose). Update when vendors change their docs.
AI_BOTS = {
    "OAI-SearchBot": ("OpenAI", "search"),
    "GPTBot": ("OpenAI", "training"),
    "ChatGPT-User": ("OpenAI", "user fetch"),
    "Claude-SearchBot": ("Anthropic", "search"),
    "ClaudeBot": ("Anthropic", "training"),
    "Claude-User": ("Anthropic", "user fetch"),
    "PerplexityBot": ("Perplexity", "search"),
    "Perplexity-User": ("Perplexity", "user fetch"),
    "Googlebot": ("Google", "search"),
    "bingbot": ("Microsoft", "search"),
}

LINE = re.compile(
    r'(?P<ip>\S+) \S+ \S+ \[(?P<time>[^\]]+)\] '
    r'"(?P<method>\S+) (?P<path>\S+) \S+" (?P<status>\d{3}) \S+ '
    r'"[^"]*" "(?P<ua>[^"]*)"'
)


def identify(user_agent):
    # Check longer names first so "ClaudeBot" does not match "Claude-SearchBot".
    for name in sorted(AI_BOTS, key=len, reverse=True):
        if name.lower() in user_agent.lower():
            return name
    return None


def main(path):
    hits = Counter()
    statuses = defaultdict(Counter)
    urls = defaultdict(Counter)
    ips = defaultdict(set)
    with open(path, encoding="utf-8", errors="replace") as f:
        for line in f:
            m = LINE.match(line)
            if not m:
                continue
            bot = identify(m["ua"])
            if not bot:
                continue
            hits[bot] += 1
            statuses[bot][m["status"]] += 1
            urls[bot][m["path"]] += 1
            ips[bot].add(m["ip"])

    print(f"{'Bot':<18}{'Company':<12}{'Purpose':<12}{'Hits':>6}{'4xx/5xx':>9}{'IPs':>6}")
    for bot, n in hits.most_common():
        company, purpose = AI_BOTS[bot]
        errors = sum(c for s, c in statuses[bot].items() if s[0] in "45")
        print(f"{bot:<18}{company:<12}{purpose:<12}{n:>6}{errors:>9}{len(ips[bot]):>6}")
    for bot in hits:
        blocked = statuses[bot].get("403", 0) + statuses[bot].get("429", 0)
        if blocked:
            print(f"ALERT: {bot} received {blocked} blocked responses (403/429)")
        top = ", ".join(u for u, _ in urls[bot].most_common(3))
        print(f"Top URLs for {bot}: {top}")


if __name__ == "__main__":
    main(sys.argv[1])

On a small test log, the script reported this summary:

Bot               Company     Purpose       Hits  4xx/5xx   IPs
OAI-SearchBot     OpenAI      search           2        1     1
GPTBot            OpenAI      training         1        0     1
Claude-SearchBot  Anthropic   search           1        0     1
ALERT: OAI-SearchBot received 1 blocked responses (403/429)
Top URLs for OAI-SearchBot: /blog/seo-vs-aeo/, /pricing/
Top URLs for GPTBot: /blog/
Top URLs for Claude-SearchBot: /blog/

The alert line is the most valuable output. Here, the ChatGPT search crawler received a 403 on a pricing page, which means a firewall or bot rule is blocking it.

How do you analyze crawl frequency and URL coverage?

Short answer: Compare the URLs each AI crawler requests with the URLs in your sitemap. Pages that matter to buyers but never get crawled are a coverage gap, and sudden drops in crawl frequency often point to new blocks.

  • Count requests per bot per day to see trends.
  • Join crawled URLs with your sitemap to find pages never visited.
  • Group URLs by template, such as blog, service or pricing pages.
  • Flag important pages not crawled in the last 30 days.

How do you identify HTTP errors and blocked requests?

Short answer: Filter AI crawler requests by status code. A 403 or 429 usually means a firewall, CDN or rate limit is blocking the bot. 404 and 5xx errors point to broken links or server problems on pages crawlers expect to find.

Status Likely cause Action
403 Firewall or bot protection Allow verified IP ranges for bots you want
429 Rate limiting Raise limits for verified crawlers
404 Broken or removed URLs Redirect or update links and sitemaps
5xx Server errors Fix capacity or application errors
301/302 chains Redirect loops or long chains Point links straight to the final URL

How do you detect crawl inefficiencies?

Short answer: Look for crawler time spent on low-value URLs, such as filters, internal search results, tag pages and parameter variations. Those requests use crawl capacity that could go to important pages.

If logs show heavy crawling of URLs with tracking parameters or endless filter combinations, clean them up with canonical tags, robots.txt rules or link changes. Then check that key pages gain a larger share of crawler requests over the following weeks.

How do you turn AI crawler log analysis into dashboards and alerts?

Short answer: Load parsed log data into a database or spreadsheet daily, chart hits and errors per bot and set alerts for blocked responses or sudden drops in crawl activity.

  1. Schedule the parser to run daily on the previous day’s logs.
  2. Write results to a table with date, bot, URL, status and IP.
  3. Chart daily hits per bot and error rates in Looker Studio or Power BI.
  4. Alert when a search bot gets any 403 or 429 response.
  5. Alert when daily hits from a key bot fall sharply versus the prior week.

Logs show access, not visibility. Pair this data with prompt testing, as described in our guide on how to measure AI search visibility.

Frequently asked questions about AI crawler log analysis

Why don’t AI crawlers show up in GA4?

GA4 records visits through JavaScript, and crawlers usually do not run it. Server or CDN logs capture every request, so AI crawler log analysis needs log data.

Where do I find my server logs?

Check your hosting panel, your web server’s log folder or your CDN’s log export feature. Managed WordPress hosts often provide raw access logs on request.

How can I tell if a bot is fake?

Compare its IP with the vendor’s published ranges or use reverse DNS where the vendor supports it. A matching user agent alone proves nothing.

How often should we run AI crawler log analysis?

Daily automation is ideal, with a monthly review of trends. At minimum, check logs after any firewall, CDN or hosting change.

What is a healthy result?

Search bots you allow should receive mostly 200 responses on important pages, with no 403 or 429 errors and steady crawl activity over time.

Next step

Export one week of logs and run the parser this week. If any search crawler receives blocked responses, fix that before working on content.

Want more practical guides on AI crawler log analysis? Browse the latest articles on the Blippu blog.

See all articles