AI bots & crawlers

Log drains

Track AI crawlers with no code by forwarding your Vercel or Cloudflare request logs.

If your site runs on Vercel or behind Cloudflare, you can skip the server SDK and send request logs instead. This also counts hits served from the CDN cache, which a middleware never sees.

Both use your secret server key (al_srv_…) from Project settings → General.

In your Vercel team, go to Settings → Log Drains and add a drain:

SettingValue
FormatJSON or NDJSON
Endpointhttps://agentstats.io/api/ingest/hits
Custom headerAuthorization: Bearer al_srv_…

Anything else

Any platform that can POST its logs can use the hits API directly.