Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the API Key for in Google Maps API V3?

In the older version of the API, I'd have to insert the javascript into the page using something like this for just basic functionality to work:

http://maps.google.com/maps?file=api&v=2&key=GoogleMapsAPIKey

Where I had to configure the API key for each individual site. Looking at the documentation, it says to get a basic map working I just need this:

http://maps.google.com/maps/api/js?sensor=true/false

Where does the API key fit in? Do I need to worry about it if I just plan on using a basic map and marker and none of the more advanced functions?

I'm also testing on localhost, but the FAQ says I still need to register a key for it, which I haven't done and it still works.

like image 855
Brandon Avatar asked May 04 '10 21:05

Brandon


People also ask

What is the use of Google Map API key?

The API key is a unique identifier that authenticates requests associated with your project for usage and billing purposes. You must have at least one API key associated with your project.

Do we need API key for Google Maps?

You must include an API key with every Maps Static API request. In the following example, replace YOUR_API_KEY with your API key. HTTPS is required for requests that use an API key. Note: When using Web Services, all special characters inside the parameters must be URL encoded.

How do API keys work?

API keys provide project authorization They are generated on the project making the call, and you can restrict their use to an environment such as an IP address range, or an Android or iOS app. By identifying the calling project, you can use API keys to associate usage information with that project.


1 Answers

Whilst it is true that V3 of the Google Maps API does not require an API key, it is there for a reason. Google recently introduced the following usage limits:

Web sites and applications using each of the Maps API may at no cost generate:

  • up to 25,000 map loads per day for each API
  • up to 2,500 map loads per day that have been modified using the Styled Maps feature

In order to monitor usage an API key is necessary, as the developer notes make clear:

All Maps API applications should load the Maps API using an API key. Using an API key enables you to monitor your application's Maps API usage, and ensures that Google can contact you about your application if necessary. If your application's Maps API usage by exceeds the Usage Limits, you must load the Maps API using an API key in order to purchase additional quota.

So whilst you don't need to have an API key it is useful if you want to monitor your usage and also required if you buy additional usage quota.

like image 112
Dan Diplo Avatar answered Sep 23 '22 11:09

Dan Diplo