Bot detection & fraud prevention (Business+)
Automated traffic — crawlers, link scanners, uptime monitors, click bots — inflates raw click counts and distorts campaign metrics. On Business+ plans, every click is classified as human or bot, and bot clicks are excluded from your headline analytics so the numbers you report reflect real people.
There are no endpoints to call: classification runs automatically on every redirect. What changes is what the analytics responses tell you.
What you see in analytics
The analytics summary exposes two extra fields on Business+:
| Field | Meaning |
|---|---|
botClicks | Number of clicks classified as bots in the window |
botClicksFiltered | true when bot clicks have been removed from the headline totals |
curl https://api.short.leonai.io/api/v1/analytics/summary \
-H "X-API-Key: $LEONAI_API_KEY"
Response (200 OK, excerpt):
{
"success": true,
"data": {
"totalClicks": 1284,
"botClicks": 47,
"botClicksFiltered": true
}
}
On Business+, totalClicks (and the other headline metrics) already exclude the
botClicks, and botClicksFiltered is true. On lower tiers the classification still
records botClicks for transparency, but headline totals are not filtered.
The same botClicks figure appears in the public shareable analytics
payload, so shared
reports stay consistent with your dashboard.
Related
- Analytics & conversions — the analytics API
- Shareable analytics —
botClicksin public payloads - Billing — tiers and features
- API Reference — the full OpenAPI spec and Swagger UI