Bot visits from Cloudflare, Ahrefs or a log, by index.
--import-format cloudflare reads Cloudflare Logpush http_requests (JSON lines; the fields EdgeStartTimestamp in unixnano, unix or rfc3339, ClientRequestHost, ClientRequestURI or ClientRequestPath, ClientRequestUserAgent, EdgeResponseStatus, ClientRequestMethod — a field left out of the Logpush job arrives as null). --import-format ahrefs-bot reads the Ahrefs API v3 bot-analytics/crawled-pages-by-crawler response, JSON or output=csv, with bot_name, count, last_event_time and page: each row is a sum of requests over the requested period with the date of the last one and no status code, and rows Ahrefs marks (spoofed) are dropped; there is no official sample of the CSV export from the Ahrefs interface, so it is not supported. --import-format raw reads an access log (combined or JSON lines, as doctor --logs) or the common CSV this command writes. Everything becomes common rows — date, bot, url, status, plus the bot's index and the number of visits — which --out writes as CSV. The report counts visits per index (google, bing, yandex, baidu, naver, seznam, staan, openai, anthropic, perplexity…, from indexgap/data/bots.json) over the last 30 days of the data (--days), names the search indexes with no visits, and with --sitemap or a build (--root with --site) lists the pages no AI-search bot or assistant ever received as ai-never-crawled. --json writes it all. No network, except a sitemap given as a URL.
usage: indexgap crawlers [-h] --import-format {cloudflare,ahrefs-bot,raw}
[--root ROOT] [--site SITE] [--sitemap SITEMAP]
[--days DAYS] [--out crawls.csv]
[--json-out crawlers.json]
file [file ...]
positional arguments:
file export files, .gz allowed
options:
-h, --help show this help message and exit
--import-format {cloudflare,ahrefs-bot,raw}
export format: cloudflare — Logpush http_requests
(JSON lines); ahrefs-bot — the Ahrefs API v3 bot-
analytics/crawled-pages-by-crawler response (JSON or
CSV); raw — an access log (combined or JSON lines) or
the common CSV date,bot,url,status
--root ROOT build directory: the site's pages for ai-never-crawled
(needs --site)
--site SITE full site address: for paths without a host and for
--root
--sitemap SITEMAP sitemap.xml (path or URL) — the page list for ai-
never-crawled
--days DAYS report window in days up to the last day in the
export, 30 by default
--out crawls.csv write the common rows (date, bot, url, status, index,
visits) to CSV
--json-out crawlers.json
write the report as JSON