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

max date range for Heart and Sleep API

I'm using Heart Time Series API:

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

Is there any limit for [base-date] & [end-date]? Such as [base-date] = 2016-01-01 and [end-date] = today or 2016-04-01

 

Likewise for Sleep Logs by Date Range API:

GET https://api.fitbit.com/1.2/user/[user-id]/sleep/date/[startDate]/[endDate].json

Is there any limit for [startDate] & [endDate]? Such as [startDate] = 2016-01-01 and [endDate] = today or 2016-04-01

 

 

Thanks.

 

Best Answer
0 Votes
1 REPLY 1

Hi @lalalandhs

 

For Heart Rate Time Series, I believe the restriction is with the amount of data that can be returned by a single API call.  The maximum limit is roughly 1 MB.  If you hit this restriction, then I recommend you break up the queries into date range chunks.

 

For Sleep Logs by Date Range, the max date range is 100 days.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer