Claude Enterprise Analytics API reference guide (original) (raw)

Overview

The Claude Enterprise Analytics API gives your organization programmatic access to engagement, adoption, usage, and cost data across Claude surfaces within your Enterprise organization. Whether you're building internal dashboards for user activity, tracking adoption of projects, reconciling spend against your monthly bill, or informing spend limits, this API provides the metrics you need.

Data aggregation

All data is aggregated per organization, per day. Each endpoint returns a snapshot for a single date that you specify. Data for day (N-1) is run at 10:00:00 UTC time on day N, and is available for querying three days after aggregation, to ensure accuracy of data.

If data is not available within the timeline above, this usually indicates a data pipeline failure that our team will need to investigate internally. We are usually aware of such problems, but please raise this to your CSM if you want a gut check, or suspect something else.

The cost and usage endpoints have a different freshness model. See Cost and usage endpoints below for details.

Enabling access

In order to mint new analytics API keys, you must be a Primary Owner within your Enterprise organization. You can do so by navigating to claude.ai/analytics/api-keys.

Some more details that might be helpful:

Base URL

All requests are sent to:

Authentication

Every request requires an API key passed in the x-api-key header. Your API key must have the read:analytics scope. You can create and manage API keys from the claude.ai admin settings under the API Keys section.

Example request headers:

Pagination

Several endpoints return paginated results. Pagination uses a cursor-based approach, where the response includes a next_page token you pass back in your next request to retrieve the following page of results.

Two optional parameters control pagination:

limit (integer): Number of records per page. Defaults to 20 for the /users endpoint and 100 for all other endpoints. For cost and usage endpoints, defaults vary by endpoint and bucket width — see Cost and usage endpoints below. The maximum is 1000.

page (string): The opaque cursor token from the previous response's next_page field. Omit this on your first request.

When there are no more results, next_page will be null in the response.

Error responses

All endpoints return standard HTTP error codes:

Rate limiting

We do have default rate limits in place that apply across all endpoints in this API. If that isn’t sufficient for your use case, we’d love to understand why. If necessary, we can adjust the rate limits for your organization—please reach out to your CSM.

Engagement and adoption endpoints

1. List user activity

GET /v1/organizations/analytics/users

Returns per-user engagement metrics for a single day. Each item in the response represents one user and includes their activity counts across Claude (chat) and Claude Code.

Query parameters

Response fields (per user)

Office Agent metrics (per user)

Each user record also includes an office_metrics object with per-product breakdowns for Excel, PowerPoint, Word, and Outlook. This block is always present on every record—organizations without Office Agent usage see all-zero values rather than null.

The office_metrics object contains four keys: excel, powerpoint, word, and outlook. Each key contains the same six fields:

*Note: Where [product] is one of excel, powerpoint, word, or outlook.

Claude Cowork metrics (per user)

Each user record also includes a cowork_metrics object with per-user Cowork engagement. This block is always present on every record—organizations without Cowork usage see all-zero values rather than null.

Example request

2. Activity summary

GET /v1/organizations/analytics/summaries

Returns a high-level summary of engagement and seat utilization per-day for your organization for a given date range. The response is a list of days with aggregated counts within the date range. Note that the maximum difference between ending_date and starting_date must be 31 days, and there is a three-day delay in data availability. This is useful for tracking daily active users, weekly and monthly trends, and seat allocation at a glance.

We define “active” if any one of the following is true:

Query parameters

Response fields

Example request

3. Chat project usage

GET /v1/organizations/analytics/apps/chat/projects

Returns usage data broken down by chat project for a given date. Projects are specific to Claude (chat), so this endpoint focuses on that surface. Each item shows the project name, how many unique users interacted with it, and the total number of conversations held in that project.

Query parameters

Response fields (per project)

Example request

4. Skill usage

GET /v1/organizations/analytics/skills

Returns skill usage data across both Claude (chat) and Claude Code within your organization for a given date. Each item represents a skill and shows how many unique users used it.

Query parameters

Response fields (per skill)

Office Agent metrics (per skill)

Each skill record also includes an office_metrics object that reports how many Office Agent sessions used the skill, broken down by product. This block is always present—organizations without Office Agent usage see all-zero values.

Claude Cowork metrics (per skill)

Each skill record also includes a cowork_metrics object that reports how many Cowork sessions used the skill. This block is always present—organizations without Cowork usage see all-zero values.

Example request

5. Connector usage

GET /v1/organizations/analytics/connectors

Returns MCP/connector usage data across both Claude (chat) and Claude Code within your organization for a given date. Each item represents a connector and shows how many unique users used it. Connector names are normalized from various sources — for example, "Atlassian MCP server," "mcp-atlassian," and "atlassian_MCP" would all appear as "atlassian."

Query parameters

Response fields (per connector)

Office Agent metrics (per connector)

Each connector record also includes an office_metrics object that reports how many Office Agent sessions used the connector, broken down by product. This block is always present—organizations without Office Agent usage see all-zero values.

Claude Cowork metrics (per connector)

Each connector record also includes a cowork_metrics object that reports how many Cowork sessions used the connector. This block is always present—organizations without Cowork usage see all-zero values.

Example request

Cost and usage endpoints

The cost and usage endpoints give your organization programmatic access to token and USD cost data for Claude (chat), Claude Code, Cowork, Office Agent, and Claude in Chrome.

There are four endpoints in two shapes:

Use the per-user endpoints to answer "who are my top spenders?" Use the bucketed endpoints to answer "how is usage trending day over day, broken down by product?"

Data freshness and finality

Data is typically available within four hours of the underlying usage, but may take up to 24 hours. Each response includes a data_refreshed_at timestamp indicating the export the response was served from; usage that occurred after that watermark is not yet reflected.

Values for a given date may be revised for up to 30 days as late events arrive and reconciliation runs. For invoicing-grade totals, query dates at least 30 days in the past.

When ending_at is omitted (the default is "now"), the response will include a tail of data after data_refreshed_at that is incomplete. For stable results across repeated calls, set ending_at to a value at or before a previously returned data_refreshed_at.

Date range limits

starting_at may be up to 365 days in the past, and a single query may span at most 31 days (ending_at - starting_at). To cover a longer period, issue multiple queries with adjacent windows. No data is available prior to 2026-01-01.

Pagination

All four cost and usage endpoints are paginated with an opaque cursor. The first request returns up to limit rows plus a next_page cursor; pass that cursor unchanged as the page parameter on the next request, and repeat until has_more is false.

Treat next_page as opaque: pass it back unchanged on the next request and send the same query parameters on every page. If a request returns 400 or 410 with a message about the page cursor, discard it and start again from the first page.

Do not change query parameters mid-sequence. Cursors are bound to the filters and date range that issued them. If you change products[], order_by, group_by[], the date range, or any filter and pass an old cursor, you'll get a 400 error.

Serializing list parameters

List parameters use bracket notation: repeat the parameter name with [] for each value.

products[]=chat&products[]=claude_code

The Actor object

Each per-user result row identifies the user who generated the usage.

6. Per-user token usage

GET /v1/organizations/analytics/user_usage_report

Returns per-user token usage across a date range, sorted by the chosen token metric.

Query parameters

Response fields

Example request

7. Per-user cost

GET /v1/organizations/analytics/user_cost_report

Returns per-user USD cost across a date range, sorted by discounted or list-price amount.

Query parameters

Same as user_usage_report, with these differences:

All other parameters (starting_at, ending_at, products[], models[], user_ids[], order, limit, page) are identical.

Response fields

Parsing amounts

amount and list_amount are decimal strings denominated in cents. "41280.000000" represents 41,280 cents (US $412.80). To convert to dollars, parse as a decimal and divide by 100. Avoid binary floating-point parsing for values that may exceed several million dollars.

Example request

8. Token usage over time

GET /v1/organizations/analytics/usage_report

Returns token usage over time, bucketed by minute, hour, or day, optionally broken down by product, model, context window, inference region, or speed.

Query parameters

Response fields

Example request

9. Cost over time

GET /v1/organizations/analytics/cost_report

Returns USD cost over time, bucketed and grouped the same way as usage_report.

Query parameters

Same as usage_report (bucket_width, group_by[], filters, limit, page). The group_by[] values additionally accept cost_type and token_type on this endpoint.

Response fields

Example request


Related Articles

View usage analytics for Team and Enterprise plansGet started with the Claude Enterprise Analytics APIUse analytics chat to ask Claude about usageClaude Enterprise consumption guideClaude Enterprise Admin API reference guide