Skip to main content
Set this up in the dashboard: Connect the raw events API gives you the request to copy, waits for your first AI content-page visit to arrive, and confirms the traffic is mapped to the right product. Use this page as the reference.
The raw events API accepts request logs from any source: your own web server, a CDN without a managed export, or a script replaying historical logs. Events land in the same AI traffic metric as every other collector, with AI crawler and agent classification handled on our side. On Cloudflare Enterprise? Cloudflare Logpush streams the same data with zero ongoing work.

Before you start

  • You need a The Prompting Company API key (organization or service-account key) from Settings → API Keys.

Send events

POST a JSON array (a single object also works), plain or gzipped, to https://logs.promptingco.com/v1/events/raw. Authenticate with either an X-API-Key header or Authorization: Bearer.
Requests can be up to 64 MB (compressed and decompressed). Batch as many events per request as fits.

What gets ingested

The Prompting Company keeps recognized AI traffic only when it qualifies as a content-page visit. When present, the method must be GET, the numeric status must be 200299 except 204 and 205 (or 304), and the content type must be text/html or application/xhtml+xml. Numeric status_code values may arrive as JSON numbers or decimal strings. Missing or non-numeric HTTP metadata fails open for page-looking paths. Senders that omit content_type or status_code will still ingest non-HTML AI hits such as JSON APIs unless the path matches a Next.js prefix or an asset suffix. Canonical Next.js prefixes (/_next/static, /_next/image, and /_next/data, lowercase) are always filtered, as are paths ending in common script, stylesheet, source-map, image, font, media, Rive, WASM, JSON, XML, text, or PDF suffixes when content type is missing. Suffix matching is case-insensitive and ignores a trailing slash; an HTML content type keeps a legitimate dotted page such as /docs/node.js.

Responses

Delivery is at-least-once: retry the whole batch after a 503, and occasional duplicates are expected and tolerated by the traffic metrics.

Verify it’s working

A 200 with "ingested": 1 confirms the pipeline, and the visit appears in your AI traffic dashboard shortly after.