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

API limits for huge data requirements

ANSWERED

 

Dear Fitbit API Team,

I'm writing on behalf of AarogyaMitra, a non-profit hosting a challenge to promote healthy habits among doctors. We're developing an app using your API to track participants' step counts.

We anticipate around 600 to 6000 participants, with the API being accessed at least 6,000 to 60,000 times daily to retrieve step data.

Please provide details on:

  1. Maximum API requests are allowed per day/hour. how can this huge data request be tackled?
  2. Restrictions for bulk data retrieval.
  3. Best practices for managing high API request volumes.

Understanding any request limitations will help us optimize our app's functionality.

Thank you for your guidance.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Sorry if I wasn't clear and I apologize fr any misunderstanding.

The rate limit is 150 API calls per user per hour, not per client. With that in mind, your application should be able to capture all the necessary data well under the limits for all of your users, especially if you are only capturing step data. I've listed a few use case scenarios for how to collect step data based on the examples you provided:

  • Get Daily Activity Summary - You can pull daily summary total metrics (such as steps), and also list activities recorded for a single data. If any activities were performed on the data being queried, it will also provide a summary of that activity and how many steps was recorded during that activity.
  • Get Activity Logs List - Returns a list of activities (up to 100) that the user recoded between a specific date range. The activities returned will provide a high level overview of the activity recorded that you might not see in the Daily Activity Summary endpoint (ie how the activity was recorded, if gps was present, etc).
  • Get Activity Timeseries - If you are only looking for step counts totals for X days, this would be the endpoint you want to use. Executing this endpoint once will allow you to retrieve step counts for up to 1095 days in a single request.

Note: If you need to see daily step counts and step counts recorded from activities separately, you'll need to do additional scripting for getting the difference in steps returned for activities and daily step totals in the Get Daily Activity Summary endpoint. For example, if the daily step count recorded shows 11k steps and the user performed a run that day with 3000 steps taken, you can determine that the user took 8k steps outside of activities.

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

Hi @AniketHosamani,

Welcome to the forums!

  1. Applications have a rate limit of 150 API requests per hour. The count is reset at the top of every hour.
  2. You'll need to review our API Documentation as each endpoint that supports a data range, may have a different limit for pulling bulk data. Some endpoints support only 1 day, while others may support up to 90 days of data. If you can specify what data you are interested in, I may be able to shed some light on its limitations.
  3. See our Best Practices Guide.
Best Answer
0 Votes

Dear John,

Thank you for your response. Regarding the fitness challenge, our main requirement is to retrieve only the "steps" data of the participating users. The challenge rules state that the user with the highest average number of steps throughout the challenge will be declared the winner. And "daily" appreciation in our community with the highest steps

One concern I have is related to the API rate limiting. As per the API documentation, we can make a maximum of 150 requests per hour, which translates to 3,600 API calls per day (150 * 24 hours). This could potentially be an issue if more than 3,600 users are participating in the challenge, as we would not be able to retrieve data for all users on a daily basis.

One potential solution could be to limit the number of user data retrievals since we can collect step data from previous dates as well. However, we still need to display the highest daily step count every day, which might not be feasible if we cannot retrieve data for all users on a daily basis.

Could you please suggest an alternative approach or a workaround to address this API rate-limiting concern while still meeting the challenge requirements?

Fitbit is a well-made app for us to find alternatives!

Thank you for your assistance

Best Answer
0 Votes

Sorry if I wasn't clear and I apologize fr any misunderstanding.

The rate limit is 150 API calls per user per hour, not per client. With that in mind, your application should be able to capture all the necessary data well under the limits for all of your users, especially if you are only capturing step data. I've listed a few use case scenarios for how to collect step data based on the examples you provided:

  • Get Daily Activity Summary - You can pull daily summary total metrics (such as steps), and also list activities recorded for a single data. If any activities were performed on the data being queried, it will also provide a summary of that activity and how many steps was recorded during that activity.
  • Get Activity Logs List - Returns a list of activities (up to 100) that the user recoded between a specific date range. The activities returned will provide a high level overview of the activity recorded that you might not see in the Daily Activity Summary endpoint (ie how the activity was recorded, if gps was present, etc).
  • Get Activity Timeseries - If you are only looking for step counts totals for X days, this would be the endpoint you want to use. Executing this endpoint once will allow you to retrieve step counts for up to 1095 days in a single request.

Note: If you need to see daily step counts and step counts recorded from activities separately, you'll need to do additional scripting for getting the difference in steps returned for activities and daily step totals in the Get Daily Activity Summary endpoint. For example, if the daily step count recorded shows 11k steps and the user performed a run that day with 3000 steps taken, you can determine that the user took 8k steps outside of activities.

Best Answer
0 Votes