# Bot detection & fraud prevention (Business+)

Source: https://developers.leonai.io/docs/guides/bot-detection/

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](https://developers.leonai.io/docs/guides/analytics/#account-wide-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 |

```bash
curl https://api.short.leonai.io/api/v1/analytics/summary \
  -H "X-API-Key: $LEONAI_API_KEY"
```

Response (`200 OK`, excerpt):

```json
{
  "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](https://developers.leonai.io/docs/guides/shareable-analytics/#the-public-analytics-endpoint), so shared
reports stay consistent with your dashboard.

## Related

- [Analytics & conversions](https://developers.leonai.io/docs/guides/analytics/) — the analytics API
- [Shareable analytics](https://developers.leonai.io/docs/guides/shareable-analytics/) — `botClicks` in public payloads
- [Billing](https://developers.leonai.io/docs/guides/billing/) — tiers and features
- [API Reference](https://developers.leonai.io/docs/api-reference/) — the full OpenAPI spec and Swagger UI
