3

I'm getting the OVER_QUERY_LIMIT status code when using the Google Places Javascript Library. I have billing enabled on my account so it's not that I'm actually hitting the limit on the number of places requests I make, but I'm using the Javascript library and looping through a few hundred Places search requests. The problem is, this causes OVER_QUERY_LIMIT status to come back from the search unless, while debugging, I slow down the loop.

Funnily enough this only happens with the JS Library, not when using the API directly. Rather than putting something in to slow the loop, is there anything that people can recommend to fix this?

EDIT: More info on the two scenarios

  1. (the problem) Loops through dozens of points, each time making a places request through the official Places Javascript API
  2. (the one which works) Using node.js on the backend to make requests directly to the places search endpoint documented at https://developers.google.com/maps/documentation/places/ and then pushing individual responses to the client.

Thanks, Dan

basicallydan
  • 2,134
  • 3
  • 25
  • 40
  • Places is really intended to respond to ad-hoc requests that are generated by users interacting with your map, not really as a service to be called in a program loop. So Google is keeping an eye on the frequency of requests in addition to the overall 24 hour total. Why do you need to call the service repeatedly in a loop? – Sean Mickey May 02 '12 at 20:41
  • Because I'm creating an app which makes a lot of places requests for various different locations. It doesn't seem to have a problem with a large number of requests when I'm not using the Javascript library, and in fact this has only started happening in the last few days, with the same level of activity. – basicallydan May 02 '12 at 20:44
  • Can you provide some specifics about the two different ways you are making your requests? What do you mean when you say using the JS library vs. using the API directly? Just trying to help - – Sean Mickey May 02 '12 at 20:53
  • Thanks, I know :) I've answered your question in an edit. – basicallydan May 02 '12 at 21:33
  • 2
    @DanielHough there is indeed a rate limit in place for the JavaScript API to prevent abuse of the service since the JavaScript API does not have a quota. The standard Places API however does not have a rate limit, but does have a daily quota. I would also strongly advise against programmatically crawling large quantities of Places data in an automated manner, as this is not permitted as described in Section 10.1.3 of the Google Maps/Google Earth API Terms of Service: https://developers.google.com/maps/terms#section_10_1_3 – Chris Green May 03 '12 at 04:30
  • Hi Chris, thank you very much for your reply and for clearing that up. I know the solution that I need to come up with, I think :) it shouldn't be too difficult. However, while I have your attention could I ask your opinion on something? My app is searching dozens to hundreds of points per user request, meaning it could make dozens to hundreds of requests to the places API within a few seconds. Do you think this counts as breaking the "No Mass Downloads or Bulk Feeds of Content" rule? Keeping in mind, the majority of these requests come back with no results. – basicallydan May 03 '12 at 07:28

0 Answers0