---
title: "Bot traffic"
method: GET
path: "/sites/{site}/bot-traffic"
tags: ["Analytics"]
---

# Bot traffic

`GET /sites/{site}/bot-traffic`

## Request

- Base URL: `https://api.onelence.com/v1`
- URL: `https://api.onelence.com/v1/sites/{site}/bot-traffic`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://api.onelence.com/oauth/authorize`, token URL `https://api.onelence.com/oauth/token`, scopes: `analytics:read`)
  - HTTP bearer

Bots, crawlers and AI agents visiting the site: visitors and events by traffic class and category, the most active identified crawlers with identification confidence, and a daily series.

## Path parameters

- `site` string, required

## Query parameters

- `start` string
- `end` string

## Response `200`

Success.

- object
  - `object` 'bot_traffic', required
  - `site` object, required
    - `id` string, required
    - `domain` string, required
  - `window` object, required
    - `start` string, required
    - `end` string, required
  - `classes` object[], required
    - `visitors` number, required
    - `events` number, required
    - `class` string, required
  - `categories` object[], required
    - `visitors` number, required
    - `events` number, required
    - `category` string, required
  - `crawlers` object[], required
    - `visitors` number, required
    - `events` number, required
    - `id` string, required
    - `category` string, nullable, required
    - `confidence` string, nullable, required
  - `series` object[], required
    - `date` string, required
    - `class` string, required
    - `visitors` number, required
  - `bot_pool` object, nullable, required
    - `used_up` boolean, required
    - `renews_at` string, nullable, required
    - `note` string, nullable, required
  - `not_kept` object, nullable, required
    - `categories` object[], required
      - `category` string, required
      - `kept` boolean, required
      - `visits` number, required
    - `bots` object[], required
      - `id` string, required
      - `category` string, required
      - `visits` number, required
    - `note` string, required
  - `note` string, required

## Other responses

- `400`: Invalid input; `error.param` names the field.
- `401`: Missing, expired or revoked token. WWW-Authenticate points to the resource metadata.
- `402`: subscription_required or upgrade_required; the error carries billing_url.
- `403`: insufficient_scope or admin_required.
- `404`: Unknown endpoint, site, source or record.
- `429`: Rate limited. Retry after Retry-After seconds.
- `500`: OneLence could not complete the request.

---

[API](https://skmtc.dev/onelence/apis/onelence-api.md) · [All operations](https://skmtc.dev/onelence/apis/onelence-api/llms.txt) · [OpenAPI document](https://skmtc.dev/onelence/apis/onelence-api/revisions/971c72fe9a42?raw)
