简体   繁体   中英

Is there a rate limit for using Facebook Ad Library API?

I'm using Facebook Ad Library API but I can't figure out how rate limit works. On the application dashboard under "Application-Level Rate Limiting" the chart is always showing zero calls and when I make a new API call the header just shows this (the 'call_count' field is missing):

{
   'total_time'     : 0,
   'total_cputime'  : 0
}

I've read on a report by Mozilla developers that there is a rate limit (they were blocked a few times), someone can help?

Thanks

I was running into a similar issue and worked out the following solution:

You can see the current usage of your rate limit for the Ad Library API by looking at the "object_count_pct" in the header. API calls are blocked once it reaches a value of 100 (%).

Avoiding the limit is then possible by pausing calls at a certain percentage until the object_count_pct goes down again. You can also build your API calls so that they use the "estimated_time_to_regain_access" value to restart the calls after Facebook unblocks your app.

Unfortunately I could not find any documentation regarding the actual rate limit or at what speed the object_count_pct goes down once calls to the API are halted. The 200 calls per hour as stated in the official docs is definitively not accurate as I have managed to make over 5.000 calls in ca. 8 hours.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM