Get Daily Activity Summary
Retrieves a summary and list of a user’s activities and activity log entries for a given day.
Scope: activity
Request
GET | /1/user/[user-id]/activities/date/[date].json |
URI Arguments
user-id | required | The encoded ID of the user. Use "-" (dash) for current logged-in user. |
date | required | The date in the format yyyy-MM-dd. |
Request Headers
authorization | required | Specify the token type and Fitbit user’s access token. Token type: Bearer |
accept | optional | The media type of the response content the client is expecting. Supported: application/json |
accept-language | optional | The measurement unit system to use for response values. See Localization. |
accept-locale | optional | The locale to use for response values. See Localization. |
Examples
GET https
-H "accept: application/json" \
-H "authorization: Bearer <access_token>"
Response
Element Name | Description |
activityLog : activityId | The ID of the activity. |
activityLog : activityParentId | The ID of the top level ("parent") activity. |
activityLog : activityParentName | The name of the top level ("parent") activity. |
activities : calories | Number of calories burned during the exercise. |
activities : description | The description of the recorded exercise. |
activities : detailsLink | An endpoint that provides additional details about the user's activity either manually logged on the mobile application or API, or auto-recognized by the Fitbit device. Activities recorded using the device's exercise app are not supported. |
activities : distance | Distance traveled during the on-device recorded exercise. |
activities : duration | The activeDuration (milliseconds) + any pauses that occurred during the activity recording. |
activities : hasActiveZoneMinutes | Supported: true | false |
activities : hasStartTime | Supported: true | false |
activities : isFavorite | Supported: true | false |
activities : lastModified | Timestamp the exercise was last modified. |
activities : logId | The activity log identifier for the exercise. |
activities : name | Name of the recorded exercise. |
activities : startDate | The start date of the recorded exercise. |
activities : startTime | The start time of the recorded exercise. |
activities : steps | Number of steps recorded during the exercise. |
goals : activeMinutes | User defined goal for daily active minutes. |
goals : caloriesOut | User defined goal for daily calories burned. |
goals : distance | User defined goal for daily distance traveled. |
goals : floors | User defined goal for daily floor count. |
goals : steps | User defined goal for daily step count. |
summary : activeScore | |
summary : activityCalories | The number of calories burned for the day during periods the user was active above sedentary level. This includes both activity burned calories and BMR. |
summary : caloriesEstimationMu | Total estimated calories burned for the day based on measurement uncertainty. |
summary : caloriesBMR | Total BMR calories burned for the day. |
summary : caloriesOut | Total calories burned for the day (daily timeseries total). |
summary : caloriesOutUnestimated | Total unestimated calories burned for the day. |
summary : distances : activity | Supported: <activity name> |
total | tracker |
loggedActivities | veryActive |
moderatelyActive | lightlyActive |
sedentaryActive |
summary : distances : distance | For the specified resource, the distance traveled for the day displayed in the units defined by the Accept-Language header. |
summary : elevation | The elevation traveled for the day displayed in the units defined by the Accept-Language header. |
summary : fairlyActiveMinutes | Total minutes the user was fairly/moderately active. |
summary : floors | The equivalent floors climbed for the day displayed in the units defined by the Accept-Language header. |
summary : heartRateZones : caloriesOut | The Heart Rate scope is required to see this value. |
summary : heartRateZones : max | The Heart Rate scope is required to see this value. |
summary : heartRateZones : min | The Heart Rate scope is required to see this value. |
summary : heartRateZones : minutes | The Heart Rate scope is required to see this value. |
summary : heartRateZones : name | Heart Rate scope is required to see this value. Supported: Out of Range |
Fat Burn | Cardio |
Peak |
summary : lightlyActiveMinutes | Total minutes the user was lightly active. |
summary : marginalCalories | Total marginal estimated calories burned for the day. |
summary : restingHeartRate | The user’s calculated resting heart rate. The Heart Rate scope is required to see this value. See Resting Heart Rate. |
summary : sedentaryMinutes | Total minutes the user was sedentary. |
summary : steps | Total steps taken for the day. |
summary : useEstimation | Boolean value stating if estimations are used in
calculations. Supported: true | false |
summary : veryActiveMinutes | Total minutes the user was very active. |
{ "activities": [], "goals": { "activeMinutes": 30, "caloriesOut": 1950, "distance": 8.05, "floors": 10, "steps": 6800 }, "summary": { "activeScore": -1, "activityCalories": 525, "calorieEstimationMu": 2241, "caloriesBMR": 1973, "caloriesOut": 2628, "caloriesOutUnestimated": 2628, "customHeartRateZones": [ { "caloriesOut": 2616.7788, "max": 140, "min": 30, "minutes": 1432, "name": "Below" }, { "caloriesOut": 0, "max": 165, "min": 140, "minutes": 0, "name": "Custom Zone" }, { "caloriesOut": 0, "max": 220, "min": 165, "minutes": 0, "name": "Above" } ], "distances": [ { "activity": "total", "distance": 1.26 }, { "activity": "tracker", "distance": 1.26 }, { "activity": "loggedActivities", "distance": 0 }, { "activity": "veryActive", "distance": 0 }, { "activity": "moderatelyActive", "distance": 0 }, { "activity": "lightlyActive", "distance": 1.25 }, { "activity": "sedentaryActive", "distance": 0 } ], "elevation": 0, "fairlyActiveMinutes": 0, "floors": 0, "heartRateZones": [ { "caloriesOut": 1200.33336, "max": 86, "min": 30, "minutes": 812, "name": "Out of Range" }, { "caloriesOut": 1409.4564, "max": 121, "min": 86, "minutes": 619, "name": "Fat Burn" }, { "caloriesOut": 6.98904, "max": 147, "min": 121, "minutes": 1, "name": "Cardio" }, { "caloriesOut": 0, "max": 220, "min": 147, "minutes": 0, "name": "Peak" } ], "lightlyActiveMinutes": 110, "marginalCalories": 281, "restingHeartRate": 77, "sedentaryMinutes": 802, "steps": 1698, "useEstimation": true, "veryActiveMinutes": 0 } }
Response Headers
content-type | The media type of the response content being sent to the client. Supported: application/json |
fitbit-rate-limit-limit | The quota number of calls. |
fitbit-rate-limit-remaining | The number of calls remaining before hitting the rate limit. |
fitbit-rate-limit-reset | The number of seconds until the rate limit resets. |
Note: The rate limit headers are approximate and asynchronously updated. This means that there may be a minor delay in the decrementing of remaining requests. This could result in your application receiving an unexpected 429 response if you don't track the total number of requests you make yourself.
Response Type
HTTP Status Code | HTTP response code. List of codes are found in the Troubleshooting Guide. |
Status Message | Description of the status code. |
Response Body | Contains the JSON response to the API call. When errors are returned by the API call, the errorType, fieldName and message text will provide more information to the cause of the failure. |
Response Codes
200 | A successful request. |
400 | The request had bad syntax or was inherently impossible to be satisfied. |
401 | The request requires user authentication. |
Note: For a complete list of response codes, please refer to the Troubleshooting Guide.
Additional Information
The activity log entries for a given day are displayed in the format requested using units in the unit system corresponding to the Accept-Language header provided.
Privacy Setting
The Fitbit privacy setting Activities (“Friends Only” and “Public”) grants access to a user's resource with the exception that the response DOES NOT include a detailed list of activity log entries.
Considerations
- Daily summary data and daily goals for elevation (elevation, floors) only included for users with a device with an altimeter.
- The steps field in activity log entries included only for activities that have steps (e.g. "Walking", "Running"); distance only included when it is relevant.
- Calorie burn goal (caloriesOut) represents either dynamic daily target from the premium trainer plan or manual calorie burn goal. Goals are included in the response only for today and 21 days in the past.
Retrieving heart rate data within the activity response
The Heart Rate Zones data array can be displayed within this endpoint's response. For this to occur, the following are required. If any of the items are missing, the data array will not be displayed.
- The heartrate scope enabled by the user.
- A heart rate enabled device paired to the user's account.
- Heart rate data recorded by the device.
Distance, pace and speed
The Fitbit devices use the following formulas to calculate distance, pace and speed. Please note, stride length is approximated by the person's height and gender.
distance = steps * stride length
pace = time(sec) / distance
speed = distance / time(hour)
Daily activity summary and auto-detected exercises' (recorded using Smart Track) distance are estimated values based on steps and stride length. Devices that support on-device or connected GPS will record distance, pace and speed from the GPS data when the exercise is initiated using the on-device Exercise application. If the person begins moving before receiving a GPS signal, steps and stride length are used to calculate distance until the GPS connects. Intraday distance values, returned by the Intraday endpoints or Activity TCX endpoint, can be more accurate since they use the GPS data. To determine how the exercise was recorded, see "logType" values.
Some people have noticed that the standard formula for calculating pace and speed doesn't always provide accurate results. That's because pace and speed are calculated from the GPS data, while the total distance is an approximate value based on how the tracker calculates distance (GPS vs steps & stride length). The mobile application duplicates the tracker distance value by displaying the exercise summary view. This is done to provide a better user experience for the consumer. When the user drills down into the exercise details, like data charts or maps, they should see the more accurate data coming from the GPS or Intraday data.
Developers who need to display the most accurate distance values, we suggest using only the intraday distance data points instead of the activity summary.
See How does my Fitbit device calcuate my daily activity? for more information.
Webhook notifications
The Fitbit Web API can send notifications when a Fitbit user has new data to download. This is possible by implementing the Subscription API and subscribing to one or more data collections. See Using Subscriptions. Whenever the activity service recognizes a change to the user’s data, a notification is sent to your application’s subscriber.
The activity collection recognizes changes to a user’s recorded activities, step count, calories burned, distance traveled, etc. Keep in mind that even when a person is not in motion, their body is burning calories. It’s possible to receive activity notifications representing calorie burn even when the user is sleeping or stationary. Today, you cannot subscribe to a subset of the user’s activity data. So, it is the responsibility of your application to query the necessary activity endpoint(s) to reconcile the data in your system.
Resting Heart Rate
Resting heart rate is a measurement of how many times the person’s heart beats per minute when completely at rest. Typically, resting heart rate ranges from 60-100 bpm, but the rate can vary based on age and fitness level. The best time to get an accurate resting heart rate reading is while the person is asleep. To calculate resting heart rate, the device takes the heart rate measurements throughout the day and focuses on periods when the person is still and well-rested, with a priority for during sleep measurements. If there isn't enough data, a resting heart rate value won't be available for that day.