Links
Get a short link's clicks with the same query API you use for websites, passing link_id instead of website_id.
{
"success": true,
"data": [
{ "parameter": "link_total_clicks", "success": true, "data": [{ "total": 1542 }] },
{ "parameter": "link_clicks_by_day", "success": true, "data": [{ "date": "2026-11-01", "clicks": 125 }] },
{ "parameter": "link_top_referrers", "success": true, "data": [{ "name": "x.com", "referrer": "x.com", "clicks": 523 }] }
]
}The key needs read:data with access to every website in the organization, because links belong to the organization.
Pick query types
With "granularity": "hourly", the time series return one row per hour, for ranges up to 30 days. Dates, filters and batches work as in analytics queries.
Tag links with your own IDs
Set externalId when you add or change a link, such as a partner or company ID. Then list only that partner's links:
curl https://api.databuddy.cc/links/list \
-H "x-api-key: $DATABUDDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "externalId": "company_42" }'Adding and changing links needs write:links; listing needs read:links. The interactive API reference has every link endpoint.
Count clicks on links that leave your website
Clicks from your website to other websites are website analytics, not short-link clicks:
Related
How is this guide?