---
title: "Get Claude Code Usage Report"
method: GET
path: "/v1/organizations/usage_report/claude_code?beta=true"
---

# Get Claude Code Usage Report

`GET /v1/organizations/usage_report/claude_code?beta=true`

Retrieve daily aggregated usage metrics for Claude Code users.
Enables organizations to analyze developer productivity and build custom dashboards.

## Query parameters

- `starting_at` string, date, required — UTC date in YYYY-MM-DD format. Returns metrics for this single day only.
- `limit` integer — Number of records per page (default: 20, max: 1000).
- `page` string, nullable — Opaque cursor token from previous response's `next_page` field.

## Headers

- `x-api-key` string — Your unique Admin API key for authentication. This key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys).
- `anthropic-version` string — The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).

## Response `200`

Successful Response

- BetaGetClaudeCodeUsageReportResponse
  - `data` BetaClaudeCodeUsageReportItem[], required — List of Claude Code usage records for the requested date.
    - `actor` union, required — The user or API key that performed the Claude Code actions.
      - BetaClaudeCodeUserActor
        - `email_address` string, required — Email address of the user who performed Claude Code actions.
        - `type` 'user_actor', required — Actor type. Always `"user_actor"` for a user.
      - BetaClaudeCodeApiActor
        - `api_key_name` string, required — Name of the API key used to perform Claude Code actions.
        - `type` 'api_actor', required — Actor type. Always `"api_actor"` for an API key.
    - `core_metrics` BetaCoreMetrics, required
      - `commits_by_claude_code` integer, required — Number of git commits created through Claude Code's commit functionality.
      - `lines_of_code` BetaLinesOfCode, required
        - `added` integer, required — Total number of lines of code added across all files by Claude Code.
        - `removed` integer, required — Total number of lines of code removed across all files by Claude Code.
      - `num_sessions` integer, required — Number of distinct Claude Code sessions initiated by this actor.
      - `pull_requests_by_claude_code` integer, required — Number of pull requests created through Claude Code's PR functionality.
    - `customer_type` 'api' | 'subscription', required
    - `date` string, date-time, required — UTC day the usage metrics cover, as an RFC 3339 timestamp at midnight UTC (for example `2025-08-08T00:00:00Z`).
    - `is_remote` boolean, required — Whether the usage came from remote Claude Code sessions, such as Claude Code on the web. Remote and local usage are reported as separate rows.
    - `model_breakdown` BetaModelBreakdown[], required — Token usage and cost breakdown by AI model used.
      - `estimated_cost` BetaEstimatedCost, required
        - `amount` integer, required — Estimated cost amount in minor currency units (e.g., cents for USD).
        - `currency` string, required — Currency code for the estimated cost (e.g., 'USD').
      - `model` string, required — Name of the AI model used for Claude Code interactions.
      - `tokens` BetaTokenUsage, required
        - `cache_creation` integer, required — Number of cache creation tokens consumed by this model.
        - `cache_read` integer, required — Number of cache read tokens consumed by this model.
        - `input` integer, required — Number of input tokens consumed by this model.
        - `output` integer, required — Number of output tokens generated by this model.
    - `organization_id` string, required — ID of the organization that owns the Claude Code usage.
    - `subscription_type` 'enterprise' | 'team'
    - `terminal_type` string, required — Type of terminal or environment where Claude Code was used.
    - `tool_actions` object, required — Breakdown of tool action acceptance and rejection rates by tool type.
  - `has_more` boolean, required — True if there are more records available beyond the current page.
  - `next_page` string, nullable, required — Opaque cursor token for fetching the next page of results, or null if no more pages are available.

## Other responses

- `4XX` — Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.

## Changes

- **2026-08-26** `942a11636c42` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/anthropics/apis/anthropic-api/changes/v1/organizations/usage_report/claude_code?beta=true/get.md)

---

[API](https://skmtc.dev/anthropics/apis/anthropic-api.md) · [All operations](https://skmtc.dev/anthropics/apis/anthropic-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/anthropics/anthropic-api/revisions/d1d189d791d1/schema)
