Get Heart Rate Intraday by Date
chevron down
 

Get Heart Rate Intraday by Date

This endpoint retrieves the heart rate intraday time series data on a specific date or 24 hour period. Intraday support can extend the detail-level response to include 1sec, 1min, 5min or 15min for Heart Rate.

3rd-party developers who want access to retrieve other Fitbit users’ Intraday data through the “Client” or “Server” application type should submit a request by filling out this form. A Fitbit developer’s personal Intraday data is automatically available through the “Personal” application type. You do not need to submit a request.

Scope: heartrate


Request

GET /1/user/[user-id]/activities/heart/date/[date]/1d/[detail-level].json

/1/user/[user-id]/activities/heart/date/[date]/1d/[detail-level]/time/[start-time]/[end-time].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 or today
detail-level required Number of data points to include
Supported: 1sec | 1min | 5min | 15min
start-time optional The start of the time period in the format HH:mm.
end-time optional The end of the time period in the format HH:mm.

Query Parameters
timezone optional Returns the response from the specified timezone.
Supported: UTC
string

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://api.fitbit.com/1/user/-/activities/heart/date/2019-01-01/1d/1min.json
GET https://api.fitbit.com/1/user/GGNJL9/activities/heart/date/2019-01-01/1d/1min.json

GET https://api.fitbit.com/1/user/-/activities/heart/date/2019-01-01/1d/1min/time/08:00/08:30.json
GET https://api.fitbit.com/1/user/GGNJL9/activities/heart/date/2019-01-01/1d/1min/time/08:00/08:30.json
curl -X GET "https://api.fitbit.com/1/user/-/activities/heart/date/2019-01-01/1d/1min.json" \
-H "accept: application/json" \
-H "authorization: Bearer <access_token>"

curl -X GET "https://api.fitbit.com/1/user/-/activities/heart/date/2019-01-01/1d/1min/time/08:00/08:30.json" \
-H "accept: application/json" \
-H "authorization: Bearer <access_token>"


Response

Element Name Description
activities-heart : datetime Date of the heart rate log
activities-heart : value : customHeartRateZone : caloriesOut Number calories burned with the custom heart rate zone
activities-heart : value : customHeartRateZone : max Maximum range for the custom heart rate zone
activities-heart : value : customHeartRateZone : min Minimum range for the custom heart rate zone
activities-heart : value : customHeartRateZone : minutes Number minutes withing the custom heart rate zone
activities-heart : value : customHeartRateZone : name Name of the custom heart rate zone
activities-heart : value : HeartRateZone : caloriesOut Number calories burned with the specified heart rate zone
activities-heart : value : HeartRateZone : max Maximum range for the heart rate zone
activities-heart : value : HeartRateZone : min Minimum range for the heart rate zone
activities-heart : value : HeartRateZone : minutes Number minutes withing the specified heart rate zone
activities-heart : value : HeartRateZone : name Name of the heart rate zone
activities-heart : value : restingHeartRate The user’s calculated resting heart rate. See Resting Heart Rate.
activities-heart-intraday : dataset : time The time the intraday heart rate value was recorded
activities-heart-intraday : dataset : value The intraday heart rate value
activities-heart-intraday : datasetInterval The requested detail-level numerical interval
activities-heart-intraday : datasetType The requested detail-level unit of measure
{
  "activities-heart": [
    {
      "dateTime": "2019-05-08",
      "value": {
        "customHeartRateZones": [
          {
            "caloriesOut": 1164.09312,
            "max": 90,
            "min": 30,
            "minutes": 718,
            "name": "Below"
          },
          {
            "caloriesOut": 203.65344,
            "max": 110,
            "min": 90,
            "minutes": 74,
            "name": "Custom Zone"
          },
          {
            "caloriesOut": 330.76224,
            "max": 220,
            "min": 110,
            "minutes": 42,
            "name": "Above"
          }
        ],
        "heartRateZones": [
          {
            "caloriesOut": 979.43616,
            "max": 86,
            "min": 30,
            "minutes": 626,
            "name": "Out of Range"
          },
          {
            "caloriesOut": 514.16208,
            "max": 121,
            "min": 86,
            "minutes": 185,
            "name": "Fat Burn"
          },
          {
            "caloriesOut": 197.92656,
            "max": 147,
            "min": 121,
            "minutes": 18,
            "name": "Cardio"
          },
          {
            "caloriesOut": 6.984,
            "max": 220,
            "min": 147,
            "minutes": 5,
            "name": "Peak"
          }
        ],
        "restingHeartRate": 76
      }
    }
  ],
  "activities-heart-intraday": {
    "dataset": [
      {
        "time": "00:00:00",
        "value": 78
      },
      {
        "time": "00:01:00",
        "value": 78
      },
      {
        "time": "00:02:00",
        "value": 77
      },
      {
        "time": "00:03:00",
        "value": 77
      },
      {
        "time": "00:04:00",
        "value": 77
      }
    ],
    "datasetInterval": 1,
    "datasetType": "minute"
  }
}
      

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

Access to the Intraday Time Series for personal use (accessing your own data) is available through the "Personal" App Type.

Restriction: Heart Rate Intraday data cannot be retrieved for more than a 24 hour period. Any requests that expand over a 24 hour period will result with the summary data for the date range specified.

The heart rate intraday time series data is returned in the format requested. The endpoint mimics the Get Heart Rate Time Series endpoints. If your application has the appropriate access, your calls to a time series endpoint for a specific day (by using start and end dates on the same day or a period of 24 hours), the response will include extended intraday values with 1-second, 1-minute, 5-minute or 15-minute detail level for that day. Unlike other time series calls that allow fetching data of other users, intraday data is available only for and to the authorized user.

The "1sec" detail-level may not always return data in 1 second sampling outside of a recorded exercise. Sampling is more granular during exercise to provide accuracy. To fetch the granular heart rate during an exercise, query data using the GET Activity TCX endpoint.

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.