Link Analytics
Get analytics on shortened links
Return analytics for all shortened links or a single link for a given link ID. For example:
https://api.acme.com/api/links/yC0fTlreturns analytics for IDyC0fTlhttps://api.acme.com/api/linksreturns all link analytics.
Header Parameters
AuthorizationstringrequiredPath Parameters
idstringProvide the shortened link ID returned from the POST /links request as a path parameter. For
example: https://api.acme.com/api/links/yC0fTl If no link ID is provided, all links are
returned.
Query Parameters
fromCreatedDatestringGet history of links shortened after this date. Accepts a UTC date time.
For example, use format YYYY-MM-DDThh:mm:ssZ and send as 2026-07-08T12:30:00Z.
Please see utctime for more examples.
toCreatedDatestringGet history of links shortened before this date. Accepts a UTC date time.
For example, use format YYYY-MM-DDThh:mm:ssZ and send as 2026-07-08T12:30:00Z.
Please see utctime for more examples.
fromClickDatestringGet history of links clicked after this date. Accepts a UTC date time.
For example, use format YYYY-MM-DDThh:mm:ssZ and send as 2026-07-08T12:30:00Z.
Please see utctime for more examples.
toClickDatestringGet history of links clicked before this date. Accepts a UTC date time.
For example, use format YYYY-MM-DDThh:mm:ssZ and send as 2026-07-08T12:30:00Z.
Please see utctime for more examples.
curl \
-H "Authorization: Bearer API_Key" \
-H 'Content-Type: application/json' \
-X GET https://api.acme.com/api/links/yC0fTl{
"status": "success",
"analytics": {
"browserCounts": {
"chrome": 15
},
"created": "2023-06-29T00:57:12.220Z",
"id": "yC0fTl",
"originalUrl": "https://www.acme.com/?utm_source=google_ads",
"refererCounts": {},
"shortUrl": "https://ayrs.io/yC0fTl",
"socialClicks": {},
"status": "success",
"totalClicks": 15,
"utmSource": "google_ads"
}
}