0

I have typical issue.

  1. I am hitting Place search API and Getting Results.
  2. After that i need Show the Driving Distance for each of the Place to display.
  3. To do so i am hitting Google API 10 times to fetch 10 Driving distance.
  4. But as google does not allow multiple hit within a seconds, So google is returning OVER_QUERY_LIMIT after 1 or 2 response.

    Can anybody tell how can i do so that all the driving distances come correctly ?

Mihir Das
  • 458
  • 4
  • 13

1 Answers1

9

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.

Engin Kurutepe
  • 6,719
  • 3
  • 34
  • 64
  • Actually i am creating Operation and Putting them in an operation Queue but could u tell how can make sure that all the 10 requests have to be performed within minimum time frame of 1 second? – Mihir Das May 30 '13 at 08:47
  • set the concurrent operation count of your queue to 1 and let your operation sleep for 1/10 seconds after it's done. – Engin Kurutepe May 30 '13 at 14:05
  • @EnginKurutepe i think limit is 2500 request per day. Are you sure `They don't limit the total number of requests but the rate of requests.` on this statement? – SuryaKantSharma Feb 04 '19 at 10:36
  • 1
    @SuryaKantSharma no idea. This answer is almost 6 years old. Things might have changed in the mean time. – Engin Kurutepe Feb 10 '19 at 11:12