I am a little confused on the Facebook rate limits and need some clarification.
To my knowledge each application gets 100 million api calls per day per application and 600 calls per second per access token.
According to Insight I am currently making about 500K calls per day total for my application however am receiving a large number of "Application request limit reached". Also in Insight I see a table that has a column called "Fraction of Budget". Four of the endpoints listed in there are over 100% (one is around 3000%).
Is Facebook limited per endpoint as well and is there any way to make sure I don't receive these Application request limit reached errors? To my knowledge I'm not even close to the 100M api calls per day per application that Facebook lists as the upper limit.
EDIT: As a clarification, I am receiving error code 4 (API Too many calls) not error code 17 (API User too many calls). https://developers.facebook.com/docs/reference/api/errors/
Related
I'm trying to collect and update data using the Business Information API.
In order to get the API Calls to work, I'm only trying to get information from my business by using "Get-requests". However when calling several methods, I keep receiving the following errors:
"Quota exceeded for quota metric 'Requests' and limit 'Requests per minute' ".
Both in the Postman-calls or the OAuth 2.0 Playground (which in my eyes: should be a sandbox, ready for testing - very frustrating…).
When I look for my quota in the API settings: I'm not even able to change the requests per minute other than '0'. This makes it really hard to test/use the API.
I can't even find out which categories there are for a business location…
For your information: I've already asked for increase of the quota using the forms. But it seems google isn't really responsive in this matter.
Can this be solved?
The API shall be used to update a group of 50 (or more) locations, this instead of bulk-editing with a csv-file.
Any help would be welcome.
Thanks in advance,
Kind Regards,
Seppe
If the quota approval form was ignored, you might still have a chance via the API support (https://support.google.com/business/contact/api_default).
They might be reluctant to grant you a quota if your maximum location count is this low though - the API is designed for larger use cases.
Is it documented anywhere that it's meant for larger users? I got approved being very clear it was only for a handful of locations.
BUT even though I got approved and have access there are 3 specific quotas (all per-minute) that are set to zero, even though I have tonnes of allowance for all the non-per-minute quotas. Seems like a bug to me.
I can make 10000 "Update Location requests per day" but zero per minute.
I receive this error while trying to export form my datagrid to Google Sheets. How can I solve it?
Don't make many requests too quickly.
You are either exceeding your quota or you are making too many requests too quickly.
Also, look into batch requests
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate
As you may be trying to make a call to the API for every single cell updated, which is an easy way to run into the above error.
If you must do it on a cell by cell basis, you would have to insert a small delay between requests. Bear in mind that although the usage page says:
This version of the Google Sheets API has a limit of 500 requests per 100 seconds per project, and 100 requests per 100 seconds per user. Limits for reads and writes are tracked separately. There is no daily usage limit.
This does not mean that you can make 100 requests in 1 second and then wait 99 seconds. This will give you a quota error like what you are running into. You would have to put in a one second delay between requests, for example.
I'm currently developing a chat bot for one specific YouTube channel, which can already fetch messages from the currently active livechat. However I noticed my quota usage shooting up, so I took the "liberty" to calculate my quota cost.
My API call currently looks like this https://www.googleapis.com/youtube/v3/liveChat/messages?liveChatId=some_livechat_id&part=snippet,authorDetails&pageToken=pageTokenIfProvided, which uses up 5 units. I checked this by running one API call and comparing the quota usage before and after (so apologies, if this is inaccurate). The response contains pollingIntervalMillis set to 5086 milliseconds. Currently, my bot adds that interval to the current datetime and schedules the next fetch at that time (using Celery), so it currently fetches messages at a rate of 4-6 seconds. I'm gonna take the liberty and always wait for 6 seconds.
Calculating my API quota would result in a usage of 72.000 units per day:
10 requests per minute * 60 minutes * 24 hours = 14.400 requests per day
14.400 requests * 5 units per request = 72.000 units per day
This means that if I used the pollingIntervalMillis as a guideline for how often to request, I'd easily reach the maximum quota of 10.000 units by running the bot for 3 hours and 20 minutes. In order to not use up the quota by just fetching chat messages, I would need to run 1 API call per minute (1,3889 approximately). This is very unfeasible for a chatbot, since this is only for fetching messages and not even sending any messages to the chat.
So my question is: Is there maybe a more efficient way to fetch chat messages which won't use up the quota so much? Or will I only get this resolved by applying for a quota extension? And if this is only resolved by a quota extension, how much would I need to ask for reliably? Around 100k units? Even more?
I am also asking myself how something like Streamlabs Chatbot (previously known as AnkhBot) accomplishes this without hitting the quota limit despite thousands of users using their API client, their quota must probably be in the millions or billions.
And another question would be how I'd actually fill out the form, if the bot is still in this "early" state of development?
You pretty much hit the nail on the head. Services like Streamlabs are owned by larger companies, in their case Logitech. They not only have the money to throw around for things like increasing their API quota, but they also have professional relationships with companies like Google to decrease their per unit cost.
As for efficiency, the API costs are easily found in the documentation, but for live chat as you've found, you're going to be hitting the API for 5 units per hit. The only way to improve your overall daily cost with your calls is to perform them less frequently. While once per minute is clearly excessively long, once every 15-18 seconds could reduce the overall cost of your API quota increase, while making the chat bot adequately responsive.
Of course that all depends on your desired usage of the data, but still a recommendation if you're implementing the bot still in the realm of hobbyist usage.
Thanks in advance for the assistance. I recently ran into an issue with a clients app using Flurry Analytics. There is a maximum number of 300 events that can be tracked (each event can have a total of 10 different paramaters) I need to track more then 300 events for this client.
Does Google Analytics have a maximum number of events that can be tracked?
(the reason for the high number of tracked events for those who are curious is because the client has a database of about 15000 products, and wants to know how users are interacting with the products, additionally they want to track the search terms that users are searching for, thus the need for a HUGE number of events to be tracked....)
There is a limit of 10 million hits (could be events, page views etc) per month. Read specifics at https://developers.google.com/analytics/devguides/collection/gajs/limits-quotas. This is the free version. The Premium version supports higher data limits. https://www.google.com/analytics/360-suite/#?modal_active=none
There is also a 10 event (_trackEvent) limit over a 5 second period.
Thought it might be helpful to clarify, considering the changes that Google made in Oct '12.
https://developers.google.com/analytics/devguides/collection/other/limits-quotas
10 million hits per month per web property - If you go over this limit, the Google Analytics team might contact you and ask you upgrade to Premium or implement client sampling to reduce the amount of data being sent to Google Analytics.
...
ga.js or Legacy Libraries
This applies to ga.js, mobile snippets and any other legacy tracking library.
500 hits per session not including ecommerce (item and transaction hit types)
If you go over this limit, additional hits will not be processed for that session.
...
ga.js
Each web property starts with 10 hits that are replenished at 1 hit per second. Applies only to event type hits.
analytics.js
Each web property starts with 20 hits that are replenished at 2 hit per second. Applies to All hits.
Android SDK
For each tracker instance on a device, each app instance starts with 60 hits that are replenished at 1 hit every 2 seconds. Applies to All hits.
iOS SDK
Each property starts with 60 hits that are replenished at 1 hit every 2 seconds. Applies to All hits.
Recently I decided to take advantage of Google custom search engine and embed it inside my iPhone application. I scoped my search engine to number of websites to search in, I got both KEY&cx and added them to my code, every thing works as expected, but after several successful search queries I can no longer receive any results - I get an empty array containing the following message:
"code": 403,
"message": "Daily Limit Exceeded. Please sign up"
As I know, every user of my application has a set of search attempts, 100 per day, if he exceeded that limit he has to wait 24 hour to be able to search again for another 100 queries. But the case here is that I no longer have the ability to search at all!
If I hit my quota I have to wait for the next day? Am I wrong?
If you don't sign up for billing you are capped at 100 queries per day. Don't confuse the wording per user. You or rather your API key is the user therefore your overall usage is tied to this limit.
Free quota
Usage is free for all users, up to 100 queries per day.
Paid Usage
Any usage beyond the free usage quota will fail if you are not signed up for billing. Once you have enabled billing, you will continue to receive 100 free queries per day. However, you will be billed for all additional requests at the rate of $5 per 1000 queries, for up to 10,000 queries per day. If you need additional quota, please request additional quota from the console.
Source: https://developers.google.com/custom-search/json-api/v1/overview#pricing
I got same error too, last, I found the real reason:
miss 'key' parameter