Stats
Per-link stats
bash
curl "https://rzwn.link/api/links/example/stats?days=30" \
-H "Authorization: Bearer $API_TOKEN"
daysintegerquerydefault: 30Lookback window for the range-scoped fields below. Max 365.
jsonc
{
"slug": "abc1234",
"totalClicks": 42, // all-time
"lastClickedAt": "2026-07-24T12:34:56.000Z",
"range": {
"days": 30,
"since": "2026-06-24T00:00:00.000Z",
"clicks": 40, // clicks within the range
"uniqueVisitors": 31 // distinct daily-hashed visitors within the range
},
"clicksByDay": [{ "date": "2026-07-20", "count": 5 } /* ... */],
"topReferrers": [{ "referrer": "Direct", "count": 20 } /* ... */],
"topCountries": [{ "country": "US", "count": 30 } /* ... */],
"devices": [{ "device": "mobile", "count": 25 } /* ... */],
"browsers": [{ "browser": "Safari", "count": 28 } /* ... */],
"operatingSystems": [{ "os": "iOS", "count": 25 } /* ... */],
"recentClicks": [
{
"createdAt": "2026-07-24T12:34:56.000Z",
"referrer": "https://twitter.com/",
"country": "US",
"region": "CA",
"city": "San Francisco",
"device": "mobile",
"browser": "Safari",
"os": "iOS"
}
// up to 20, most recent first
]
}
Global stats
bash
curl https://rzwn.link/api/stats \
-H "Authorization: Bearer $API_TOKEN"
jsonc
{
"totalLinks": 12,
"totalClicks": 340,
"clicksToday": 7,
"topLinks": [ /* top 5 links by clickCount */ ]
}
Notes
- No raw IP addresses are ever stored.
uniqueVisitorsis derived from a salted hash of IP + day, rotated daily, purely for approximate unique-visitor counts. country/region/citycome from Vercel's edge geolocation headers and will benullin local development.- See Redirect behavior for what does and doesn't count as a click.