12

I am trying to use Google Places API in a very simple app. I just want to locate all the shopping malls near the current location. I used this web service:

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=12.9412390245245,77.6171295438685&radius=1000&sensor=true&types=shopping_mall&key=MY_SERVER_KEY

It was working, but now I am getting the following error message:

{
   "error_message" : "You have exceeded your daily request quota for this API.",
   "html_attributions" : [],
   "results" : [],
   "status" : "OVER_QUERY_LIMIT"
}

How can I avoid this? Also, while creating server key, I did not provide any IP address, as I don't have any server. I don't want to pay anything for this simple service. Is there anyway we can avoid it or any other free alternative?

Pang
  • 9,564
  • 146
  • 81
  • 122
Richa Srivastava
  • 482
  • 1
  • 7
  • 24
  • Have you checked how much APIs you have called for a day? In developer console you will get graph of Requests. – Vatsal K Jul 06 '16 at 05:14

5 Answers5

9

as per following link https://developers.google.com/maps/documentation/geocoding/usage-and-billing

only one daily request quota for this API. otherwise billing compulsory.

Maulik Patel
  • 2,045
  • 17
  • 24
7

Almost every Google API has a daily free quota. For Google Places API it's 2500 requests per day and 10 requests per second. If you want to use more than that, I would suggest to enable billing. If you still want to use the free quota, please wait for a day to get those 2500 requests again.

P.S. : The quota is based on specific accounts. Please make your own API key using Google API console if you're using a random one.

Hope it helps.

Bharat
  • 340
  • 1
  • 8
  • what about the developer trying in localhost. I get API key from Google and its only response back to that URL that registers and when the sender is htt p:/localhost it response back this message that exceeded. for sure friendly message is : this key for another domain name and this key registered only for that URL – saber tabatabaee yazdi Jul 24 '18 at 07:08
1

here is your answer link

@engin-kurutepe Have answered it very well .

He writes "Make sure that you're not hitting the Google API too fast. They don't limit the total number of requests but the rate of requests. About 10 requests per second is more or less the fastest you're allowed to hit their APIs."

Hope this Helps!

Community
  • 1
  • 1
saurabh goyal
  • 328
  • 4
  • 11
  • So after first request if i get this OVER_QUERY_LIMIT error, i have put 2 sec of sleep in my app and then make same request again. But still i get OVER_QUERY_LIMIT error every time. Not sure if i got this issue properly. But shouldn't this resolve my issue? – Richa Srivastava Jul 06 '16 at 05:15
  • I found this . http://stackoverflow.com/questions/23459698/how-to-fix-error-you-have-exceeded-your-daily-request-quota-for-this-api-in-xm Upon receiving a response with status code OVER_QUERY_LIMIT, your application should determine which usage limit has been exceeded. This can be done by pausing for 2 seconds and resending the same request. If status code is still OVER_QUERY_LIMIT, your application is sending too many requests per day. Otherwise, your application is sending too many requests per second. – saurabh goyal Jul 06 '16 at 05:20
0

You have to create a billing account to activate it. They have a daily limit for which you will not be charged - only pay if it exceeds the limit. Look at their pricing details on https://developers.google.com/places/web-service/usage-and-billing and plus there is a free trial for a month.

For a small project with very little number of requests you will end up not paying anything but you still have to associate a credit/debit card with the account for it to work.

API
  • 449
  • 3
  • 12
-4

You can try FourSquare API, Its free, but it requires the users location to find places and thats good for near by places, its NOT good for searching for places far away.

Amit Singh
  • 2,698
  • 21
  • 49