QRdx
HelpGuidesDevelopersReact librarySelf-hosting

Get scan analytics

Scan analytics of a code for a range of days.

Totals, a daily series and the top countries, cities, devices, systems, browsers and referrers. sources splits the scans into QR scans and NFC taps (visits through the code's nfcLink), and each listed scan has its source. The range is clamped to how far back the plan's analytics reach: 1 year on Free, the whole history on Pro and Business (retentionDays is then null). With limit above 0 the response also lists individual scans, newest first: pass the response's nextBefore as before for the next page.

On Pro and Business, preciseLocations lists the locations scanners chose to share (rounded to about 100 m) for codes that ask for them, and each scan has latitude, longitude, locationAccuracyM and locationSource. On Free, preciseLocations is null and those fields are null. More in Precise location and geofencing.

Scope: codes:read or codes:write, for API keys and OAuth tokens alike.

GET
/codes/{id}/scans

Authorization

headerAuthorizationBearer <qrdx_ followed by 40 letters and digits>

An API key, sent as Authorization: Bearer qrdx_…. Create one in Settings → API keys & apps: it is shown once. A key acts on the workspace it was created in as its creator, with their current role there, and only within its scopes, the same scopes as OAuth (each operation names the one it needs). API keys.

Path Parameters

id*string

The code's id

Length1 <= length <= 64

Query Parameters

range?string

Days to cover; defaults to 30 days, or the longest range the plan keeps

Value in"7d""30d""90d""365d""1095d"
limit?integer

Individual scans to include (0–500; 0 = totals only)

Range0 <= value <= 500
Default0
before?string

Only scans before this time: the previous nextBefore

Formatdate-time

Response Body

Analytics for the range

application/json
  1. response
data*
Example Request
curl -X GET 'https://api.qrdx.dev/v1/codes/cm5code0spring0menu00001/scans'
Example Response
{  "data": {    "codeId": "cm5code0spring0menu00001",    "range": "7d",    "retentionDays": 365,    "from": "2026-01-06T00:00:00.000Z",    "days": 7,    "total": 42,    "unique": 37,    "series": [      {        "date": "2026-01-06",        "count": 3      },      {        "date": "2026-01-07",        "count": 9      }    ],    "countries": [      {        "value": "DE",        "count": 30      }    ],    "cities": [      {        "city": "Berlin",        "country": "DE",        "count": 21      }    ],    "devices": [      {        "value": "mobile",        "count": 39      }    ],    "os": [      {        "value": "iOS",        "count": 25      }    ],    "browsers": [      {        "value": "Safari",        "count": 24      }    ],    "referrers": [      {        "value": null,        "count": 42      }    ],    "sources": {      "qr": 38,      "nfc": 4    },    "preciseLocations": {      "asked": 18,      "shared": 11,      "points": [        {          "latitude": 52.52,          "longitude": 13.405,          "count": 7,          "accuracyM": 24,          "lastScannedAt": "2026-01-12T18:04:11.000Z"        }      ]    }  }}

Last updated on