Prerequisites
- A RankRaft AI site key. Open Integrations, choose Any other site and click Create site key. See Your site key.
- A process that can read your request logs and make outbound HTTPS requests.
Endpoint
Authentication
Send your site key in theX-Site-Key header, with Content-Type: application/json. Store the key as a secret, not in source control.
Request body
Fields
Send every request, not just bot requests. RankRaft AI classifies them for you. Human traffic is counted toward your daily totals so that AI share of traffic is accurate, and it isn’t stored individually.
Examples
202 Accepted:
issues with the index of each failing event.
Best practices
- Batch. Up to 1,000 events and 5 MB per request. Send a batch every few seconds to a minute, not one request per page view.
- Never block the response. Send after the response has gone out, or from a background queue.
- Retry sensibly. On
429or any5xx, keep the batch and retry with backoff. On403or410the site is paused or removed, so stop sending. On any other4xx, drop the batch: it won’t succeed on retry. - Send the real client IP. If you send your proxy’s address, every genuine crawler shows as Spoofed.