What's the Facebook's Graph API call limit?

92,579

Solution 1

The best answer to this question from another forum, from Ash Rust in 2010:

"After some testing and discussion with the Facebook platform team, there is no official limit I'm aware of or can find in the documentation. However, I've found 600 calls per 600 seconds, per token & per IP to be about where they stop you. I've also seen some application based rate limiting but don't have any numbers.

As a general rule, one call per second should not get rate limited. On the surface this seems very restrictive but remember you can batch certain calls and use the subscription API to get changes."


The above information is now obsolete as of October 2015. It's now 200 API calls per user in any given 60 minute window according to https://developers.facebook.com/docs/graph-api/advanced/rate-limiting

Solution 2

Now it's official:

Each app is given an allotment of 200 API calls per user in any given 60 minute window.

From the Facebook documentation as of October 7th 2015, here's how rate limiting on the Graph API works:

  • Rate limiting is done on your Facebook AppId. If your app reaches a rate limit, all calls made for that app will be limited not just on a per-user basis.
  • Rate limiting is calculated by taking the number of users your app had the previous day and adding today's new logins. This gives a base number of users that your app has.

As an example, if your app had 10 users yesterday and 5 new logins today, that would give you a base of 15 users. This means that your app can make ((10 + 5) * 200) = 3000 API calls in any 60 minute window.

More information here: https://developers.facebook.com/docs/graph-api/advanced/rate-limiting

--Update as of April 12th 2016--

Facebook has now a Rate Limit Dashboard, which is much easier to see if your app's rate limit is exceeding. It looks like this:

enter image description here

Solution 3

According to Facebook dev policies "I. Features and Functionality" the only limits are:

(>5M MAU) or (>100M API calls per day) or (>50M impressions per day).

(Mau means monthly users)

It does not say what will they do after exceeding the limits...

Today I have ran to this limitation:

Calls to mailbox_fql have exceeded the rate of 300 calls per 600 seconds.

Overall every table has different set of limits, in most of the cases fql wont return more than 30 objects per fql. Also it seems to me that you can exceed the limits to one table and at the same time you can access different table, the question is whether the api is blocked (after exceeding the limit) for all the user or only for the user that has exceeded the limits... Anyway, after you exceed the limit you have to wait for about 10 minutes, than it is okay.

So technically speaking you can get at most 300*30 objects per 10 minutes in table mailbox_fql.

Solution 4

From facebook documentation

User Level Rate Limiting

This rate limiting is applied at the user level for all api calls except for ads apis.

Rate limitations happens real time on sliding window. Each call is assigned a score. There is a max score of n. User accumulates a score over time based on the calls made. When the max score is reached, the throttling error is thrown. Error, Code: 17, Message: User request limit reached

App Level Rate Limiting

This rate limiting is applied globally at the app level. Ads api calls are excluded.

Rate limiting happens real time on sliding window for past one hour. Stats is collected for number of calls and queries made, cpu time spent, memory used for each app. There is a limit for each resource multiplied by monthly active users of a given app. When the app uses more than its allowed resources the error is thrown. Error, Code: 4, Message: Application request limit reached

check this documentation https://developers.facebook.com/docs/reference/ads-api/api-rate-limiting/

Solution 5

According to FB docs, each element in a batch counts as a separate call.

We currently limit the number of requests which can be in a batch to 50, but each call within the batch is counted separately for the purposes of calculating API call limits and resource limits. For example, a batch of 10 API calls will count as 10 calls and each call within the batch contributes to CPU resource limits in the same manner.

Please check this: https://developers.facebook.com/docs/graph-api/making-multiple-requests https://developers.facebook.com/docs/marketing-api/api-rate-limiting

Share:
92,579

Related videos on Youtube

Mehul Hingu
Author by

Mehul Hingu

Yo !! this is facebook app developer from India .Love making apps on fb. Can code in PHP and Java Script (jQuery). I've been programming since i was 15.I stared it with QBasic,then C, C++ and Java. But there was something missing it was web. So few years back i started with HTML,CSS,Java script and then PHP and MySQL. And now a days i am using my web skills in making applications on facebook platform.

Updated on September 06, 2020

Comments

  • Mehul Hingu
    Mehul Hingu over 3 years

    Is there any restriction in number of calls we make to facebook's graph api? and If it is there then how many calls can we make per app daily?

  • Mehul Hingu
    Mehul Hingu over 12 years
    I am bit confused whether it is 600 calls / 600 Sec per access token or per app.
  • Zain Khan
    Zain Khan over 12 years
    check the bold part. According to the author 'per token & per IP'
  • Igy
    Igy almost 12 years
    Those are thresholds over which a contract needs to be in place, not the hard technical limits, which are in Mangobug's answer
  • Visgean Skeloru
    Visgean Skeloru over 11 years
    not really "Calls to mailbox_fql have exceeded the rate of 300 calls per 600 seconds." means that it is a hard limit that was enforced in real life. that would also suggest that there is different limit for different tabel. (Which is true).
  • Henley
    Henley over 11 years
    @mangobug Per Token and per IP means.. what exactly? Does it mean I can double the # of calls if I use the same token in 2 different IP's? Can I double the # of calls if I have 2 access tokens, still originating from the same IP?
  • Erik Kaplun
    Erik Kaplun about 10 years
    @mangobug: I think Henley Chiu's last comment/question is quite crucial here :)
  • Erik Kaplun
    Erik Kaplun about 10 years
    Oddly, that Quora thread doesn't answer IP related questions either.
  • vbNewbie
    vbNewbie about 10 years
    Does anyone know what the limit on actual results count per query for example with the search api?
  • Josh Bedo
    Josh Bedo almost 10 years
    Where is an example of how you can do user level calls and app level calls? It all goes through the app id regardless which would be an app level limit? They aren't to great with documentation on this.
  • heyitsbmo
    heyitsbmo about 9 years
    "but remember you can batch certain calls" Facebook clarifies that this will not reduce the number of effective API calls toward your limit: "Batching calls will not reduce the number of api calls." developers.facebook.com/docs/marketing-api/…
  • Marius
    Marius over 8 years
    AFAIK the limit only applies to apps with Graph API version 2.5 and above. Older apps don't have this limit yet.
  • Brandon Romano
    Brandon Romano over 8 years
    This is no longer valid, see user one's answer > 200 API calls per user in any given 60 minute window
  • Konstantinos Natsios
    Konstantinos Natsios over 7 years
    Is it possible if we hit the limit, facebook to return us the error Error: read ECONNRESET ???
  • Paiboon Panusbordee
    Paiboon Panusbordee over 7 years
    The link to documentation is wrong one. Correct one is developers.facebook.com/docs/graph-api/advanced/rate-limitin‌​g
  • Jason Goemaat
    Jason Goemaat over 7 years
    Actual limit isn't per-user, it's an average for daily active users: "Your app can make 200 calls per hour per user in aggregate. As an example, if your app has 100 users, this means that your app can make 20,000 calls. This isn't a per-user limit, so one user could make 19,000 of those calls and another could make 1,000. This limit is calculated based on the number of calls made in the previous hour."
  • A.W.
    A.W. over 6 years
    Would be so much easier if they return estimatedCallsLeftForThisHour: 1234 after each call.
  • Alex Pliutau
    Alex Pliutau about 6 years
    Nice and precise answer!
  • John Washam
    John Washam almost 6 years
    This answer is about the Marketing API, not the Graph API like the OP asked.
  • Jason Goemaat
    Jason Goemaat over 5 years
    The link has good information, but the answer is misleading. They use a variety of ways to calculate the number of users your app has. It is usually "daily active users" but can be weekly or monthly for slow periods. This is multiplied by 200 to get the number of api calls your app can make. The rate isn't per user, but application-wide, so theoretically say you have 100 daily active users. One user could make 20,000 api calls in an hour.
  • Farzher
    Farzher over 5 years
    how do i get more users for my app? what's an app user? where does it show how many i have?