AI traffic: custom log shipping
What it does
Section titled “What it does”This endpoint works today. Any server that can send a POST can hand its bot logs to Zeo Radar. Cloudflare Logpush and the Vercel log drain write to the same address under the same contract.
Endpoint and method:
POST https://app.zeoradar.com/api/bot-logs?token=YOUR_INGEST_TOKENAny other method returns 405. Identity is proved in one of two ways: the token query
parameter in the address (the right one for a shipper), or an
Authorization: Bearer <session-token> header together with a brand_id field in the body
(for uploads from the browser).
Headers:
| Header | Value | Required |
|---|---|---|
Content-Type | application/x-ndjson, application/json or application/octet-stream | Yes |
Content-Encoding | gzip, if you are sending gzip | No, the body signature gives it away too |
Authorization | Bearer <session-token> | Only for session-based uploads |
Requirements
Section titled “Requirements”- The Radar Pro or Custom plan, and an ingest token generated in the app.
- A server that can POST outbound over HTTPS.
- An access log carrying at least the user agent, the path, the status code and a timestamp.
- On the AI Traffic screen in the app, choose Connect a continuous stream and copy the token.
- Convert your log into one JSON object per line (NDJSON). The body may also be a JSON array
or an
{"events": [...]}object; all three are read. - Rename your fields to one of the accepted names below. From every line, Zeo Radar pulls:
| Field | Accepted names | Note |
|---|---|---|
| User agent | ua, userAgent, UserAgent, ClientRequestUserAgent, user_agent, proxy.userAgent | May be an array, the first bot match is used. If it is not a bot, the line is dropped silently |
| Path | path, proxy.path, url, RequestURI, ClientRequestURI, request_path, uri | The query string is dropped, 500 characters maximum |
| Timestamp | ts, timestamp, time, EdgeStartTimestamp, datetime | ISO text or a number (seconds, milliseconds and nanoseconds are told apart). If it cannot be read, the current time is written |
| Status code | status, statusCode, proxy.statusCode, EdgeResponseStatus, response_status | null if it is not a number |
| Address | ip, clientIp, proxy.clientIp, ClientIP, remote_addr | null if invalid, the line is still stored |
- POST the batch. Gzip it if you like, compression is unpacked automatically.
curl -X POST "https://app.zeoradar.com/api/bot-logs?token=YOUR_INGEST_TOKEN" \ -H "Content-Type: application/x-ndjson" \ --data-binary @access-log.ndjsonA single-line test:
curl -X POST "https://app.zeoradar.com/api/bot-logs?token=YOUR_INGEST_TOKEN" \ -H "Content-Type: application/x-ndjson" \ -d '{"ts":"2026-08-27T09:15:00Z","ua":"Mozilla/5.0 (compatible; PerplexityBot/1.0)","path":"/urunler/cikolata","status":200,"ip":"203.0.113.10"}'Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Request body | 5 MB |
| Events per request | 5,000 lines, 413 beyond that |
| Decompressed gzip size | 32 MB |
| Database write chunk | 1,000 rows (split automatically, not your concern) |
| Request duration | 30 seconds |
Verify it works
Section titled “Verify it works”A successful response is 200 with this body:
{ "stored": 42, "seen": 1180 }seen is how many lines you sent, stored is how many of them were kept because they were
bots; a gap between the two is normal. Then watch the counter go up on the AI Traffic
screen.
If the response carries a note field, there was nothing to store:
Destination check accepted (a shipper testing the endpoint),
Empty batch accepted (an empty batch),
No AI crawler lines in this batch (the lines were read, none of them were bots).
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
405 Only POST is allowed | GET or another method was used | Send a POST |
401 Unknown ingest token | The token is wrong, or a new one was generated and the old one is now invalid | Get a new token from the app |
401 Sign in, or use an ingest token | Neither the token parameter nor a session header is present | Add ?token=... to the address |
401 Your session has expired | The session token has timed out | Sign in again, or switch to the token method |
401 That brand is not yours | The brand_id in the body does not belong to your organisation | Select the right brand |
413 Send at most 5000 events per request | The batch is too large | Split the batch |
400 Too much at once | The body exceeds 5 MB | Split the batch, or gzip it |
400 This body could not be unpacked | The gzip is corrupt, or unpacks to more than 32 MB | Rebuild the compressed file, make the batch smaller |
400 events array is required | The body is in none of the recognised shapes | Send NDJSON, a JSON array or {"events": [...]} |
502 Could not store these events | The database refused the write, with the detail in the detail field | Include the detail text in your support request |
500 Supabase is not configured on the server | Server-side configuration is missing | On your own installation, define SUPABASE_URL and SUPABASE_PUBLISHABLE_KEY |
200 but stored: 0 | No recognised bot in the lines | Confirm that the user agent field really is being sent |
feedback.question
feedback.thanks