---
title: "Get AI activity report"
method: GET
path: "/api/sites/{id}/ai-activity"
tags: ["Sites"]
---

# Get AI activity report

`GET /api/sites/{id}/ai-activity`

## Request

- Base URL: `https://demo.hitkeep.com`
- URL: `https://demo.hitkeep.com/api/sites/{id}/ai-activity`
- Auth: one of:
  - API key in cookie `hk_token`
  - HTTP bearer
  - API key in header `X-API-Key`

Returns the unified AI activity report for a site: one merged view over tracked AI hits (classified at query time from the user agent and referrer) and server-log AI fetch records. Every count is tracked hits plus fetch records, and each row keeps the provenance split. Repeatable filter=type:value params narrow both sides where the dimension exists on both: ai_bot maps to the fetch assistant name, ai_bot_category to the fetch assistant category (falling back to the agent name for records ingested before that column existed), and path to both. An ai_source filter excludes the fetch side outright because fetch records carry no referrer, while hit-only dimensions such as country or device leave the fetch side unrestricted. The pageviews denominator applies the non-AI filters only. Repeatable goal_id and funnel_id parameters select session cohorts for tracked hits, pageviews, series, and comparison windows; fetch records are never cohort-filtered.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `from` string, date-time
- `to` string, date-time
- `filter` string
- `filter_type` string
- `filter_value` string
- `goal_id` string[]
- `funnel_id` string[]
- `compare_from` string, date-time
- `compare_to` string, date-time

## Response `200`

AI activity report

- AIActivityReport: Unified AI activity report merging tracked AI hits with server-log AI fetch records. Every count follows one rule: tracked hits plus fetch records, and each row exposes its tracked_hits/fetch_count provenance. Path, ai_bot, and ai_bot_category filters apply to both sides; ai_source excludes fetch records; hit-only dimensions leave fetch totals visible. Depth metrics describe the fetch side only, because tracked hits carry no status code, response time, or transferred bytes. Goal and funnel cohorts apply to tracked hits and pageview denominators, never fetch records.
  - `ai_requests` integer
  - `comparison` object: Merged counters for the compare_from/compare_to window. Absent unless a comparison range is requested.
    - `ai_requests` integer
    - `fetch_count` integer
    - `pageviews` integer
    - `paths_crawled` integer
    - `referral_visits` integer
    - `tracked_hits` integer
    - `unique_agents` integer
  - `error_rate_4xx` number
  - `error_rate_5xx` number
  - `fetch_count` integer
  - `median_response_ms` integer
  - `pageviews` integer: Total hits for the range under the non-AI filters only, so the AI share of a segment stays comparable while an AI dimension is drilled into.
  - `paths_crawled` integer: Distinct paths seen on either side, counted before the top-list cap.
  - `referral_visits` integer: Distinct sessions referred by a known AI surface across the whole range.
  - `series` AIActivitySeriesPoint[]
    - `ai_requests` integer: Tracked AI bot hits plus AI fetch records in the bucket.
    - `fetch_count` integer
    - `referral_visits` integer: Distinct sessions referred by a known AI surface inside the bucket. Buckets are not additive: a session spanning two buckets counts in both.
    - `time` string, date-time
    - `tracked_hits` integer
  - `top_agents` AIActivityStat[]
    - `fetch_count` integer
    - `name` string
    - `tracked_hits` integer
    - `value` integer
  - `top_agents_by_category` object: Merged agent top list per AI agent category, keyed by category.
  - `top_categories` AIActivityStat[]
    - `fetch_count` integer
    - `name` string
    - `tracked_hits` integer
    - `value` integer
  - `top_error_paths` AIActivityStat[]
    - `fetch_count` integer
    - `name` string
    - `tracked_hits` integer
    - `value` integer
  - `top_families` AIActivityStat[]
    - `fetch_count` integer
    - `name` string
    - `tracked_hits` integer
    - `value` integer
  - `top_paths` AIActivityStat[]
    - `fetch_count` integer
    - `name` string
    - `tracked_hits` integer
    - `value` integer
  - `top_resource_types` AIActivityStat[]
    - `fetch_count` integer
    - `name` string
    - `tracked_hits` integer
    - `value` integer
  - `top_sources` AIActivityStat[]
    - `fetch_count` integer
    - `name` string
    - `tracked_hits` integer
    - `value` integer
  - `total_bytes` integer
  - `tracked_hits` integer
  - `unique_agents` integer

---

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