[Feature Request] Claude Code Analytics API missing subscription user usage data

Resolved 💬 3 comments Opened Jan 25, 2026 by gsvitak-workwave Closed Jan 29, 2026

Bug Description
Claude Code Analytics report on the Admin Ui shows usage. We need the ability to programmatically pull the Claude Code usage stats via an automated job. Can you please provide some guidance on how we can access the Claude Code usage statistics via an API?

One important note: Our users sign into Claude Code CLI using their username and password for the subscription - not API keys. This way they can use the token limits associated with their enterprise subscription.

However it appears the Claude API to get the usage report does not pull back subscription users who sign in to the CLI using their username and password. When I try to query the Claude Code Administrator API myself, I receive no data.

Here is the curl command I am using.

[](curl "https://api.anthropic.com/v1/organizations/usage_report/claude_code?starting_at=2025-01-21" \
--header "anthropic-version: 2023-06-01" \
--header "x-api-key: [REDACTED]]" --header "User-Agent: workwave/1.0.0 (https://workwave.com)")

API Response: {"data":[],"has_more":false,"next_page":null}

According to the official Claude Code Analytics API documentation, the response payload field called customer type mentions subscription as one the possible data elements. This would indicate this data should be available via the Claude Code Analytics API.

customer_type: Type of customer account (api for API customers, subscription for Pro/Team customers)

I tried to chat with the Fin Support Chat Agent and the agent and the chat agent responded with the subscription usage should be returned via the Claude Code Analytics API. Please see the following copy and pasted response from the chat agent:

Yes, the Claude Code Analytics API will return data for users who sign in with username and password. Users are identified in two ways in the API response:

  • user_actor with their email address (for OAuth authentication like username/password)
  • api_actor with API key name (for API key authentication)

When users authenticate via username/password (OAuth), they'll appear as user_actor entries with their email address in the analytics data. This is the most common authentication method and will definitely show up in your usage reports.

  • I confirmed we are using the latest version of Claude Code.. which is version 2.1.7 or greater.
  • I am using a valid Admin API key.
  • I tried many different dates. All returned no data.

Response from Fin: The API tracks all Claude Code usage regardless of how users authenticate, so your 70 premium users will be visible in the analytics whether they use username/password or API keys. The API tracks all Claude Code usage regardless of authentication method, so your Enterprise Premium users should appear in the analytics data once these requirements are met.

Environment Info

  • Platform: darwin
  • Terminal: WarpTerminal
  • Version: 2.1.19
  • Feedback ID: 01e4b07f-9c0e-4922-9b4f-2cfa6c248ba5

Errors

[{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:1903)\n    at mW (/$bunfs/root/claude:11:35435)\n    at readdirSync (/$bunfs/root/claude:12:1864)\n    at ILR (/$bunfs/root/claude:2215:380)\n    at ILR (/$bunfs/root/claude:2215:1350)\n    at <anonymous> (/$bunfs/root/claude:2215:4440)\n    at <anonymous> (/$bunfs/root/claude:2215:5171)\n    at A (/$bunfs/root/claude:11:7259)\n    at FZ8 (/$bunfs/root/claude:4862:4342)","timestamp":"2026-01-25T01:45:13.629Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Users/gregsvitak/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:1903)\n    at mW (/$bunfs/root/claude:11:35435)\n    at readdirSync (/$bunfs/root/claude:12:1864)\n    at ILR (/$bunfs/root/claude:2215:380)\n    at ILR (/$bunfs/root/claude:2215:1350)\n    at <anonymous> (/$bunfs/root/claude:2215:4483)\n    at <anonymous> (/$bunfs/root/claude:2215:5171)\n    at A (/$bunfs/root/claude:11:7259)\n    at FZ8 (/$bunfs/root/claude:4862:4342)","timestamp":"2026-01-25T01:45:13.629Z"}]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗