Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting a date range of data for Food Log and Activity Log

ANSWERED

I was wondering if there was anyway to get a date range of data from Fitbit, such as the Food Log information and Activity Log information, without having to query for one day at a time. The application I am working on may need to grab data for a long time period for an individual user, so having to make a call to the server for each and every single day for that time period will most likely put me over the 150 calls to the server per hour limit (for each user). I hope to be able to retrieve the data without having to wait each hour to restart querying. I know that there is Intraday Time Series data I can grab, but I am also interested in getting the Food Log and Activity Log data, which is not included in the Intraday Time Series data. Is there anything in the Fitbit API where I could grab this information for a range of days in just one query to the server?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hi chawk1,

 

Unfortunately, we don't have a way of retrieving all logs in one request at this time. We are aware of the backfilling use case and are working to improve this functionality, but we do not have anything to announce yet.

View best answer in original post

Best Answer
8 REPLIES 8

To get data for several days you can use timeseries api, your request should look similar to GET /1/user/-/foods/log/caloriesIn/date/2010-08-11/2010-08-15.json

see https://wiki.fitbit.com/display/API/API-Get-Time-Series for more details.

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

Thank you for your reply Ivan!

 

I was actually hoping to get more than just summary data for each day, and I know the Intraday Time Series data only provides a summary of each day for the given date range. For example, I want to be able to get the Food log data, which includes values for name, amount, brand, calories, etc..., for a range of dates in just one query to the data, as oppose to just one total calories consumed value for each day. Is this possible with the Fitbit API?

Best Answer
0 Votes

Hi chawk1,

 

Unfortunately, we don't have a way of retrieving all logs in one request at this time. We are aware of the backfilling use case and are working to improve this functionality, but we do not have anything to announce yet.

Best Answer

Thank you for your reply Jeremiah! I do hope this can be implemented in the future, so we don't have to worry about the rate limit and overloading the server with requests.

Best Answer

yes, this would help reduce the number of calls, improving our problems against the rate limit

Best Answer
0 Votes

Bump, has this feature been implemented or is this feature coming in the future?

Best Answer
0 Votes

@ThaCaptain This is still a planned feature. I don't have any updates on it, but as with any new feature or change, it will be announced when it's ready.

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes

Could really use this as well, please!

Best Answer
0 Votes