Google Custom Search problem: Request throttled due to daily limit being reached - search

We often receive reports regarding Google Custom Search (Custom Search JSON API) not functioning on our website: https://pomoc.home.pl/
We have noticed the answer we receive from the server, when the search engine stops working:
// API callback
hndlr({
"error": {
"code": 403,
"message": "Request throttled due to daily limit being reached.",
"errors": [
{ "message": "Request throttled due to daily limit being reached.", "domain": "usageLimits", "reason": "dailyLimitExceeded" }
],
"status": "RESOURCE_EXHAUSTED"
}
}
);
It appears that we have reached the daily query limit (which is 10,000). The odd thing is, that when this happens we should no longer have access to the search engine, but instead it just starts working again after some time; these are very temporary lock-ups.
Is there any way for me to verify the number of queries/requests via https://console.developers.google.com/ ? If so, please kindly let me know where exactly.
According to Google Analytics, the daily number of unique queries does not exceed 1,000/day. This is why I am inclined to believe that we do not exceed the daily 10,000 limit, but I may be wrong.
Do you have any suggestions as to what may be the issue with the Google Custom Search failing for us (if it is, in fact, not the daily query limit)? If we do, however, somehow exceed the limit, is there any way to optimize the engine (e.g. adding captcha, so that various bots would not generate additional queries?).

You can view your quota information at https://console.cloud.google.com/iam-admin/quotas?service=customsearch.googleapis.com&project=YOUR_PROJECT_ID
You may be hitting the "Queries per 100 seconds per user" quota. You can use the quotaUser parameter described here https://support.google.com/googleapi/answer/7035610 to identify individual users.

Related

Is there any paid solution to the "Too Many Requests" (Imgur) API limit?

Like many others, I recently hit the limit on the number of upload requests I can make using my account's personal Application Client ID/Secret. It makes perfect sense because my application uploads ~100 images a day, so I could have hit either the daily or monthly quota.
I know you’re not AWS or GCP, but I was wondering if there is a way to let me pay to increase number of API calls i’m allowed (i.e. raise my Application quota)? If there isn't already a way to do so, i'd like to make a feature request to your product team. Let me know if you'd recommend any workarounds in the meantime.
{'errors': [{'id': 'legacy-api-5bcc787bb8-zpvcr/qtPyuFjKN3-3219168', 'code': '429', 'status': 'Too Many Requests', 'detail': 'Too Many Requests'}]}
Best,
Nick

How to get daily usage of Youtube API qouta?

I am using youtube data API and I didn't find anything related to the overall daily usage of API limit.
I can check the same on the console and I visited the below link but here I can only calculate the stats from the youtube web portal.
https://developers.google.com/youtube/v3/determine_quota_cost
Is there any means that I can get the overall daily usage of from any API provided by youtube.
Yes. Go to here, click on the menu in the top left corner, IAM & Admin and then Quotas.
Recently I had this requirement too. But then I moved on as it was not a blocker for me.
Alternatively I would suggest keeping track of quota units consumed. You can easily calculate how many quota units are consumed from the chart in the link you provided. You can get the number of quota units left by subtracting the sum of units consumed from 10000 (Current default limit, or any number assigned to your account if you requested for more).
The quota gets reset every midnight PST.
FYI, the api does respond with an HTTP 403 and error code 403 with reason = dailyLimitExceeded. Once you encounter this then you can stop sending out more api calls till midnight.
If you ever get to know of an API endpoint please update this question so that it helps people like us.

Google API dailyLimitExceeded solutions

I've been working with Google Analytics for 2 months now. I created a custom dashboard with NodeJS (express/serverless), out of it with requesting data from the Core Reporting API and the Real Time Reporting API. I've managed to put it as a Lambda Function on AWS. While I'm very pleased about this, I have some issues I'm facing right now.
I get the following errors:
{
"error":{
"errors":[
{
"domain":"global",
"reason":"dailyLimitExceeded",
"message":"Quota Error: profileId ga:NNNNN has exceeded the daily request limit."
}
],
"code":403,
"message":"Quota Error: profileId ga:NNNNN has exceeded the daily request limit."
}
}
and
{
"error":{
"errors":[
{
"domain":"usageLimits",
"reason":"userRateLimitExceeded",
"message":"User Rate Limit Exceeded"
}
],
"code":403,
"message":"User Rate Limit Exceeded"
}
}
My dashboard looks like this:
When the dashboard get visited, it calls the realtime api 9 times (each block in the image is a querycall). I think I could combine the 'Online users', 'Users today' and 'pageviews today' call into one call. The search today, and orders today are specified by filters for searching for a specific event.
I have a build in a timechecker, which allows the dashboard to be viewed between 07:00 and 19:00. When it's earlier then 07:00 or later then 19:00 a variable checkTime is set to false, which makes the dashboard shows a div with text something like "dashboard offline". When someone has visited the dashboard in the allowed timerange, a variable checkTime is set to true and calls to the Google API's can be made.
The dashboard is running on a tv screen between 07:00 and 19:00. This means that the dashboard is up on a TV screen for 12 hours long. Every 20 seconds there is a function call to update all the data (so again 9 requests are being made).
So let's say there are
60 minutes x 3 = 180 x 12 = 2160 x 9(requests) = 19440 requests for a
day.
I don't think I should reach the 50.000 quota. But I am reaching the profile quota from 10.000.
However when I view the Developers console I can see the following:
I think my options are the following:
Increase the interval to 1 minute ( (60 x 12) x 9 requests each view = 6480), that way the profile quota shouldn't be exceeded. But this doesn't really make the dashboard realtime anymore.
Make a server, which runs the queries(with the increased interval of 1 minute), save the results to a database. The dashboard makes a GET request to the database. This way multiple tv screens should be able to request data.
QUESTION: Could I also make multiple service accounts, and switch to other service account when limit has been reached, or doesn't this fix the profileid limit?
DailylimitExceded can mean one of two things.
You can only make 10000 request against a single view a day. This quota you are sharing with other developers. So if i install your app and Someone elses app in total there can only be made 10000 requests a day against my Google analytics view and then both apps will get that error. If you are making these requests you should be storing the data in the database so that you don't need to request the same information again. Even though its a different user who is trying to view data on the same view. You are probably not going to be able to track this quota hit in the Google Developer console.
The second issue is that by default an application can make a max of 50000 requests a day across all views. That means that if you have 5 users and you are making 10000 requests a day for each of them you have reached the limit of your requests. I dont think this is what you are hitting.
The first quota the user based one there is nothing you can do about that you cant extend it. You need to limit your requests so that you dont block a users account. The second one you can apply for an extension in the Google Developer console it can take a while to get the extension you should apply for it when you have reached around 80% of your current daily quota.
The main thing here is that you should not be requesting the same data twice. If you have made a request you should be saving it and displaying stored data to your users rather than just requesting it again. That and the real time api you should not be trying to request from that more then every 5 minutes as you will be eating our quota.
I have suggested to Google several times that the realtime api should be on its own quota and not the same as the reporting api. I am still waiting for them to add this feature.

Instagram API request more

https://api.instagram.com/v1/users/self/media/recent/?access_token=my_token&count=30
request only 20 data.
I want 30 data.
{
pagination: { },
meta: {
code: 200
},
data: [
{
attribution: null,
tags: [...
can't find pagination in next_max_id.
but https://api.instagram.com/v1/users/self/media/recent/?access_token=my_token&count=1
This code = next_max_id ok.
Do u know what i meen?
sorry, not wall English wirte..
Help Me~
In general, the endpoints are limited to a certain amount of items per request. In order to get around this, endpoints support pagination. Pagination is indicated by the pagination key in the response. It may look like this:
"pagination": {
"next_url": "https://api.instagram.com/v1/tags/puppy/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&max_id=13872296",
"next_max_id": "13872296"
}
In that case, you could pass next_max_id to the previously made request to get the next page which starts from the last id that wasn’t included in the current response. You can also simply request the URL at next_url which is automatically constructed for your by the Instagram API.
You can increase the page size for endpoints by supplying the count parameter. Note that each endpoint has a maximum page size which you cannot go above. So you will have to support paging at some point in order to access more items.
Finally, since you hit the number of 20 items in your response despite specifying a page size of 30, it’s very likely that you are hit by the sandbox mode.
Sandbox mode is a new restriction for Instagram applications created on or after November 17th, 2015. This restriction limits application in various ways, most notably, it limits all endpoints to return a maximum of the 20 most recent media items.
So if you have created your application after that date, this is exactly what you’re running into. Your application is essentially in a test mode. In order to lift these restrictions, you need to get your application reviewed and approved first. As stated in the documentation:
After your app has been reviewed and approved, you are ready to make it available to the general public. To switch your client from sandbox to live mode, you can use the button on the top section of the configuration screen for your app. When you are live, any Instagram user will be able to authorize your app, but you will have access only to the permissions that you were granted during the review.

Spotify API Policy change?

I'm using a process similar to this one: http://static.echonest.com/playlistminer/index.html and, since last week, it seems that it doesn't work anymore due to a large amount of "API rate limit exceeded". Is there any policy change for the API, or is it an issue ?

Resources