For Agents
Read and write fitness data points, datasets, and workout sessions for the authenticated Google user across heart rate, steps, distance, calories, and other tracked metrics.
Get started with Fitness API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"get daily step count from google fit"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Fitness API API.
List the data sources connected to a user's Google Fit account
Read raw data points from a specific data source over a time range
Aggregate fitness data into daily or custom buckets via dataset:aggregate
Write new data points to a custom data source
Create and update named workout sessions for the user
GET STARTED
Use for: List the data sources connected to my Google Fit account, Get my step count for the past 7 days as daily totals, Aggregate heart rate data into 5-minute buckets, Write a new running session to Google Fit
Not supported: Does not handle clinical or medical records, prescriptions, or HIPAA-regulated data — use the Cloud Healthcare API for clinical workloads; this API covers consumer fitness tracking only.
The Google Fitness API gives apps programmatic access to a user's fitness tracking data, including steps, heart rate, distance, calories, and workout sessions. It exposes data sources, raw datasets, aggregated reads, and named sessions, all scoped to the authenticated user. Apps can read existing data from connected wearables and write new data points or sessions captured by their own clients.
List sessions filtered by activity type and time range
Detect changes to data points since a last read with dataPointChanges
Patterns agents use Fitness API API for, with concrete tasks.
★ Pull Daily Activity Summaries into a Health Dashboard
Wellness apps want to show a user a daily summary of steps, distance, calories, and active minutes. The Fitness API's dataset:aggregate endpoint groups raw data points from connected sources into daily buckets in a single call, so the dashboard can fetch a week of summary data without paginating through raw points. The aggregation respects the user's connected device sources.
Call POST /me/dataset:aggregate with a 7-day window and bucketByTime of 86400000 ms to fetch daily step counts for the user.
Log Workouts from a Coaching App
Coaching and training apps capture sessions on their own clients (a treadmill run, a yoga class) and need to write them back to Google Fit so the data is available across all the user's apps. The Fitness API supports session create and update, plus matching data point writes against an app-owned data source. Sessions appear in the Fit timeline with the app's name and activity type.
Call PUT /me/sessions/{sessionId} with activityType for running and the start and end times, and write matching heart rate data points to a custom dataSource.
Sync Data on a Schedule
Background services that mirror Google Fit data into a user's account on another platform need to detect what changed since the last sync. The dataPointChanges endpoint returns inserted and deleted points since a token, allowing efficient incremental sync without rereading the full history.
Call GET /me/dataSources/{dataSourceId}/dataPointChanges with the previous pageToken and persist the new points and deletes to the local store.
Agent-Mediated Wellness Reports
An AI wellness assistant can summarise a user's recent activity by querying the Fitness API through Jentic. The agent searches for the aggregate operation, loads the schema, and executes it with the requested time range, returning steps and active minutes for the assistant's reply. The user's OAuth token never enters the agent's prompt context.
Use Jentic to search 'aggregate google fit data', load the dataset:aggregate schema, and execute it for the past 30 days bucketed daily.
13 endpoints — the google fitness api gives apps programmatic access to a user's fitness tracking data, including steps, heart rate, distance, calories, and workout sessions.
METHOD
PATH
DESCRIPTION
/{userId}/dataSources
List a user's data sources
/{userId}/dataSources
Create a custom data source
/{userId}/dataSources/{dataSourceId}/dataPointChanges
Get incremental data point changes
/{userId}/dataset:aggregate
Aggregate fitness data into time buckets
/{userId}/sessions
List workout sessions
/{userId}/sessions/{sessionId}
Create or update a session
/{userId}/dataSources
List a user's data sources
/{userId}/dataSources
Create a custom data source
/{userId}/dataSources/{dataSourceId}/dataPointChanges
Get incremental data point changes
/{userId}/dataset:aggregate
Aggregate fitness data into time buckets
/{userId}/sessions
List workout sessions
Three things that make agents converge on Jentic-routed access.
Credential isolation
User OAuth refresh tokens live encrypted in the Jentic vault. Agents receive scoped, short-lived access tokens for fitness scopes only.
Intent-based discovery
Agents search by intent (e.g., 'get daily steps from google fit') and Jentic returns the dataset:aggregate or sessions list operation with the request schema already populated.
Time to first call
Direct integration: 2-3 days for OAuth verification, scope handling, and aggregate query construction. Through Jentic: under 30 minutes.
Alternatives and complements available in the Jentic catalogue.
Cloud Healthcare API
Stores FHIR, DICOM, and HL7v2 clinical data for regulated healthcare workloads.
Use Cloud Healthcare for clinical-grade, HIPAA-aligned storage; Google Fit for consumer wearable data.
Google Calendar API
Schedules events that often correspond to logged workout sessions.
Pair with Fitness when an agent should turn a logged session into a calendar event or vice versa.
Google Drive API
Stores exported fitness reports or images alongside Fit data.
Use Drive for file storage of generated wellness PDFs; Fitness API for the underlying metric data.
Specific to using Fitness API API through Jentic.
What authentication does the Google Fitness API use?
It uses Google OAuth 2.0 user-consent flows with fitness-specific scopes such as fitness.activity.read and fitness.heart_rate.write. Through Jentic, the user's refreshable OAuth credentials live encrypted in the vault and the agent receives only a scoped bearer token.
Can I read heart rate data with this API?
Yes, when the user grants the fitness.heart_rate.read scope. Read heart rate points by listing the appropriate data source under /me/dataSources and calling the dataset endpoints, or use dataset:aggregate to bucket heart rate samples over time.
What are the rate limits for the Google Fitness API?
Google enforces a default per-user and per-project quota, typically a few queries per second per user. Exceeding the quota returns HTTP 429 and should be retried with exponential backoff.
How do I aggregate a user's daily steps through Jentic?
Search Jentic for 'aggregate google fit data', load the schema for POST /me/dataset:aggregate, and execute it with aggregateBy of com.google.step_count.delta and bucketByTime of 86400000 ms over the desired range.
Is the Google Fitness API free?
Yes, the API itself is free to use. Apps are still subject to Google OAuth verification requirements before they can request restricted fitness scopes from end users.
Can I write data to Google Fit from my own app?
Yes. Create a custom data source under /me/dataSources, then write points to that source via the dataset endpoints, and create matching named sessions via PUT /me/sessions/{sessionId}.
/{userId}/sessions/{sessionId}
Create or update a session