Skip to content

Vercel Bot & Crawler Detection

If your site is hosted on Vercel, point a Log Drain at Kitbase to capture every request — including crawlers that never run JavaScript — without adding any code. Vercel POSTs batches of request logs; Kitbase reads each log's proxy object (clientIp, userAgent, method, host, path, referer), classifies the actor, and stores bot/crawler requests. Human requests are ignored.

POST https://ingest.kitbase.dev/ingest/v1/vercel?environment=<ENV_NAME>

Privacy — we only keep the bots

Forwarding every request doesn't mean every request is stored. Human visitors' signals are used only to classify the request in memory and are then discarded — only bot and crawler requests are persisted. For those, the raw IP is stored only when IP logging is enabled for the environment; otherwise it's used to derive geolocation (country, region, city) and then dropped.

Setup

  1. Go to Vercel → your Project or Team → Settings → Log Drains (or use the Vercel API).
  2. Endpoint: https://ingest.kitbase.dev/ingest/v1/vercel?environment=Production — the environment query param is the Kitbase environment name.
  3. Sources: select Static and Edge (add Function if you render on-demand).
  4. Delivery format: JSON or NDJSON — both are accepted.
  5. Custom header: add Authorization: Bearer sk_kitbase_<your_secret_api_key>. This authenticates the drain and resolves your project. Use the secret API key, not the SDK key.
  6. Endpoint verification: Vercel performs a one-time ownership check; Kitbase responds to it automatically via the x-vercel-verify header.

Self-hosting Kitbase?

Set the INGEST_VERCEL_VERIFY environment variable on your Kitbase server to the verification value Vercel shows when creating the drain, so your endpoint echoes it back in the x-vercel-verify response header.

Response

200 OK{ "accepted": <stored bots>, "received": <request logs parsed> }. Non-request logs (build/function output without a proxy object) are ignored.

Next steps

Released under the MIT License.