Google Analytics Realtime Api Quota monitoring - google-analytics-api

Is there any way to monitor "Core Reporting API and Real Time Reporting API" usage?
According with Limit and Quotas section these specific API have a limit of :
-10,000 requests per view (profile) per day
-10 concurrent requests per view (profile).
Will be interesting to know :
How many requests left there are for a specific view/(profile)
From where most of the requests are coming) (IP address/Google Profile)
We are a large organisation with lot of applications using these APIs and employees make use of them on daily bases through google spreadsheet,
over the last few days we are retrieving quite often/soon the error Quota Error: profileId ga:xxxxxxhas exceeded the daily request limit. [403]
and we would like to understand from where the most of the requests are coming from

Related

API rate limit exceeded for user ID for Github Search APIs

I have a use case where I have to run the github search APIs repeatedly. However sometimes in between I get the error below:
"API rate limit exceeded for user ID XXXXX".
How Can I avoid this error? Is there any way?
Github rest api has following rate limit:
For unauthenticated requests, the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address
For authenticated requests(either by OAuth applications or by a personal access token), the rate limit allows for up to 5,000 requests per hour and per authenticated user.

SharePoint throttling

We have a lot of users that use SharePoint and also we use only application token to manage the data. So we send lots of requests and we are facing throttling. So the questions are:
Are there any possibilities to increase the requests limit?
How can I see my current quota/resource usage?
You can not request a limit increase, and Microsoft does not provide any specific information regarding the algorithm they use to decide when or why to begin throttling.
The best option you have is to apply incremental back-off logic to account for throttled calls:
https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/handle-sharepoint-online-throttling-by-using-exponential-back-off
You have to contact Microsoft support and open a ticket in order to get information regarding which service principals and users are being throttled. An engineer will have to pull the info from their database.
They can not give you specific quota/resource information. The will only tell you how many calls were throttled for a given principal.

Increase Batch Quota in Google Core Reporting API

Does anyone know if there is a way to increase the quota limit of 10 queries when batching calls to the core reporting API?
This question/answer mentions the limit of 10: How can I combine/speed up multiple API calls to improve performance?
If I try to add more than 10 queries to the batch only the first ten are processed, each one after that contains a 403 quota exceeded error.
Is there a pay option? Would love to speed up the process of reporting on GA data for a bunch of URLs. I looked in my Google Developer's Console under the Analytics API where there is an option to increase the per-user limit and a link to request additional quota but I don't need total quota to increase, only allowed batch requests.
Thanks!
Quota is the number of requests you are allowed to make to a Google API without requesting permission to access more. Most of the Google APIs have a free quota, a number of requests Google lets you make without asking for permission to make more request. There are project based quotas and user based quotas.
Unless it says other wise APIs Quotas are projects based not user based.
User quota example
Per-user limit 10 requests/second/user
Some Quotas are user based, a user is normally the person that has authenticated the request. Every request sent to google contains information about who is making the request in the form of the IP address where the request came from. If you have your code running on a server the IP address is the same all the time so Google sees it as the same user. You can get around his by adding a random Quotauser to your request this will identify the request based upon different users.
If you send to many requests to fast from the same user you will see the following error.
userRateLimitExceeded The request failed because a per-user rate limit
has been reached.
The best way to get around this is to use QuotaUser in all of your requests, and identify different users to Google. Or just send a random number every time should also work.
Answer: You can't apply for an extension of the flood protection user rate limit. But you can get around it by using QuotaUser.
more info on quotas can be found on Google developers console APIs

There have been too many calls from this ad-account. Wait a bit and try again

I am trying to fetch the reportstats from our account. I need to make async calls because otherwise I would get and error that the data is to old.
When I create multiple requests I will get the error: "There have been too many calls from this ad-account. Wait a bit and try again."
I have only made about 30 request in a small time because of the way the async reports work. Is there a better way to fetch te reporting data? And if there is not is there a way to see the request score that is mentioned in the documentation?
And an other question will be, is there a difference in the amount of request when your app is on development access?
Thanks in advance,
Jorik
First point, according to access level docs here there is heavy rate limiting on the apps that are in development stage.
Second, To fetch reports there are multiple endpoints that, such as ad account wise reports, campaign wise reports, ad wise reports, here is a link to the docs for Insights API
available params are :
act_AD_ACCOUNT_ID/insights
CAMPAIGN_ID/insights
ADSET_ID/insights
AD_ID/insights
Lastly, about rate limiting in marketing api. It is done as a sliding window method which means there is no actual track of number of requests per day or something, its just that a lot of requests in short amount of time is not allowed.
two things you can do are,
first see the response of api and if the response is ratelimit error, stop the request.
second, use batch requests
Here is a gist from troubleshooting guide on limits
Troubleshooting
Timeouts
The most common issues causing failure at this endpoint are too many requests and time outs:
On /GET or synchronous requests, you can get out-of-memory or timeout errors.
On /POST or asynchronous requests, you can possibly get timeout errors. For asynchronous requests, it can take up to an hour to complete a request including retry attempts. For example if you make a query that tries to fetch large volume of data for many ad level objects.
Recommendations
There is no explicit limit for when a query will fail. When it times out, try to break down the query into smaller queries by putting in filters like date range.
Unique metrics are time consuming to compute. Try to query unique metrics in a separate call to improve performance of non-unique metrics.
Rate Limiting
The Facebook Insights API utilizes rate limiting to ensure an optimal reporting experience for all of our partners. For more information and suggestions, see our Insights API Limits & Best Practices.

Is there a Limit for the Facebook Public Available API?

IS there a limit of connections and time of requests I can send to the Facebook public API?
I do not need to get private informations of the logged in users, but only some public information.
I will get a LOT of data, and I will have to do a LOT of request.
Is there a limit I have to consider?
There is officially no limit that is specified by the Facebook Dev team. However, users did face issues in the past while trying to pull large amounts of data. I believe there was also a bug that was being tracked some time back regarding this.
Facebook limits API access on multiple levels as e.g. per User ID and per App ID. The calculate a 'score‘ per app that defines individual API limits. This depends e.g. on the number of active users but also on the 'smartness' of the requests as well as their CPU and memory usage on the Facebook side. See this for more details https://developers.facebook.com/docs/reference/ads-api/api-rate-limiting/