/api/v6/urlshortener/links/{domain}/{code}/statsLink statistics
Range totals, a daily or hourly series and breakdowns by country, device, OS, browser or source.
Scope and limits
API key with the urlshortener service enabled
120 requests per minute
- Windows of up to 366 days by day, and up to 31 days by hour.
- Up to 100 values per dimension.
- On top of that, each query spends units from a quota of 120 per minute for your organization, according to its cost: 2 for the query and 3 for every 31 days of the range. 30 days spend 5; a year, 38. Without units,
429withRetry-After.
Analytics for one link over a window of days: the range totals, a daily or hourly series and the values with the most visits for each dimension. Days and hours are Colombia’s (America/Bogota).
totals.clicksandtotals.uniqueClicksare the range’s;firstClickAtandlastClickAt, the link’s lifetime.- The series is sparse: days or hours without visits are omitted. Fill them with zero if you are going to chart it.
- Each dimension returns the
topvalues with the most visits and, if there is a remainder, an__otherrow. A visit with no value for a dimension (no country, or no source) does not appear in it: its rows can add up to less than the total. referreris only the source domain (www.facebook.com), without the path. Direct visits have no row: they aretotals.clicksminus the sum ofreferrer.deviceismobile,tabletordesktop;os,Android,iOS,Windows,macOS,Linux,ChromeOSorOther;browser,Chrome,Safari,Firefox,Edge,Opera,Samsung Internet,UC BrowserorOther.countryis the ISO code (CO).
uniqueClicks counts the first visit of the day from each browser. Over a multi-day range it is the sum of each day, not distinct people. Responses can be up to one minute old (X-Cache header).
Path parameters
domaindomain. Compared in lowercase. It names the link that answers at that short URL today; for one on a domain that no longer belongs to your organization (domainStatus: released), add domainStatus=released.codeQuery parameters
domainStatusreleased, the link is the one on a domain that no longer belongs to your organization (the one the list returns with domainStatus: released), even if that name is today another domain with the same code. Without it, domain names the domain that has that name today. Any other value returns 400 VALIDATION_INVALID_PARAMETER.releasedfromYYYY-MM-DD in Colombia time, inclusive. Defaults to 29 days before to (a 30-day window).toYYYY-MM-DD in Colombia time, inclusive. Defaults to today.granularityday allows windows of up to 366 days; hour, up to 31.dayhourDefault: day
dimensionscountry, subdivision, city, device, os, browser, referrer. Defaults to country,device,os,browser,referrer. Unknown names are ignored.topDefault: 10
Responses
Link analytics.
{
"success": true,
"data": {
"domain": "h0b.co",
"code": "a1b2c3d",
"shortUrl": "https://h0b.co/a1b2c3d",
"range": { "from": "2026-08-25", "to": "2026-09-23", "granularity": "day", "timezone": "America/Bogota" },
"totals": {
"clicks": 128,
"uniqueClicks": 96,
"firstClickAt": "2026-09-20T15:31:40Z",
"lastClickAt": "2026-09-23T18:22:10Z"
},
"series": [
{ "at": "2026-09-20", "clicks": 40, "uniqueClicks": 31 },
{ "at": "2026-09-23", "clicks": 88, "uniqueClicks": 65 }
],
"dimensions": {
"country": [{ "value": "CO", "clicks": 110 }, { "value": "__other", "clicks": 12 }],
"device": [{ "value": "mobile", "clicks": 101 }, { "value": "desktop", "clicks": 27 }]
}
},
"meta": {
"requestId": "8f0c0e2a4b1d4c8fae2b7a91e0c5d3f6",
"timestamp": "2026-09-23T18:30:00+00:00",
"responseTimeMs": 7.2
}
}A date that is not YYYY-MM-DD, from after to, a window above the limit or an unknown granularity.
Invalid or missing credentials.
The API key does not have the URL shortener enabled (or it is turned off for your organization), the key cannot be used from the request network, or the organization is not active.
No link of your organization with that domain and code (or it was deleted). A link from another organization also returns 404: its existence is not disclosed.
Request limit exceeded.
The query took too long and we stopped it. It happens with very large queries for organizations with many links: narrow it (fewer days, fewer sections, more filters). Repeating it as is does not help.
Possible errors
Codes this endpoint can return in error.code. The full detail lives in the catalog.
AUTH_REQUIREDNo Bearer token was sent, and every call requires one.401AUTH_INVALID_KEYThe API key is not recognized: wrong format, revoked or expired.403AUTH_SERVICE_NOT_ALLOWEDThe key is not allowed to use the service behind this endpoint.403AUTH_IP_NOT_ALLOWEDThe key only works from certain networks and your IP is not one of them.403ACCOUNT_NOT_ACTIVEYour organization is suspended or closed.400STATS_RANGE_INVALIDThe stats range or granularity is invalid.404LINK_NOT_FOUNDNo link with that domain and code.429RATE_TPS_EXCEEDEDYou exceeded your organization quota for this endpoint.504INFRA_DB_QUERY_TIMEOUTAn internal query took too long and was cut off.