CrawlClick docs
Menu and search

Verify AI crawlers by published IP ranges

To verify an AI crawler by IP, load the vendor's published range file on a timer, then check that the request's connecting address, unmapped from IPv4-mapped IPv6, falls inside one of its prefixes.

Status: Live. A published IP range file is a vendor’s own statement of the addresses its crawler fetches from, served over HTTPS from the vendor’s domain. That makes it the cheapest route to a verified tier: one periodic fetch per vendor, then an in-memory prefix lookup per request, with no DNS on the request path. It is the method CrawlClick’s production edge relies on for every agent that does not sign its requests. This page explains the file format, the rules CrawlClick’s parser applies, and gives one loader that reads every range file the crawler registry names. Each agent’s own page in the crawler reference has a single-agent version of the check.

What format do vendors publish their IP ranges in?

Every range file in the registry uses the shape Google’s crawler list established: a JSON object with a prefixes array, where each entry carries exactly one of ipv4Prefix or ipv6Prefix. Most files also carry a creationTime string, which CrawlClick does not read.

{
  "creationTime": "2026-07-01T00:00:00Z",
  "prefixes": [
    { "ipv4Prefix": "23.102.140.112/28" },
    { "ipv6Prefix": "2a01:111:2054::/48" }
  ]
}

Amazon departs from the plain file in two ways, and CrawlClick’s parser handles both:

  • The list is embedded in an HTML page. Amazonbot’s object sits inside a web page, with its quotes written as " entities. CrawlClick undoes the entities ", ", " and &, finds the first "prefixes" key, backs up to the opening brace before it, and parses one JSON object from there. A page with no such object, or with an empty prefixes array, is an error.
  • The entries are host addresses, not networks. A value with no / becomes a one-host prefix: /32 for IPv4 and /128 for IPv6.

Several agents share a file. The three Anthropic agents all point at the same URL, for example, so fetch each URL once and apply it to every agent that names it.

Which agents publish a range file?

Of the 29 agents in the registry, 18 name a range file, served from 15 distinct URLs. The other 11 publish no list, so an address check can neither confirm nor refute them.

AgentRange file
Amazonbothttps://developer.amazon.com/amazonbot/ip-addresses/
Applebothttps://search.developer.apple.com/applebot.json
bingbothttps://www.bing.com/toolbox/bingbot.json
CCBothttps://index.commoncrawl.org/ccbot.json
ChatGPT-Userhttps://openai.com/chatgpt-user.json
Claude-SearchBothttps://claude.com/crawling/bots.json
Claude-Userhttps://claude.com/crawling/bots.json
ClaudeBothttps://claude.com/crawling/bots.json
DuckAssistBothttps://duckduckgo.com/duckassistbot.json
Google-Agenthttps://developers.google.com/static/crawling/ipranges/user-triggered-agents.json
Google-CloudVertexBothttps://developers.google.com/static/crawling/ipranges/common-crawlers.json
Googlebothttps://developers.google.com/static/crawling/ipranges/common-crawlers.json
GoogleOtherhttps://developers.google.com/static/crawling/ipranges/special-crawlers.json
GPTBothttps://openai.com/gptbot.json
OAI-SearchBothttps://openai.com/searchbot.json
Perplexity-Userhttps://www.perplexity.com/perplexity-user.json
PerplexityBothttps://www.perplexity.com/perplexitybot.json
ShapBothttps://docs.parallel.ai/resources/shapbot.json

What rules does CrawlClick apply when it reads a range file?

The parser and the fetch job in the API follow these rules. They are worth copying, because each one exists to stop a vendor’s change from silently switching verification off.

  • Unreadable entries are skipped, not fatal. An entry with an unknown key, or a CIDR that does not parse, is dropped and the rest of the list is kept.
  • Malformed and empty are different. A body that is not JSON (and not Amazon’s page) is an error. A valid document with no prefixes is an empty list.
  • An empty list is never cached. If a vendor’s file comes back empty or fails to fetch, the previous list is kept. Replacing a good list with nothing would turn every genuine request into “no evidence”.
  • Redirects are followed. Vendors have moved these files behind 301s. The fetch job follows a bounded number of hops rather than reading the redirect stub as a broken list.
  • Refresh slowly. The lists change on the order of weeks. CrawlClick’s proxy reloads its cached lists hourly by default; nothing is fetched on the request path.

How do I check an address against the ranges correctly?

Three details decide whether the check is sound:

  1. Use the connecting address. That is the TCP peer, or the client address your CDN sets from its own connection metadata. Never use a client-supplied X-Forwarded-For, which the caller writes. CrawlClick’s Worker deletes X-Forwarded-For and passes Cloudflare’s connecting address to the proxy in a header of its own.
  2. Unmap IPv4-mapped IPv6. A dual-stack server can report ::ffff:203.0.113.9. Convert it to 203.0.113.9 before testing it against IPv4 prefixes, or every IPv4 crawler looks like a spoof.
  3. Only a non-empty list can refute. If you hold a list and the address is outside it, the vendor itself contradicts the claim: treat it as a spoof. If you hold no list, you know nothing either way.

The result is the ip_range tier described on Verification tiers. It is verified, so a request from an ad-eligible agent in an ad-eligible phase can be billed once it reaches it.

How do I load every vendor’s ranges in Node?

This module reads /crawlers.json from this site, fetches every ip_range_source once, and returns a lookup keyed by agent id. It needs Node 22 or later and no packages.

// ranges.mjs — Node 22 or later, no dependencies.
// Loads every published range file the CrawlClick registry names, and checks a request against it.
import { BlockList, isIP } from 'node:net';

const REGISTRY_URL = 'https://docs.crawlclick.com/crawlers.json';

// Amazon embeds the published object in an HTML page with its quotes written as entities.
function embedded(page) {
  const text = page
    .replaceAll('"', '"')
    .replaceAll('"', '"')
    .replaceAll('"', '"')
    .replaceAll('&', '&');
  const at = text.indexOf('"prefixes"');
  const start = at < 0 ? -1 : text.lastIndexOf('{', at);
  if (start < 0) return null;
  let depth = 0;
  let inString = false;
  for (let i = start; i < text.length; i += 1) {
    const c = text[i];
    if (inString) {
      if (c === '\\') i += 1;
      else if (c === '"') inString = false;
    } else if (c === '"') inString = true;
    else if (c === '{') depth += 1;
    else if (c === '}' && --depth === 0) {
      try {
        const doc = JSON.parse(text.slice(start, i + 1));
        return Array.isArray(doc.prefixes) && doc.prefixes.length > 0 ? doc : null;
      } catch {
        return null;
      }
    }
  }
  return null;
}

// The shape Google's list established: {"prefixes":[{"ipv4Prefix":"…"},{"ipv6Prefix":"…"}]}.
export function parsePublished(body) {
  let doc;
  try {
    doc = JSON.parse(body);
  } catch {
    doc = embedded(body);
    if (!doc) throw new Error('not a published range list');
  }
  const cidrs = [];
  for (const p of doc.prefixes ?? []) {
    const s = String(p.ipv4Prefix ?? p.ipv6Prefix ?? '').trim();
    if (!s) continue;
    // A bare address (Amazon lists hosts) is a one-host prefix.
    cidrs.push(s.includes('/') ? s : s.includes(':') ? `${s}/128` : `${s}/32`);
  }
  return cidrs;
}

function toBlockList(cidrs) {
  const list = new BlockList();
  for (const cidr of cidrs) {
    const [net, bits] = cidr.split('/');
    const family = isIP(net);
    if (family === 0) continue; // drop an unparseable entry, keep the rest
    try {
      list.addSubnet(net, Number(bits), family === 6 ? 'ipv6' : 'ipv4');
    } catch {
      // an out-of-range prefix length: skip it
    }
  }
  return list;
}

/**
 * Fetch the registry and every ip_range_source in it. A file that fails or comes back empty keeps
 * the previous load's list for that agent, so a vendor outage never wipes verification.
 * Returns { agents, ranges } where ranges maps agent id -> BlockList.
 */
export async function loadAll(previous) {
  const registry = await (await fetch(REGISTRY_URL)).json();
  const byUrl = new Map();
  const ranges = new Map();
  for (const agent of registry.agents) {
    const url = agent.ip_range_source;
    if (!url) continue;
    if (!byUrl.has(url)) {
      try {
        const res = await fetch(url, { signal: AbortSignal.timeout(15_000) });
        if (!res.ok) throw new Error(`HTTP ${res.status}`);
        const cidrs = parsePublished(await res.text());
        if (cidrs.length === 0) throw new Error('empty list');
        byUrl.set(url, toBlockList(cidrs));
      } catch (err) {
        console.error(`ranges: ${url}: ${err.message}`);
        byUrl.set(url, null);
      }
    }
    const list = byUrl.get(url) ?? previous?.ranges.get(agent.id);
    if (list) ranges.set(agent.id, list);
  }
  return { agents: registry.agents, ranges };
}

/**
 * The claimed agent and the range verdict for one request:
 *   'ip_range'    — the address is in the vendor's list (verified)
 *   'refuted'     — the vendor publishes a list and the address is not in it (treat as a spoof)
 *   'no-evidence' — no list is held for this agent
 * `ip` must be the connecting address (TCP peer or your CDN's client-IP header), never X-Forwarded-For.
 */
export function check({ agents, ranges }, userAgent, ip) {
  const ua = (userAgent ?? '').toLowerCase();
  const agent = agents.find((a) => a.ua_match.some((token) => ua.includes(token)));
  if (!agent) return { agent: null, result: 'not-claimed' };
  const list = ranges.get(agent.id);
  if (!list) return { agent, result: 'no-evidence' };
  const mapped = /^::ffff:(\d+\.\d+\.\d+\.\d+)$/i.exec(ip);
  const addr = mapped ? mapped[1] : ip;
  const family = isIP(addr);
  if (family === 0) return { agent, result: 'refuted' };
  return { agent, result: list.check(addr, family === 6 ? 'ipv6' : 'ipv4') ? 'ip_range' : 'refuted' };
}

Load once at start-up and again on a timer, passing the previous state so a failed fetch keeps the old list:

import { loadAll, check } from './ranges.mjs';

let state = await loadAll();
setInterval(async () => {
  try {
    state = await loadAll(state);
  } catch (err) {
    console.error(`registry reload failed, keeping the last load: ${err.message}`);
  }
}, 60 * 60 * 1000);

// In a request handler (Node's http module):
//   const { agent, result } = check(state, req.headers['user-agent'], req.socket.remoteAddress);

How do I load every vendor’s ranges in Python?

The same loader for Python 3.9 or later, standard library only. ipaddress does the prefix matching and exposes ipv4_mapped for the unmapping step.

"""Load every published AI-crawler IP range the CrawlClick registry names. Python 3.9+, stdlib only."""
import ipaddress
import json
import sys
import urllib.request

REGISTRY_URL = "https://docs.crawlclick.com/crawlers.json"


def _get(url):
    request = urllib.request.Request(url, headers={"User-Agent": "range-loader/1.0"})
    with urllib.request.urlopen(request, timeout=15) as response:  # follows redirects
        return response.read().decode("utf-8", "replace")


def _embedded(page):
    """Amazon embeds the published object in an HTML page, quotes written as entities."""
    for entity in ("&quot;", "&#34;", "&#x22;"):
        page = page.replace(entity, '"')
    page = page.replace("&amp;", "&")
    at = page.find('"prefixes"')
    start = page.rfind("{", 0, at) if at >= 0 else -1
    if start < 0:
        return None
    try:
        doc, _ = json.JSONDecoder().raw_decode(page, start)
    except ValueError:
        return None
    return doc if isinstance(doc, dict) and doc.get("prefixes") else None


def parse_published(body):
    """CIDR strings from a published list. Raises ValueError if the body is not one."""
    try:
        doc = json.loads(body)
    except ValueError:
        doc = _embedded(body)
        if doc is None:
            raise ValueError("not a published range list")
    cidrs = []
    for p in doc.get("prefixes", []):
        s = (p.get("ipv4Prefix") or p.get("ipv6Prefix") or "").strip()
        if s:
            cidrs.append(s if "/" in s else s + ("/128" if ":" in s else "/32"))
    return cidrs


def _networks(cidrs):
    nets = []
    for cidr in cidrs:
        try:
            nets.append(ipaddress.ip_network(cidr, strict=False))
        except ValueError:
            pass  # drop an unparseable entry, keep the rest
    return nets


def load_all(previous=None):
    """Return {"agents": [...], "ranges": {agent_id: [networks]}}.

    A file that fails or comes back empty keeps the previous load's list for that agent.
    """
    registry = json.loads(_get(REGISTRY_URL))
    by_url, ranges = {}, {}
    for agent in registry["agents"]:
        url = agent.get("ip_range_source")
        if not url:
            continue
        if url not in by_url:
            try:
                nets = _networks(parse_published(_get(url)))
                if not nets:
                    raise ValueError("empty list")
                by_url[url] = nets
            except (OSError, ValueError) as err:
                print(f"ranges: {url}: {err}", file=sys.stderr)
                by_url[url] = None
        nets = by_url[url] or (previous or {}).get("ranges", {}).get(agent["id"])
        if nets:
            ranges[agent["id"]] = nets
    return {"agents": registry["agents"], "ranges": ranges}


def check(state, user_agent, ip):
    """(agent or None, result): "ip_range", "refuted", "no-evidence" or "not-claimed".

    `ip` must be the connecting address, never a client-supplied X-Forwarded-For.
    """
    ua = (user_agent or "").lower()
    agent = next((a for a in state["agents"] if any(t in ua for t in a["ua_match"])), None)
    if agent is None:
        return None, "not-claimed"
    nets = state["ranges"].get(agent["id"])
    if not nets:
        return agent, "no-evidence"
    try:
        addr = ipaddress.ip_address(ip)
    except ValueError:
        return agent, "refuted"
    if addr.version == 6 and addr.ipv4_mapped:
        addr = addr.ipv4_mapped
    return agent, ("ip_range" if any(addr in net for net in nets) else "refuted")


if __name__ == "__main__":
    state = load_all()
    agent, result = check(state, sys.argv[1], sys.argv[2])
    print(agent["id"] if agent else "-", result)

Run it from a shell to test one address: python3 ranges.py "Mozilla/5.0 (compatible; GPTBot/1.2)" 203.0.113.9. A linear scan over a few thousand networks is fine for a log job; for a request path, sort the networks and bisect, or load them into a radix tree.

How do I load every vendor’s ranges in Go?

A package for Go 1.21 or later, standard library only. net/netip gives allocation-free prefix checks and Addr.Unmap for the IPv4-mapped case.

// Package botranges loads every published AI-crawler IP range named in the CrawlClick registry.
// Go 1.21 or later, standard library only.
package botranges

import (
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"net/http"
	"net/netip"
	"strings"
	"time"
)

const RegistryURL = "https://docs.crawlclick.com/crawlers.json"

type Agent struct {
	ID            string   `json:"id"`
	Vendor        string   `json:"vendor"`
	Product       string   `json:"product"`
	Phase         string   `json:"phase"`
	AdEligible    bool     `json:"ad_eligible"`
	UAMatch       []string `json:"ua_match"`
	IPRangeSource *string  `json:"ip_range_source"`
}

type registry struct {
	LastReviewed string  `json:"last_reviewed"`
	Agents       []Agent `json:"agents"`
}

type published struct {
	Prefixes []struct {
		IPv4 string `json:"ipv4Prefix"`
		IPv6 string `json:"ipv6Prefix"`
	} `json:"prefixes"`
}

var client = &http.Client{Timeout: 15 * time.Second} // follows redirects

func get(url string) ([]byte, error) {
	resp, err := client.Get(url)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("HTTP %d", resp.StatusCode)
	}
	return io.ReadAll(io.LimitReader(resp.Body, 16<<20))
}

// ParsePublished reads the published shape, including Amazon's copy embedded in an HTML page.
func ParsePublished(body []byte) ([]netip.Prefix, error) {
	var doc published
	if err := json.Unmarshal(body, &doc); err != nil {
		text := strings.NewReplacer(`&quot;`, `"`, `&#34;`, `"`, `&#x22;`, `"`, `&amp;`, `&`).Replace(string(body))
		at := strings.Index(text, `"prefixes"`)
		if at < 0 {
			return nil, err
		}
		start := strings.LastIndex(text[:at], "{")
		if start < 0 {
			return nil, err
		}
		doc = published{}
		if derr := json.NewDecoder(strings.NewReader(text[start:])).Decode(&doc); derr != nil || len(doc.Prefixes) == 0 {
			return nil, err
		}
	}
	var out []netip.Prefix
	for _, p := range doc.Prefixes {
		s := p.IPv4
		if s == "" {
			s = p.IPv6
		}
		s = strings.TrimSpace(s)
		if s == "" {
			continue
		}
		if !strings.Contains(s, "/") { // a bare address is a one-host prefix
			if strings.Contains(s, ":") {
				s += "/128"
			} else {
				s += "/32"
			}
		}
		if pfx, perr := netip.ParsePrefix(s); perr == nil {
			out = append(out, pfx.Masked())
		}
	}
	return out, nil
}

// Ranges is one load of the registry and every vendor list it names.
type Ranges struct {
	Agents []Agent                   // registry order: the first user-agent match wins
	ByID   map[string][]netip.Prefix // agent id -> published prefixes
}

// Load fetches the registry and every ip_range_source. A file that fails or is empty keeps the
// list from previous (which may be nil) for that agent. The returned error joins every failure.
func Load(previous *Ranges) (*Ranges, error) {
	body, err := get(RegistryURL)
	if err != nil {
		return previous, err
	}
	var reg registry
	if err := json.Unmarshal(body, &reg); err != nil {
		return previous, err
	}
	out := &Ranges{Agents: reg.Agents, ByID: map[string][]netip.Prefix{}}
	byURL := map[string][]netip.Prefix{}
	failed := map[string]bool{}
	var errs []error
	for _, a := range reg.Agents {
		if a.IPRangeSource == nil {
			continue
		}
		url := *a.IPRangeSource
		if _, done := byURL[url]; !done && !failed[url] {
			b, err := get(url)
			var nets []netip.Prefix
			if err == nil {
				nets, err = ParsePublished(b)
			}
			if err == nil && len(nets) == 0 {
				err = errors.New("empty list")
			}
			if err != nil {
				failed[url] = true
				errs = append(errs, fmt.Errorf("%s: %w", url, err))
			} else {
				byURL[url] = nets
			}
		}
		nets := byURL[url]
		if len(nets) == 0 && previous != nil {
			nets = previous.ByID[a.ID]
		}
		if len(nets) > 0 {
			out.ByID[a.ID] = nets
		}
	}
	return out, errors.Join(errs...)
}

// Result is the range verdict for one request.
type Result string

const (
	NotClaimed Result = "not-claimed" // the user agent names no registry agent
	NoEvidence Result = "no-evidence" // no list is held for the claimed agent
	Verified   Result = "ip_range"    // the address is in the vendor's list
	Refuted    Result = "refuted"     // a list is held and the address is not in it
)

// Check identifies the claimed agent and tests addr, the connecting address (never X-Forwarded-For).
func (r *Ranges) Check(userAgent string, addr netip.Addr) (*Agent, Result) {
	ua := strings.ToLower(userAgent)
	for i := range r.Agents {
		a := &r.Agents[i]
		for _, token := range a.UAMatch {
			if !strings.Contains(ua, token) {
				continue
			}
			nets := r.ByID[a.ID]
			if len(nets) == 0 {
				return a, NoEvidence
			}
			addr = addr.Unmap() // ::ffff:a.b.c.d must match IPv4 prefixes
			for _, n := range nets {
				if n.Contains(addr) {
					return a, Verified
				}
			}
			return a, Refuted
		}
	}
	return nil, NotClaimed
}

Load returns a usable *Ranges together with a joined error when some files failed, so log the error and keep serving. In an http.Handler, parse the peer with netip.ParseAddrPort(r.RemoteAddr) and pass its Addr().

What should I do with the result?

Treat ip_range as verified and refuted as a spoof: serve the request as you would serve any unverified client, and log it. Treat no-evidence and not-claimed as unverified. A vendor whose agent has no range file may still be verifiable by signature or by reverse DNS; the registry says which. For how these verdicts combine with the other methods, see Verification tiers.