0

i am calculating distances between two places using the google api.

 https://maps.googleapis.com/maps/api/distancematrix/json?&origins={origin}&destinations={destination}&key={api_key}

i have a api key, which has usage limit of 2500 requests per day.

i am calculating multiple distances in my .py program. when the key usage limits exceeds, i get query over limit error.

I want to know how many hits are left in my api.

is there any way of doing it programatically?

Shubham R
  • 7,382
  • 18
  • 53
  • 119

1 Answers1

0

I wanted to add this a comment but I'm not allowed to.

See here: https://stackoverflow.com/a/8714638/5914299

But why not check for the day and keep a counter. When reached 2500 stop requesting the API and when an new day arrives reset the counter?