---
title: "How much of a site's traffic was AI agents"
method: GET
path: "/analytics"
tags: ["Analytics"]
---

# How much of a site's traffic was AI agents

`GET /analytics`

## Request

- Base URL: `https://api.opentools.com`
- URL: `https://api.opentools.com/analytics`
- Auth: HTTP bearer

Sessions and pageviews on one site over the last `days` days, split by who visited, with the named agents, each UTC day, and the entry pages. The same numbers as the site's stats page on opentools.com. A session counts on the day it was last seen, so a visit still in progress moves to today.

## Query parameters

- `site` string, required
- `days` integer

## Response `200`

The site's numbers over the window.

- SiteSummary
  - `site` string, required
  - `since` string, date-time, required
  - `until` string, date-time, required
  - `days_count` integer, required: The window length that was asked for.
  - `sessions` integer, required
  - `pageviews` integer, required
  - `visitors` object, required: Sessions by verdict.
    - `agent` integer, required
    - `automation` integer, required
    - `human` integer, required
    - `unclassified` integer, required
  - `agents` object[], required: Named agents by sessions, most first.
    - `type` string, required
    - `name` string, required
    - `sessions` integer, required
  - `days` object[], required: One entry per UTC day that had a session, oldest first.
    - `day` string, required
    - `sessions` integer, required
    - `agent` integer, required
    - `automation` integer, required
    - `human` integer, required
    - `unclassified` integer, required
  - `pages` object[], required: Where sessions started (the first page's origin and path), most first, at most 20.
    - `url` string, required
    - `sessions` integer, required

## Other responses

- `400`: `site` is missing or malformed, or `days` is out of range.
- `401`: The `Authorization` header is missing, or its key is unknown or revoked.
- `404`: No site with this id belongs to your organization.
- `429`: The key made more than 600 requests this minute.
- `503`: The key or the site couldn't be checked just now. Nothing is wrong with the request; retry it shortly.

---

[API](https://skmtc.dev/opentools/apis/opentools-js-api-reference.md) - [All operations](https://skmtc.dev/opentools/apis/opentools-js-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/opentools/apis/opentools-js-api-reference/revisions/ab1463b57d31?raw)
