Skip to content
POST AI agent ready /v1/short-url/stats

Short URL Stats API - Free Click Analytics

Submit the slug of a shortened URL and receive its click count, original URL, and creation timestamp. Use this to track engagement on links created via the /v1/short-url/create endpoint. Stats update in real time as users click the short link.

Parameters

stringrequired

The slug of the short URL to retrieve stats for.

Code examples

curl -X POST https://api.botoi.com/v1/short-url/stats \
  -H "Content-Type: application/json" \
  -d '{"slug":"getting-started"}'

When to use this API

Track campaign link performance in your admin dashboard

Poll the stats endpoint for each campaign link and display click counts alongside conversion data. This gives your marketing team a clear view of which channels drive traffic.

Trigger automation when a link reaches a click threshold

Check click counts periodically. When a link crosses a threshold (e.g., 1000 clicks), trigger a notification, rotate the link, or update a leaderboard.

Build a reporting page for shared links

Show link creators how many clicks their short URLs received. Display the original URL, creation date, and total clicks in a simple analytics view.

Frequently asked questions

Do click counts update in real time?
Yes. The counter increments on every redirect. There may be a sub-second delay due to eventual consistency in the key-value store, but for practical purposes it is instant.
Can I reset the click counter?
No. There is no endpoint to reset click counts. If you need a fresh counter, create a new short link with a different slug.
What happens if the slug does not exist?
The API returns a 404 error with the code NOT_FOUND. Double-check the slug spelling or create a new short link.
Does the stats endpoint count bot traffic separately?
No. The click counter tracks all redirect requests, including bots, crawlers, and preview fetchers. Filter bot traffic on your side if needed.
Can I get stats for links created by other users?
Yes. Stats are accessible to anyone who knows the slug. There is no ownership or access control on individual short links.

Get your API key

Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.