How Can I Reduce Facebook API Rate Limit Errors?
Facebook's API rate limits may slow down your sync, leading to the following alert:
Facebook Rate Limits Affected
Discover the main causes of Facebook API rate limit errors, and how to optimize your Facebook Ads connection configuration to avoid them.
What causes Facebook API rate limit errors?
The Facebook API has a rate limit, or the number of API calls that can be made to the Facebook API within a certain time period. When the connector hits these limits, it must wait until that period ends before it can query the API again.
Facebook's API rate limits are influenced by:
- Applications and users. See Facebook's Platform Rate Limits documentation to learn more.
- Specific requests made by the Ads Insights API. See Facebook's Use Case Rate Limits documentation to learn more.
- Time of the day. Every day at 4:00 AM UTC, Facebook limits the rate of the Ads Insights API. We recommend that users avoid scheduling syncs during that time.
For more best practices, see Facebook's API rate limit best practices documentation.
How to avoid Facebook API rate limit errors
We recommend the following three methods to avoid Facebook's API rate limit:
Method 1: Switch to OAuth authorization
Fivetran can use one of two options to access Facebook data:
- The Grant User Access option grants our Facebook OAuth application permission to request data on your behalf.
- The System User Access Token option uses the token that belongs to your Facebook OAuth application. All API calls go through it.
Select Grant User Access in the connection setup form so that Facebook calculates the rate limit based on the Fivetran application, not your advertising account. The Fivetran application has a higher rate limit than your advertising account.
Method 2: Exclude metadata tables
If you don’t need metadata tables, set the Sync all metadata toggle in your setup form to OFF. These tables have a large contribution to rate limits.
Method 3: Reduce sync frequency
Sync your connection less often to reduce the number of calls to the API, especially if you have multiple Facebook connections with the same authentication method. See our Sync frequency and scheduling documentation for more information.