-1

Referring to here in Google Official documentation, a developer API key is needed, this means that each request will count towards your ( the developer's) quota.

In fact, in the example given by Google, one needs to specify an developer API key in the request:

https://maps.googleapis.com/maps/api/elevation/json?locations=39.7391536,-104.9847034|36.455556,-116.866667&key=YOUR_API_KEY

However, I tested with the above request, and I remove the &key=YOUR_API_KEY, I can still get the correct response! ie: this still works!

https://maps.googleapis.com/maps/api/elevation/json?locations=39.7391536,-104.9847034|36.455556,-116.866667

So, can the elevation request work without developer API key? If yes, this means one that can generate millions of elevation requests in a single day and not getting charged, am I right?

xomena
  • 31,125
  • 6
  • 88
  • 117
Graviton
  • 81,782
  • 146
  • 424
  • 602

2 Answers2

1

The difference will be in how the usage quota is applied.

If you apply an API key in your requests the quota will be calculated against your project.

If you don't apply an API key in your requests the quota will be calculated based on your IP address. If you share your public IP address with somebody else you can get less than 2500 daily requests, so the API key in this case is a better option.

Also, Google can deprecate a keyless access at some point in the future. For example, this happened one year ago with Maps JavaScript API. You can read the following blog post as the reference:

https://maps-apis.googleblog.com/2016/06/building-for-scale-updates-to-google.html

I hope my answer clarifies your doubts.

xomena
  • 31,125
  • 6
  • 88
  • 117
-1

well in my experienced api key are to to identify your project , there several i think google api which does not require api key but using api key secure's your application so it's better if you use one

for more details check this link

https://cloud.google.com/endpoints/docs/when-why-api-key

vlad awtsu
  • 185
  • 1
  • 2
  • 14