Get Claude Code Usage Report changedapi/admin/usage_report/retrieve_claude_code
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+28added
Lines−31removed
From line
1
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits5to this page, all time
# Get Claude Code Usage Report ## Query parameters ## Returns ## Example ### Response (200) ## Get Claude Code Usage Report ### Query Parameters ### Returns ### Example #### Response
The whole hunk
from line 1, old and new numbered
/
from line 1
1---
2title: Get Claude Code Usage Report
3url: https://platform.claude.com/docs/en/api/admin/usage_report/retrieve_claude_code
4---
1# Get Claude Code Usage Report
52
6## Get Claude Code Usage Report
3**GET** `/v1/organizations/usage_report/claude_code`
74
8**get** `/v1/organizations/usage_report/claude_code`
9
105Retrieve daily aggregated usage metrics for Claude Code users.
116Enables organizations to analyze developer productivity and build custom dashboards.
127
13### Query Parameters
8## Query parameters
149
1510- `starting_at: string`
1611
1712 UTC date in YYYY-MM-DD format. Returns metrics for this single day only.
1813
14 pattern: ^\d{4}-\d{2}-\d{2}$
15
1916- `limit: optional number`
2017
2118 Number of records per page (default: 20, max: 1000).
2219
20 default: 20, maximum: 1000, minimum: 1
21
2322- `page: optional string`
2423
2524 Opaque cursor token from previous response's `next_page` field.
2625
27### Returns
26## Returns
2827
29- `ClaudeCodeUsageReport object { data, has_more, next_page }`
28- `ClaudeCodeUsageReport object`
3029
31 - `data: array of object { actor, core_metrics, customer_type, 7 more }`
30 - `data: array of object`
3231
3332 List of Claude Code usage records for the requested date.
3433
35 - `actor: object { email_address, type } or object { api_key_name, type }`
34 - `actor: object or object`
3635
3736 The user or API key that performed the Claude Code actions.
3837
39 - `UserActor object { email_address, type }`
38 - `UserActor object`
4039
4140 - `email_address: string`
4241
from line 45
4645
4746 Actor type. Always `"user_actor"` for a user.
4847
49 - `"user_actor"`
48 - `APIActor object`
5049
51 - `APIActor object { api_key_name, type }`
52
5350 - `api_key_name: string`
5451
5552 Name of the API key used to perform Claude Code actions.
from line 55
5855
5956 Actor type. Always `"api_actor"` for an API key.
6057
61 - `"api_actor"`
58 - `core_metrics: object`
6259
63 - `core_metrics: object { commits_by_claude_code, lines_of_code, num_sessions, pull_requests_by_claude_code }`
64
6560 Core productivity metrics measuring Claude Code usage and impact.
6661
6762 - `commits_by_claude_code: number`
from line 63
6863
6964 Number of git commits created through Claude Code's commit functionality.
7065
71 - `lines_of_code: object { added, removed }`
66 - `lines_of_code: object`
7267
7368 Statistics on code changes made through Claude Code.
7469
from line 96
10196 UTC day the usage metrics cover, as an RFC 3339 timestamp at midnight UTC
10297 (for example `2025-08-08T00:00:00Z`).
10398
99 format: date-time
100
104101 - `is_remote: boolean`
105102
106103 Whether the usage came from remote Claude Code sessions, such as Claude Code
107104 on the web. Remote and local usage are reported as separate rows.
108105
109 - `model_breakdown: array of object { estimated_cost, model, tokens }`
106 - `model_breakdown: array of object`
110107
111108 Token usage and cost breakdown by AI model used.
112109
113 - `estimated_cost: object { amount, currency }`
110 - `estimated_cost: object`
114111
115112 Estimated cost for using this model
116113
from line 123
126123
127124 Name of the AI model used for Claude Code interactions.
128125
129 - `tokens: object { cache_creation, cache_read, input, output }`
126 - `tokens: object`
130127
131128 Token usage breakdown for this model
132129
from line 151
154151
155152 Type of terminal or environment where Claude Code was used.
156153
157 - `tool_actions: map[object { accepted, rejected } ]`
154 - `tool_actions: map[object]`
158155
159156 Breakdown of tool action acceptance and rejection rates by tool type.
160157
from line 179
182179
183180 Opaque cursor token for fetching the next page of results, or null if no more pages are available.
184181
185### Example
182## Example
186183
187```http
184```bash
188185curl https://api.anthropic.com/v1/organizations/usage_report/claude_code \
189186 -H 'anthropic-version: 2023-06-01' \
190187 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
191188```
192189
193#### Response
190### Response (200)
194191
195192```json
196193{
No line in this hunk matches that.