2

Do I have to use an API key when using Distance Matrix API?

Google Documentation states that the key should be included in every request, but I see I can get the duration and distance values without including a key.

https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=Washington,DC&destinations=New+York+City,NY

But I do need to use a key when I need the duration_in_traffic variable.

https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=Washington,DC&destinations=New+York+City,NY&departure_time=1531583990&key=API_KEY

These are the price stated by Google for basic and advanced, https://developers.google.com/maps/documentation/distance-matrix/usage-and-billing#distance-matrix

And I am wondering if I should use my API key or not when sending basic requests as I will have to pay if I use an API Key.

kks21199
  • 1,116
  • 2
  • 10
  • 29
  • Users of the standard API: 2,500 free elements per day, calculated as the sum of client-side and server-side queries. Maximum of 25 origins or 25 destinations per request. 100 elements per request. 100 elements per second, calculated as the sum of client-side and server-side queries. – SachaDee Jul 14 '18 at 16:54
  • 1
    Yes but that is for users who use API key, what if I don't use any keys? "Also, in June 2016 we announced that we would stop supporting keyless usage, meaning any request that doesn’t include an API key or Client ID. This will go into effect on June 11th, and keyless access will no longer be supported." From: https://cloud.google.com/maps-platform/user-guide/ – kks21199 Jul 14 '18 at 17:10

0 Answers0