---
title: "Get historical customer product usage analytics"
method: GET
path: "/admin/billing/analytics/usage"
tags: ["Billing"]
---

# Get historical customer product usage analytics

`GET /admin/billing/analytics/usage`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/admin/billing/analytics/usage`
- Auth: API key in header `x-api-key`

Admin-only retained REST/MCP product counts with exact distinct users, platform/user/endpoint rankings, calendar trends, range-wide excluded populations, separate charged billing credits, partial-period markers and evidence-based recommendations. Internal/test traffic and MCP initialization are excluded from product calls. HTTP 2xx is not a guarantee of MCP application success. Current account plans are not historical plan attribution. All-time covers retained records only. No public MCP tool or SDK entry is exposed.

## Query parameters

- `range` '7d' | '30d' | '90d' | 'all' | 'custom'
- `from` string
- `to` string
- `bucket` 'day' | 'week' | 'month'
- `timezone` 'UTC' | 'Asia/Shanghai'
- `platform` string
- `endpoint` string
- `user_id` string

## Headers

- `x-api-key` string, required

## Response `200`

OK

- BillingUsageAnalyticsResponseDoc
  - `code` integer
  - `data` AdminusageResult
    - `billing` AdminusageBilling
      - `available` boolean
      - `charged_requests` integer
      - `credits` integer
      - `non_billable_requests` integer
      - `requests` integer
      - `work_units` integer
    - `bucket` string
    - `endpoints` AdminusageBreakdown[]
      - `active_endpoints` integer
      - `active_platforms` integer
      - `active_users` integer
      - `avg_latency_ms` number
      - `current_plan` string
      - `five_xx` integer
      - `four_xx` integer
      - `has_account` boolean: HasAccount is set on user rows only: false for historical callers whose account no longer exists, so clients need not match CurrentPlan's label.
      - `key` string
      - `mcp` integer
      - `name` string
      - `not_found` integer
      - `requests` integer
      - `rest` integer
      - `two_xx` integer
      - `user_id` string
    - `from` string
    - `generated_at` string
    - `latest_observed_at` string
    - `platforms` AdminusageBreakdown[]
      - `active_endpoints` integer
      - `active_platforms` integer
      - `active_users` integer
      - `avg_latency_ms` number
      - `current_plan` string
      - `five_xx` integer
      - `four_xx` integer
      - `has_account` boolean: HasAccount is set on user rows only: false for historical callers whose account no longer exists, so clients need not match CurrentPlan's label.
      - `key` string
      - `mcp` integer
      - `name` string
      - `not_found` integer
      - `requests` integer
      - `rest` integer
      - `two_xx` integer
      - `user_id` string
    - `populations` AdminusagePopulations
      - `account_infrastructure` integer
      - `internal_test` integer
      - `logged` integer
      - `mcp_control` integer
      - `mcp_lifecycle` integer
      - `product` integer
      - `unmapped` integer
    - `recommendations` AdminusageRecommendation[]
      - `action` string
      - `detail` string
      - `id` string
      - `title` string
    - `registered_customers` integer
    - `summary` AdminusageMetrics
      - `active_endpoints` integer
      - `active_platforms` integer
      - `active_users` integer
      - `avg_latency_ms` number
      - `five_xx` integer
      - `four_xx` integer
      - `mcp` integer
      - `not_found` integer
      - `requests` integer
      - `rest` integer
      - `two_xx` integer
    - `timeseries` AdminusagePoint[]
      - `active_endpoints` integer
      - `active_platforms` integer
      - `active_users` integer
      - `avg_latency_ms` number
      - `billing_requests` integer
      - `bucket_end` string
      - `bucket_start` string
      - `charged_requests` integer
      - `credits` integer
      - `five_xx` integer
      - `four_xx` integer
      - `mcp` integer
      - `not_found` integer
      - `partial` boolean
      - `requests` integer
      - `rest` integer
      - `two_xx` integer
      - `work_units` integer
    - `timezone` string
    - `to` string
    - `users` AdminusageBreakdown[]
      - `active_endpoints` integer
      - `active_platforms` integer
      - `active_users` integer
      - `avg_latency_ms` number
      - `current_plan` string
      - `five_xx` integer
      - `four_xx` integer
      - `has_account` boolean: HasAccount is set on user rows only: false for historical callers whose account no longer exists, so clients need not match CurrentPlan's label.
      - `key` string
      - `mcp` integer
      - `name` string
      - `not_found` integer
      - `requests` integer
      - `rest` integer
      - `two_xx` integer
      - `user_id` string
    - `warnings` string[]
  - `msg` string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal Server Error
- `503`: Service Unavailable

---

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