API /analytics/ai-code/commits Data Not Matching Cursor Analytics V2 UI Chart

Where does the bug appear (feature/product)?

Cursor Analytics_V2 Dashboard

Describe the Bug

We are using the GET /analytics/ai-code/commits endpoint with startDate=7d&endDate=now and aggregating by commitTs to build same below Cursor AI chart. However, data is not matching between API response data and UI chart.

For example, Nov 26, the API sum for Cursor AI is 10,889 but the Analytics V2 UI shows 29,443 for “Cursor AI” on the same date with the same filters (same for Others and Total Lines)

Could you please confirm:

  1. Does the Analytics V2 UI use the same ai-code/commits data source?
  2. Does the UI apply additional filters or normalization not reflected in the API (e.g., repo/branch filters, file-type exclusions, size thresholds, primary-branch logic, timezone differences)?
  3. What is the recommended aggregation logic for API fields to match the Analytics V2 “Cursor AI” chart exactly?

Many Thanks!

Steps to Reproduce

curl ‘https://api.cursor.com/analytics/ai-code/commits?startDate=7d&endDate=now’
-H ‘Authorization: Bearer YOUR_API_TOKEN’

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Unable to find the Cursor Version as I use Web Cursor

Does this stop you from using Cursor

No - Cursor works

Thanks for the report, checking with the team on this!

Could you please do the needful ?

Hi @rareddy, I see you’re already in touch with [email protected] enterprise support - that’s the best avenue for getting the engineering team’s insights on this.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.