Manual Setup

Send your raw HTTP logs — we automatically detect AI bots. No client-side filtering needed.

Simply send all your HTTP logs. Robot Speed automatically identifies AI bots (ChatGPT, Perplexity, Claude, etc.), filters noise (RSS feeds, static files, training bots), and only stores real citations. No client-side filtering required.

Endpoint

POST https://www.robot-speed.com/api/ai-bot-visits

Authentication

X-API-Key: rs_your_api_key_here

Find your API key in your dashboard: Settings → API

Payload format

Send a JSON array of HTTP log events. Max size: 50 MB per request. You can batch multiple events together.

Fields per event

FieldTypeDescription
timestampstringISO 8601 format
status_codenumberHTTP status code (200, 301, etc.)
request_methodstringGET, POST, etc.
request_pathstringURI path (e.g. /blog/my-article)
query_stringstring | nullQuery parameters (nullable)
content_typestringMIME type (text/html)
client_ipstringVisitor IP (hashed server-side)
hostnamestringDomain name
user_agentstringVisitor user-agent
referrerstring | nullHTTP referer (nullable)

What we do with your logs

  1. 1.We detect AI bots by user-agent (ChatGPT, Perplexity, Claude, Gemini, Mistral, Grok, etc.)
  2. 2.We filter training bots (GPTBot, Bytespider, etc.) — only citation bots are kept
  3. 3.We filter noise (RSS feeds, static files, tag pages)
  4. 4.We deduplicate (same bot + same page = 1 entry per hour)
  5. 5.We hash IPs for privacy — no personal data stored
  6. 6.Results appear in your dashboard

Response

{
  "ok": true,
  "processed": 150,    // total logs received
  "stored": 3,         // AI bot visits stored
  "filtered": {
    "non_bot": 142,    // regular visitors (ignored)
    "noise": 2,        // feeds, static files (ignored)
    "training": 2,     // training bots like GPTBot (ignored)
    "dedup": 1         // duplicates within 1 hour (ignored)
  }
}

cURL

curl -X POST https://www.robot-speed.com/api/ai-bot-visits \
  -H "Content-Type: application/json" \
  -H "X-API-Key: rs_your_api_key_here" \
  -d '[
    {
      "timestamp": "2026-04-03T14:30:00.000Z",
      "status_code": 200,
      "request_method": "GET",
      "request_path": "/blog/my-article",
      "query_string": null,
      "content_type": "text/html",
      "client_ip": "192.168.0.10",
      "hostname": "mysite.com",
      "user_agent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko)...",
      "referrer": "https://www.google.com"
    }
  ]'

Node.js / Express

// Express/Node.js middleware — send ALL requests, we filter
app.use((req, res, next) => {
  // Fire-and-forget: send raw log to Robot Speed
  fetch('https://www.robot-speed.com/api/ai-bot-visits', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': process.env.RS_API_KEY,
    },
    body: JSON.stringify({
      timestamp: new Date().toISOString(),
      status_code: res.statusCode || 200,
      request_method: req.method,
      request_path: req.path,
      query_string: req.url.includes('?') ? req.url.split('?')[1] : null,
      content_type: res.getHeader('content-type') || 'text/html',
      client_ip: req.ip || req.headers['x-forwarded-for'],
      hostname: req.hostname,
      user_agent: req.headers['user-agent'] || '',
      referrer: req.headers['referer'] || null,
    }),
  }).catch(() => {});
  next();
});

PHP

// PHP — add to your index.php or functions.php
// Sends ALL requests, Robot Speed filters AI bots server-side
$data = json_encode([
  'timestamp' => date('c'),
  'status_code' => http_response_code(),
  'request_method' => $_SERVER['REQUEST_METHOD'],
  'request_path' => strtok($_SERVER['REQUEST_URI'], '?'),
  'query_string' => $_SERVER['QUERY_STRING'] ?? null,
  'content_type' => 'text/html',
  'client_ip' => $_SERVER['REMOTE_ADDR'] ?? '',
  'hostname' => $_SERVER['HTTP_HOST'] ?? '',
  'user_agent' => $_SERVER['HTTP_USER_AGENT'] ?? '',
  'referrer' => $_SERVER['HTTP_REFERER'] ?? null,
]);
$ch = curl_init('https://www.robot-speed.com/api/ai-bot-visits');
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => $data,
  CURLOPT_HTTPHEADER => [
    'Content-Type: application/json',
    'X-API-Key: ' . getenv('RS_API_KEY'),
  ],
  CURLOPT_TIMEOUT => 2,
  CURLOPT_RETURNTRANSFER => true,
]);
curl_exec($ch);
curl_close($ch);

Python

# Python / Django / Flask middleware
# Sends ALL requests, Robot Speed filters AI bots server-side
import requests, datetime

def log_request(request, response):
    try:
        requests.post(
            'https://www.robot-speed.com/api/ai-bot-visits',
            json={
                'timestamp': datetime.datetime.utcnow().isoformat() + 'Z',
                'status_code': response.status_code,
                'request_method': request.method,
                'request_path': request.path,
                'query_string': request.META.get('QUERY_STRING'),
                'content_type': response.get('Content-Type', 'text/html'),
                'client_ip': request.META.get('REMOTE_ADDR', ''),
                'hostname': request.get_host(),
                'user_agent': request.META.get('HTTP_USER_AGENT', ''),
                'referrer': request.META.get('HTTP_REFERER'),
            },
            headers={'X-API-Key': os.environ['RS_API_KEY']},
            timeout=2,
        )
    except:
        pass