In short.
This Anthropic documentation page explains the Claude Code Analytics Admin API, an endpoint that returns daily usage, productivity and estimated-cost metrics for Claude Code (Anthropic's AI coding tool), written for organization administrators and developers building internal reports. It excludes activity authenticated through Claude subscription plans. It explains how to retrieve daily UTC aggregates containing sessions, code changes, commits, pull requests, tool acceptance counts and per-model token and estimated cost data. Integration requires eligible organization access, appropriate credentials, pagination and aggregation across multiple records per actor. The metrics support adoption and spending analysis; they do not independently establish productivity gains or return on investment. API behavior and data accuracy were not tested.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete selected documentation page at [https://platform.claude.com/docs/en/manage-claude/claude-code-analytics-api.md], including its eligibility, deployment, authentication, subscription-coverage and freshness notices. All linked pages are excluded. No commands or API requests were executed; live availability, credential compatibility, response accuracy, performance and linked-resource behavior remain untested.
The overview
Identity
Anthropic’s Claude Code Analytics API documentation describes the organization usage endpoint at [https://api.anthropic.com/v1/organizations/usage_report/claude_code]. It is an integration guide for retrieving analytics, rather than a dashboard application.
The source address is [https://platform.claude.com/docs/en/manage-claude/claude-code-analytics-api.md]. The page's front matter lists its documentation address as [https://platform.claude.com/docs/en/manage-claude/claude-code-analytics-api].
Assessment
The guide provides enough detail to plan an integration: authentication options, a request example, parameter limits, response fields and a pagination loop. It is most useful when the Console dashboard lacks the reporting detail or export flexibility an organization needs.
The main interpretive limitation is that activity counts are not direct measurements of useful output. More generated lines, sessions or commits do not by themselves demonstrate better code, faster delivery or financial return. That is an inference about the metrics’ limits, rather than a measured result.
Users
The guide suits organization administrators, engineering operations teams and developers building internal adoption, usage or spending reports. Beginners can use it to understand the available data; implementing a custom report requires familiarity with authenticated HTTP requests and JSON responses.
It has limited value for individuals seeking analytics for Pro or Max subscription sign-ins. Team and Enterprise subscription activity also follows other reporting routes described on the page.
Capabilities
The endpoint reports sessions initiated, lines added and removed, and commits and pull requests created through Claude Code’s corresponding functionality. Tool metrics provide accepted and rejected proposal counts for Edit, MultiEdit, Write and NotebookEdit.
Per-model data includes input, output, cache-read and cache-creation token counts, plus estimated costs. Records identify a user by email address or an API actor by API key name, alongside organization, terminal, customer type, subscription type and whether the session was remote.
These fields can support custom dashboards and historical reporting. The shown dimensions contain no team or project field; allocation to those categories would require additional mapping that the page does not describe.
Using it
Requirements
The endpoint covers Claude Code usage on the Claude API authenticated against a Claude Console organization. The page states that the Admin API is unavailable to claude.ai Team organizations and individual Console accounts. An individual Console account must first establish an organization; a company with a separate Console organization can use that organization where eligible.
Documented authentication options are an Admin API key, an OAuth token with the org:admin scope, or a personal or service account key that is not scoped to a workspace. Workspace API keys do not work. Complete credential-creation and authentication details are delegated to linked documentation.
Claude Platform on AWS users are directed to the Console Usage page. Claude Enterprise activity belonging to claude.ai users requires the separate Enterprise Analytics API and an Analytics API key.
Mechanism
Each request retrieves one UTC day through the required starting_at parameter, formatted as YYYY-MM-DD. The optional limit defaults to 20 records and permits up to 1000. The page parameter accepts an opaque cursor returned in next_page.
An actor can have multiple records for the same date, separated by terminal_type, customer_type, subscription_type and is_remote. The documentation instructs consumers to add those records together for actor-level daily totals. Reporting across multiple days therefore requires separate daily requests.
Continue pagination while has_more is true, passing the returned next_page cursor into the following request. The documentation describes a consistent boundary for each pagination session to avoid missing or duplicating records as new data arrives.
Setup
First establish that the activity belongs to an eligible Claude Console organization and obtain a supported credential. The supplied request uses the x-api-key header and anthropic-version: 2026-10-21. For integrations, the page recommends a User-Agent identifying the application.
An integration needs to parse the JSON response, retrieve every page and combine the relevant actor records. A dashboard also needs a reporting destination and a way to retrieve successive dates. The guide supplies request and response examples, but no complete dashboard implementation.
Example
The documented first-page request for September 8, 2025 is [https://api.anthropic.com/v1/organizations/usage_report/claude_code?starting_at=2025-09-08&limit=20], using the documented authentication and version headers. If the response indicates more records, the next request retains the date and supplies its returned cursor through page.
In the illustrative response, 45 accepted Edit proposals and five rejected proposals produce a 90 percent acceptance rate: accepted divided by accepted plus rejected. The sample estimated_cost.amount of 113 represents 113 US cents, or USD 1.13. These are documentation examples, not observed usage, measured results or model price quotations.
Assessment & evidence
Limitations
This API excludes usage authenticated through Claude subscription plans, including Pro, Max, Team and Enterprise. Although response fields include customer_type and subscription_type, the page explicitly says every record concerns authentication against the Console organization; those fields do not establish subscription-sign-in coverage.
Results are daily aggregates, not real-time events. Commit and pull request counts cover actions created through Claude Code’s respective functionality, and line counts describe code changes rather than their correctness or lasting value.
The page does not specify request rate limits, the earliest available historical date, zero-denominator handling for acceptance rates, or normalization for comparisons with other coding tools. Authentication behavior, completeness and accuracy were not tested.
Reasoning
The documented tradeoff is reporting detail with less integration complexity than OpenTelemetry, at the expense of event-level and real-time visibility. This makes the endpoint a plausible fit for daily adoption summaries and internal spending reports when its authentication coverage matches the organization’s usage.
Correct interpretation depends on preserving the date and dimension fields, combining all relevant actor records and treating costs as estimates. Treating each row as a distinct person would overcount users whenever one actor has several dimension combinations.
Alternatives
The Console Analytics dashboard offers basic reporting without building an API integration [https://platform.claude.com/claude-code]. For subscription-authenticated activity, the page points Team and Enterprise users to claude.ai analytics [https://code.claude.com/docs/en/analytics], and Enterprise organizations to the separate Enterprise Analytics API [https://platform.claude.com/docs/en/manage-claude/analytics-api].
OpenTelemetry is the documented route for real-time monitoring and export on any plan [https://code.claude.com/docs/en/monitoring-usage]. The page also links a broader Usage and Cost Analytics API for organizational token and cost reporting [https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api]. The linked resources’ detailed requirements, pricing and behavior are not established by this page.
Evidence
The evidence consists of the complete documentation page at [https://platform.claude.com/docs/en/manage-claude/claude-code-analytics-api.md], including eligibility notices, authentication guidance, examples, parameters, response fields, pagination and frequently asked questions.
Requests and JSON responses on the page are illustrative documentation, not execution receipts. No API requests were executed. Linked references, authentication guides and alternative products are outside the evidence scope, so their contents and live behavior are not assessed.
Access & freshness
Costs
The page states that the Claude Code Analytics API is free for organizations with Admin API access. This statement concerns access to the analytics endpoint; the page does not establish underlying Claude Code subscription prices, model token rates or the cost of operating a custom reporting integration.
Returned model costs are estimates denominated in US cents, with currency reported as USD. Their relationship to final invoices or subscription charges is not explained. Actual usage costs and implementation costs remain unknown.
Rights
The page does not specify a documentation license, redistribution permission or terms governing republication of API responses. Free endpoint access does not establish those rights.
Records can contain user email addresses and API key names. The selected documentation does not establish consent requirements, permitted secondary uses or access policies for reports containing those identifiers.
Freshness
The documentation capture is dated November 15, 2026 at 06:32:39.914 UTC. Its examples use the anthropic-version header value 2026-10-21; this is an example request version, not evidence of the page’s publication date or the newest supported API version. A publication or last-update date is not established.
The page says activity typically appears within one hour and that responses include only data older than one hour to maintain pagination consistency. It states that historical data remains accessible without a specified deletion period, but gives no precise retention duration or earliest supported date.
Actions
Before implementing a report, identify whether users authenticate through the Console organization or through Claude subscriptions. Choose the reporting route that covers that activity, then consult the linked authentication guide and API reference for current credential and schema details [https://platform.claude.com/docs/en/manage-claude/admin-api#authentication] [https://platform.claude.com/docs/en/api/beta/organization/usage_report/retrieve_claude_code].
For an eligible integration, begin with one UTC day, retrieve every page and inspect how actor records split across dimensions before calculating totals. Preserve cost units and distinguish activity measures from outcome measures. Any claim about productivity improvement or return on investment needs additional outcome evidence beyond these counters.
