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?
Answered! Go to the Best Answer.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
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.
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
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.
Best AnswerThank 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
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
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.
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.
Community Moderator Alumni are previous members of the Moderation Team, which ensures conversations are friendly, factual, and on-topic. Moderators are here to answer questions, escalate bugs, and make sure your voice is heard by the larger Fitbit team. Learn more
@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.
Best Answer