Workout Detection API: Get Recorded Workout Sessions
Updated July 24, 2026
A "workout detection API" gets you a user's recorded workout sessions — a run, a ride, a strength set — with their start time, end time, and activity type. You read them two ways: from an on-device store (Apple HealthKit's HKWorkout on iOS, Android Health Connect's ExerciseSessionRecord on Android) or from a cloud activity API (Strava, Garmin, Fitbit) after the user's device syncs. The important split is auto-detected vs. manually started: some vendors silently recognize activity (Fitbit SmartTrack), while others generally expect the user to start and stop the workout. Best pick: for automatic capture, source from a wearable/vendor that does auto-detection; to just read whatever the user already logged, read the on-device store for the broadest coverage. (This page is about recorded sessions, not AI camera-based rep counting — for that, see AI workout tracking APIs.)
Where you can get workout sessions
Which activity types a source recognizes, and whether it auto-starts, are vendor-specific and change often, so treat this table as a starting point and confirm against each provider's live docs (as of 2026, verify).
| Source | How you access it | Notes |
|---|---|---|
| Apple HealthKit (iOS) | On-device read with per-type permission; no cloud pull | HKWorkout sessions carry an activity type plus fields like totalEnergyBurned. See the HealthKit integration guide |
| Android Health Connect | On-device read with per-record permission; no cloud pull | ExerciseSessionRecord (start time, end time, session type); optional ExerciseSegment and ExerciseLap sub-intervals |
| Strava API v3 | Cloud OAuth 2.0 (post-sync) | Activities via the v3 API; see the Strava integration guide. Verify current display/usage terms in the Strava API Agreement |
| Garmin Activity API | Cloud OAuth 2.0 (post-sync) | Exposes captured activities, downloadable as .FIT / GPX / .TCX |
| Fitbit (SmartTrack) | Cloud OAuth 2.0 (post-sync) | SmartTrack auto-recognizes select activities after sustained movement and logs them without a manual start — verify the current recognized-activity list |
| Aggregators (Terra, Junction, Rook) | One normalized schema over many providers | Normalize "workouts/activity" across sources; see wearable data APIs |
Auto-detect vs. manual start
This is the differentiator to lead with, because it decides whether your app can rely on workouts appearing on their own:
- Fitbit SmartTrack auto-recognizes select activities after roughly 15 minutes of movement (a configurable threshold, commonly cited around 10–90 minutes) and logs them with no manual start. Which activity types it recognizes changes — verify the current Fitbit help list rather than hardcoding it.
- Apple Watch generally relies on the user starting and stopping a workout (with reminder prompts to start or end), rather than fully silent logging. Verify current watchOS behavior before claiming auto-detection.
- Garmin and Strava records reflect activities the device or app captured; auto-start behavior varies by device and setting — verify per device.
A second thing to plan around: activity-type taxonomies differ across sources. HealthKit's workout activity types, Health Connect's exercise session types, and Strava's and Garmin's activity types are not a 1:1 mapping, so if you merge sources you must map their type enums explicitly rather than assume equivalence. Confirm each taxonomy in the provider's data dictionary.
Measured or estimated?
A recorded workout mixes measured and modeled parts, and it is worth being explicit about which is which:
- Duration is measured — the session's start and end boundaries reflect real elapsed time.
- Activity type and session boundaries are algorithmically inferred, especially for auto-detected workouts. Do not present a detected activity type as certain; SmartTrack classifying a session as "walk" vs. "run" is a model's guess.
- Any derived calories or effort are estimates, modeled from heart rate, motion, and the user's profile — see how calorie tracking burns are modeled. These disagree across devices, so never publish an accuracy figure.
Note the distinction this page is built on: a recorded workout session (what HealthKit, Health Connect, Strava, and Garmin give you) is not the same as AI camera-based rep or exercise detection, which classifies movement from a video/pose feed in real time. That is a separate capability covered under AI workout tracking APIs — don't conflate the two.
Which source should you pick?
- You need workouts captured automatically: source from a wearable/vendor that does auto-detection (for example Fitbit SmartTrack). Verify each vendor's current capabilities, because auto-detection support and the recognized-activity list change.
- You just need to read what the user already logged: read the on-device platform store —
HKWorkouton iOS,ExerciseSessionRecordon Android — for the broadest coverage and no post-sync latency, since it inherits whatever apps wrote into the OS. - You want route and per-workout detail across many athletes: Garmin's Activity API delivers standard .FIT/GPX/.TCX files; use Strava only after confirming its display and usage restrictions fit your product.
- You want many brands behind one schema: an aggregator (Terra, Junction, Rook) normalizes workouts across sources so you avoid N integrations.
Before you ship
Auto-detection availability, the list of recognized activity types, activity-type enums, scopes, and field names are all volatile — re-verify each against the vendor's current docs as of 2026. Map activity-type taxonomies explicitly when merging sources, treat a detected activity type as a model's inference rather than fact, and remember that camera-based rep detection is a different capability entirely.
Frequently asked questions
- Which providers auto-detect workouts vs. require a manual start?
- Fitbit SmartTrack auto-recognizes select activities after sustained movement and logs them with no manual start, while Apple Watch generally relies on the user starting and stopping a workout. Garmin and Strava records reflect whatever the device or app captured, and auto-start varies by device and setting. Which activity types are auto-detected changes, so verify each vendor's current docs rather than hardcoding a list.
- How do I read workout sessions on iOS and Android?
- On iOS, read Apple HealthKit's HKWorkout on-device with per-type permission; each session carries an activity type plus fields like totalEnergyBurned. On Android, read Health Connect's ExerciseSessionRecord (start time, end time, session type), with optional ExerciseSegment and ExerciseLap sub-intervals. Both are on-device stores, so there is no cloud pull and no post-sync latency.
- Is a detected workout type accurate?
- The session's duration is measured, but the activity type and session boundaries are algorithmically inferred, especially for auto-detected workouts, so treat the type as a model's guess rather than certain. Any derived calories or effort are estimates that differ across devices. Do not present a detected activity type as fact, and do not publish accuracy percentages.
- Is this the same as AI camera-based rep counting?
- No. This page covers recorded workout sessions from HealthKit, Health Connect, Strava, and Garmin. AI camera-based rep or exercise detection classifies movement from a video or pose feed in real time and is a separate capability, covered under AI workout tracking APIs.
- How do I merge workouts from different sources?
- Activity-type taxonomies differ across HealthKit, Health Connect, Strava, and Garmin, so their type enums are not a 1:1 mapping. If you combine sources, map the taxonomies explicitly instead of assuming equivalence, and confirm each enum in the provider's data dictionary. An aggregator like Terra, Junction, or Rook can normalize workouts across brands for you.
Keep reading
Independent comparison, last reviewed July 24, 2026. Pricing, rate limits, and feature availability change often — confirm current details in each provider’s official documentation before you commit. Product and company names are trademarks of their respective owners; AIFitnessAPI is not affiliated with, endorsed by, or sponsored by any product listed here.
← All health data · by AIFitnessAPI