Get Claude Code Usage Report
/v1/organizations/usage_report/claude_code
Retrieve daily aggregated usage metrics for Claude Code users. Enables organizations to analyze developer productivity and build custom dashboards.
Query Parameters
starting_at: string
UTC date in YYYY-MM-DD format. Returns metrics for this single day only.
limit: optional number
Number of records per page (default: 20, max: 1000).
maximum1000
minimum1
page: optional string
Opaque cursor token from previous response's next_page field.
Returns
Get Claude Code Usage Report
cURL
curl https://api.anthropic.com/v1/organizations/usage_report/claude_code \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"{
"data": [
{
"actor": {
"email_address": "[email protected]",
"type": "user_actor"
},
"core_metrics": {
"commits_by_claude_code": 8,
"lines_of_code": {
"added": 342,
"removed": 128
},
"num_sessions": 15,
"pull_requests_by_claude_code": 2
},
"customer_type": "api",
"date": "2025-08-08T00:00:00Z",
"model_breakdown": [
{
"estimated_cost": {
"amount": 186,
"currency": "USD"
},
"model": "claude-sonnet-4-20250514",
"tokens": {
"cache_creation": 2340,
"cache_read": 8790,
"input": 45230,
"output": 12450
}
},
{
"estimated_cost": {
"amount": 42,
"currency": "USD"
},
"model": "claude-3-5-haiku-20241022",
"tokens": {
"cache_creation": 890,
"cache_read": 3420,
"input": 23100,
"output": 5680
}
}
],
"organization_id": "12345678-1234-5678-1234-567812345678",
"terminal_type": "iTerm.app",
"tool_actions": {
"edit_tool": {
"accepted": 25,
"rejected": 3
},
"multi_edit_tool": {
"accepted": 12,
"rejected": 1
},
"notebook_edit_tool": {
"accepted": 5,
"rejected": 2
},
"write_tool": {
"accepted": 8,
"rejected": 0
}
},
"subscription_type": "enterprise"
}
],
"has_more": true,
"next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}Returns Examples
{
"data": [
{
"actor": {
"email_address": "[email protected]",
"type": "user_actor"
},
"core_metrics": {
"commits_by_claude_code": 8,
"lines_of_code": {
"added": 342,
"removed": 128
},
"num_sessions": 15,
"pull_requests_by_claude_code": 2
},
"customer_type": "api",
"date": "2025-08-08T00:00:00Z",
"model_breakdown": [
{
"estimated_cost": {
"amount": 186,
"currency": "USD"
},
"model": "claude-sonnet-4-20250514",
"tokens": {
"cache_creation": 2340,
"cache_read": 8790,
"input": 45230,
"output": 12450
}
},
{
"estimated_cost": {
"amount": 42,
"currency": "USD"
},
"model": "claude-3-5-haiku-20241022",
"tokens": {
"cache_creation": 890,
"cache_read": 3420,
"input": 23100,
"output": 5680
}
}
],
"organization_id": "12345678-1234-5678-1234-567812345678",
"terminal_type": "iTerm.app",
"tool_actions": {
"edit_tool": {
"accepted": 25,
"rejected": 3
},
"multi_edit_tool": {
"accepted": 12,
"rejected": 1
},
"notebook_edit_tool": {
"accepted": 5,
"rejected": 2
},
"write_tool": {
"accepted": 8,
"rejected": 0
}
},
"subscription_type": "enterprise"
}
],
"has_more": true,
"next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}