Heart rate export from Fitbit

Hello QS users!

I am trying to conduct a research trial in which I am trying to export heart rate data from a fitbit.
Unfortunately this is proving difficult with the company program not allowing users to be able to export their HR data.
I’ve managed to use to QS app to successfully do this for an apple watch but was wondering if anyone had any suggestions on how to do this on a fitbit.

Any help would be appreciated!
Anoop Koshy

Are you looking for heart rate data during workouts, or 24/7? At what resolution?

Just curious here. What is the QS app?

Fitbit can and probably is already logging to the Apple Health App. You can do a full export of Apple Health, but that generally is overkill. The QS app needs some maintenance to be more reliable so I’ve been using the “Health Export” app which costs about $2 (one time fee). It provides fast easy data that I usually send to Google Drive and can immediately work with a healthy CSV file.

Hi Mikey - what issues have you been running into with the QS app?

We created a free app called “QS Access” that allows you to get your HealthKit data in tabular format. Here’s a link: QS Access App

1 Like

The QS Access App is a great idea and I’m glad it’s out there. It does a great job with the small stuff like data I’ve been manual entering into HealthKit (weight, body fat and blood glucose). However QS Access totally gags and produces no table to export when I request my automated data collections like Steps, Active Calories and Sleep Analysis. I have years of data that it just can’t seem to bring up. HealthExport has customizable time frames to export so I can limit my views and see the data. I also

Fitbit does not send any data to Apple Health.

Hipbone is another option for exporting data from Apple Health. It’s more reliable, but dumps data into JSON files rather than CSV (one file per data point!).

Hello Anoop

You’ve probably already found a solution, but if not you might find this medium article useful: https://medium.com/@5agado/a-quest-for-better-sleep-with-fitbit-data-analysis-5f10b3f548a#.mnh4wts5d
In summary, the author, 5agado, used this python script by andrewjw: https://github.com/andrewjw/python-fitbit

All the best!

1 Like

As @_AmandaJW mentioned, I previously used a scraper script available online, I want however to give an update about the method, for the ones interested.

I soon became frustrated trying to replicate the graph data call of the Fitbit website. I searched again for easier and better solutions, and I ended up on this Fitbit community post, explaining a simplified way for a user to collect all his data via the official APIs. Briefly speaking you have to create a Fitbit app on the website, configure it as described in the previous link and implement a OAuth flow in order to obtain the access tokens needed for the API calls.
If you use Python, I suggest to rely on the official python implementation of the Fitbit API and give a look here for a clear explanation on what needs to be done to have all setup and running.
I have to admit that this ended up to be easier and cleaner that the previous scraper solution, still, you need to keep a couple of things in mind:

  1. You have to write some code to clean the JSON data returned by the API, and extract the info relevant to you
  2. Seems like the API have a limit of 150 calls per hour, so you might need to repeat the operation several times depending on how much and what data you need
1 Like

during workouts mainly

Has anyone looked at the sleep heart rate data?

Fitbit collects a data point every 1 minute (confirmed by some Fitbit hardware people). But only provides an average value every 5 minutes to the user.
I imagine the API data has the same limitation (1 value every 5 mins) but could you confirm that?

Thanks!!

https://dev.fitbit.com/docs/heart-rate/

scroll down to:

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

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.

detail-level Number of data points to include. Either 1sec or 1min. Optional.

So, looks like you should be able to get down to 1 sec granularity?

Thanks @QuantifiedBob.

From what I understand this only applies to activity heart rate. They apparently handle the sleep heart rate differently and only Fitbit software developers have access to the 1 min interval. Everyone else has only access to 5 min interval data.

This is part of my journey to get a replacement for my Basis devices. Which turns out to be the only ones with a 1 min interval!! Beside “maybe” Fitbit. But since for the same price I can get a pulse/oxymeter with a lot more data granularity I might just try that route.