Heart Rate Time Series

Get Heart Rate Time Series

The Get Heart Rate Time Series endpoint returns time series data in the specified range for a given resource in the format requested using units in the unit systems that corresponds to the Accept-Language header provided.

If you specify earlier dates in the request, the response will retrieve only data since the user's join date or the first log entry date for the requested collection.

Resource URL

There are two acceptable formats for retrieving time series data:

  1. GET https://api.fitbit.com/1/user/[user-id]/activities/heart/date/[date]/[period].json

  2. GET https://api.fitbit.com/1/user/[user-id]/activities/heart/date/[base-date]/[end-date].json

user-idThe encoded ID of the user. Use "-" (dash) for current logged-in user.
base-dateThe range start date, in the format yyyy-MM-dd or today.
end-dateThe end date of the range.
dateThe end date of the period specified in the format yyyy-MM-dd or today.
periodThe range for which data will be returned. Options are 1d, 7d, 30d, 1w, 1m.

Example Request

https://api.fitbit.com/1/user/-/activities/heart/date/today/1d.json

Example Response

{
    "activities-heart": [
        {
            "dateTime": "2015-08-04",
            "value": {
                "customHeartRateZones": [],
                "heartRateZones": [
                    {
                        "caloriesOut": 740.15264,
                        "max": 94,
                        "min": 30,
                        "minutes": 593,
                        "name": "Out of Range"
                    },
                    {
                        "caloriesOut": 249.66204,
                        "max": 132,
                        "min": 94,
                        "minutes": 46,
                        "name": "Fat Burn"
                    },
                    {
                        "caloriesOut": 0,
                        "max": 160,
                        "min": 132,
                        "minutes": 0,
                        "name": "Cardio"
                    },
                    {
                        "caloriesOut": 0,
                        "max": 220,
                        "min": 160,
                        "minutes": 0,
                        "name": "Peak"
                    }
                ],
                "restingHeartRate": 68
            }
        }
    ]
}

Get Heart Rate Intraday Time Series

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

Access to the Intraday Time Series for all other uses is currently granted on a case-by-case basis. Applications must demonstrate necessity to create a great user experience. Fitbit is very supportive of non-profit research and personal projects. Commercial applications require thorough review and are subject to additional requirements. Only select applications are granted access and Fitbit reserves the right to limit this access. To request access, contact private support.

The Get Heart Rate Intraday Time Series endpoint returns the intraday time series for a given resource in the format requested. 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 1d), the response will include extended intraday values with a one-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.

Resource URLs

There are four acceptable formats for retrieving time series data:

  1. GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/[end-date]/[detail-level].json

  2. GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/[end-date]/[detail-level]/time/[start-time]/[end-time].json

  3. GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/1d/[detail-level].json

  4. GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/1d/[detail-level]/time/[start-time]/[end-time].json

dateThe date, in the format yyyy-MM-dd or today.
detail-levelNumber of data points to include. Either 1sec or 1min. Optional.
start-timeThe start of the period, in the format HH:mm. Optional.
end-timeThe end of the period, in the format HH:mm. Optional.

Example Request

GET https://api.fitbit.com/1/user/-/activities/heart/date/today/1d/1sec/time/00:00/00:01.json

Example Response

{
    "activities-heart": [
        {
            "customHeartRateZones": [],
            "dateTime": "today",
            "heartRateZones": [
                {
                    "caloriesOut": 2.3246,
                    "max": 94,
                    "min": 30,
                    "minutes": 2,
                    "name": "Out of Range"
                },
                {
                    "caloriesOut": 0,
                    "max": 132,
                    "min": 94,
                    "minutes": 0,
                    "name": "Fat Burn"
                },
                {
                    "caloriesOut": 0,
                    "max": 160,
                    "min": 132,
                    "minutes": 0,
                    "name": "Cardio"
                },
                {
                    "caloriesOut": 0,
                    "max": 220,
                    "min": 160,
                    "minutes": 0,
                    "name": "Peak"
                }
            ],
            "value": "64.2"
        }
    ],
    "activities-heart-intraday": {
        "dataset": [
            {
                "time": "00:00:00",
                "value": 64
            },
            {
                "time": "00:00:10",
                "value": 63
            },
            {
                "time": "00:00:20",
                "value": 64
            },
            {
                "time": "00:00:30",
                "value": 65
            },
            {
                "time": "00:00:45",
                "value": 65
            }
        ],
        "datasetInterval": 1,
        "datasetType": "second"
    }
}