Analytics API

Read scan analytics for your QR codes. Needs the analytics:read scope.

Endpoints

Method Endpoint Description
GET /v1/analytics/qrcodes/:id Scan summary, breakdowns and daily timeline
GET /v1/analytics/qrcodes/:id/scans Individual scans
GET /v1/analytics/qrcodes/:id/export Daily totals as CSV or JSON
GET /v1/analytics/aggregate Totals across all (or some) of your QR codes
POST /v1/analytics/qrcodes/:id/reset Start counting from now (admin role)

Date range

Endpoints that take a range accept 24h, 7d, 30d (the default), 90d, 365d or all. Results are limited to your plan's analytics history (Free: the last 7 days, Pro: 365 days, Business and Enterprise: everything). Older scans are kept and come back if you upgrade. The X-Analytics-Retention-Days header says which applies.

Analytics Summary

GET /v1/analytics/qrcodes/:id

Query Parameters

Parameter Type Description
range string See date range (default 30d)
breakdown string Comma-separated: device, os, browser, country, city (default all but city)
timeline boolean false to leave out the daily timeline

Response

{
  "qr_code_id": "qr_5263f2d15b774cde",
  "period": {
    "start": "2026-10-12T12:00:00.000Z",
    "end": "2026-11-11T12:00:00.000Z",
    "range": "30d"
  },
  "summary": {
    "total_scans": 1234,
    "unique_scans": 987,
    "bot_scans": 12
  },
  "breakdown": {
    "by_device": { "mobile": 946, "desktop": 288 },
    "by_os": { "iOS": 534, "Android": 412, "Windows": 180 },
    "by_browser": { "Safari": 534, "Chrome": 456 },
    "by_country": [
      { "country": "US", "count": 456 },
      { "country": "GB", "count": 234 }
    ]
  },
  "timeline": [
    { "date": "2026-11-09", "total": 45, "unique": 38 },
    { "date": "2026-11-10", "total": 52, "unique": 41 }
  ]
}

Individual Scans

GET /v1/analytics/qrcodes/:id/scans

Newest first. Page through with limit (default 50, max 100) and offset.

Response

{
  "data": [
    {
      "id": "8f0c2b9e-…",
      "qr_code_id": "qr_5263f2d15b774cde",
      "device_type": "mobile",
      "browser": "Safari",
      "os": "iOS",
      "country": "US",
      "region": "California",
      "city": "San Francisco",
      "is_unique": true,
      "outcome": "REDIRECTED",
      "created_date": "2026-11-10T14:32:18.000Z"
    }
  ],
  "pagination": {
    "total": 1234,
    "limit": 50,
    "offset": 0,
    "has_more": true
  }
}

Export Analytics

GET /v1/analytics/qrcodes/:id/export

Daily totals: date, total_scans, unique_scans, and scans from mobile, tablet and desktop. Use format=csv (the default, as a file download) or format=json, and range (default all).

curl "https://api.seriousqr.com/v1/analytics/qrcodes/qr_5263f2d15b774cde/export?format=csv&range=30d" \
  -H "Authorization: Bearer qwz_live_xxx" \
  -o analytics.csv

Aggregate Analytics

GET /v1/analytics/aggregate

Totals across your QR codes for a range, with your top performers and a daily timeline. Send qr_ids (comma-separated) to include only some codes.

Real-Time Webhooks

To hear about scans as they happen, add a webhook on the Integrations page (Business and Enterprise plans). Each scan of a QR code's image sends a POST like this:

{
  "event": "scan",
  "qr_code_id": "qr_5263f2d15b774cde",
  "qr_code_name": "Spring Sale Campaign",
  "destination_type": "link",
  "timestamp": "2026-11-10T14:32:18.000Z",
  "device_type": "mobile",
  "os": "iOS",
  "browser": "Safari",
  "country": "US",
  "city": "San Francisco",
  "is_unique": true
}

If you set a secret, the X-SeriousQR-Signature header holds a base64 HMAC-SHA256 of the body, made with that secret. Visits through a code's shortlink are counted in analytics but don't send webhooks yet.

Privacy Note

Analytics data does not include personally identifiable information (PII). IP addresses aren't stored, raw or as a hash of the IP alone; repeat scans are told apart with a daily identifier (a hash that changes every day). Location data is approximate (city-level accuracy).