FAQ

Getting Started

Understanding the Terms of Service

Usage limits and billing

Using the Google Maps APIs

Google Maps APIs Services

Google Maps SDK for iOS

Getting Started

What are the Google Maps APIs?

The Google Maps APIs give developers several ways of embedding Google Maps into web pages or retrieving data from Google Maps, and allow for either simple use or extensive customization. There are several API offerings:

Web APIs:

Web service APIs:

Mobile APIs:

Depending on your needs, you may find yourself using one or a combination of these APIs.

If you operate an enterprise or commercial website, you may also be interested in Google Maps APIs Premium Plan.

Which API do I need?

For help in finding the right API based on your functional requirements, take a look at the API picker.

What countries do the Google Maps APIs cover?

The Google Maps team is constantly pushing new map data out and increasing our international coverage. Consult the Google Maps coverage data for the latest coverage information. You can filter the data with the filter box at the top of the page. Please note that coverage data can change if licensing agreements with the data providers change.

Also see:

Can I put Google Maps on my site without using the Google Maps APIs?

Yes. Google Maps now offers the ability to embed the map that you're viewing into your website or blog, without any programming or use of the Google Maps APIs. More information is available here.

How do I deliver Maps applications on mobile devices?

To incorporate maps in an Android application, use the Google Maps Android API.

To incorporate maps in a native iOS application, use the Google Maps SDK for iOS.

The Google Maps JavaScript API has been developed to cater to mobile devices, and is suitable for browser applications targeted at both the desktop and devices that include a web browser with a full JavaScript implementation, such as the Apple iPhone.

For applications targeted at devices not suitable for using the JavaScript API, the Google Static Maps API delivers map images in GIF, JPG, and PNG formats, including markers and polylines. Note that use of the Google Static Maps API outside of browser based applications requires that the map image be linked to Google Maps.

Can I print maps from the JavaScript API?

Printing from the JavaScript API is not supported. This is because printing support is inconsistent across commonly used browsers. We recommend using the Static Maps API for printing purposes.

How do I start using the Google Maps APIs on my site?

See the Maps Javascript API documentation for examples and details.

How can I be notified when there are changes in the Google Maps APIs?

You should subscribe to the Google Geo Developers Blog for news updates across the various Google Geo developer offerings.

Understanding the Terms of Service

What are the Terms of Service for the Google Maps APIs?

The Terms of Service for the Google Maps APIs are available at:

https://developers.google.com/maps/terms

If you are a Google Maps APIs Premium Plan customer, please refer to your agreement for the terms that govern your use of the Google Maps APIs.

Does my site meet the Terms of Service for the Google Maps APIs?

The Maps APIs are available for all sites that are accessible to consumers without charge. You can use the Google Maps APIs on both commercial and non-profit websites as long as your site meets the Terms of Service.

However, there are some uses of the Google Maps APIs that we just don't want to see: maps that identify the places to buy illegal drugs in a city, for instance, or any other illegal activity. We also respect people's privacy, so the Google Maps APIs shouldn't be used to identify private information about individuals.

You should use your own counsel to determine whether your application complies with the Terms of Service before you develop and launch it. Google engineers can only offer technical assistance and are not qualified to offer legal advice. Google reserves the right to suspend or terminate your use of the service at any time, so please read the Terms of Service carefully.

If you operate an enterprise or commercial website, you may also be interested in Google Maps APIs Premium Plan which has modified terms of use that may better suit your needs.

Can I access the Maps and Satellite images directly?

You may not access the maps or satellite images through any mechanism besides the Google Maps APIs (such as the creation of your own mapping API or the use of a bulk tile download script). Your application's access to the tiles will be blocked if it accesses them outside of the Google Maps APIs. See section 10.1.a of the Google Maps Terms of Service for more details.

Can I use the Google Maps APIs on a commercial website?

As long as your site is generally accessible to consumers without charge, you may use the Google Maps APIs. For example, if your website is supported by advertising, it likely falls within the Google Maps APIs Terms of Service. If you charge people to place information on your map (e.g. to list their homes for sale), but you display this information using the Google Maps APIs on a free part of your site, you'll also meet the Google Maps APIs Terms of Service.

However, not all commercial uses are allowed. For example, if your site meets any of the following criteria you must purchase the appropriate Google Maps APIs Premium Plan license:

  • Your site is only available to paying customers.
  • Your site is only accessible within your company or on your intranet.
  • Your application relates to enterprise dispatch, fleet management, business asset tracking, or similar applications.

Remember, Google reserves the right to suspend or terminate your use of the Google Maps APIs at any time, so please ensure that you read the Terms of Service carefully.

Can I use the Google Maps APIs for tracking applications?

There is no restriction on displaying real-time data (tracking) with the Google Maps APIs provided that the application is publicly available without charge and otherwise complies with the Terms of Service. For internal-only applications, Google Maps APIs Premium Plan must be used. See Section 10.4 of the Terms of Service for more information.

Can I use Google Maps in my non-Web application?

Yes, the Google Maps APIs can now be used in desktop applications, provided that they adhere to the other restrictions of the Terms of Service. Note that in order for a desktop application to be deemed "publicly accessible", there must be a publicly accessible webpage from which it can be downloaded. See Section 9.1 of the Terms of Service for more information.

The Google Maps JavaScript API is only supported when run in one of the supported browsers.

Can I use the Google Maps APIs on a site that is password protected?

Yes, you can, though you should consult the Terms of Service before using the Google Maps APIs on a password protected website. If consumers can easily sign up for a password without charge or if the purpose of the password protected map is to enhance the publicly available map (ie. administration), then your site is likely within the Terms of Service. If this is not the case, you need to use Google Maps APIs Premium Plan.

Can I use screen shots of a Google Maps APIs application in printed materials or offline media?

Use of Google Maps imagery in printed materials and offline media is subject to the Permission Guidelines published at:

http://www.google.com/permissions/geoguidelines.html

For more information about printing, see Can I print maps from the JavaScript API?

How can I opt out of including my content in Google search results?

We are no longer collecting this data. The use of the indexing parameter has been deprecated and has no effect. You no longer need to opt out explicitly, but we encourage you to remove this parameter at your earliest convenience.

To remove your page or site from search results, follow the instructions provided in our webmaster help center.

If you are using a client ID with a Google Maps APIs Premium Plan license, you can use the following option to remove the link from the Google logo shown on the map. You must limit usage of this option to cases where the logo link creates a negative user experience. (An example is a mobile app featuring a fullscreen view where clicking on the logo takes the user away from the original content of the app, with no way to go back.) You must ensure that the logo and copyright notice aren't hidden or covered up.

map.setOptions({passiveLogo: true});

The logo remains visible but is not clickable.

This option is available by default to all Premium Plan customers using a client ID. If it does not work, please contact Premium Plan Support.

What information is sent to Google when I use the Maps JavaScript API?

When using the Maps JavaScript API, the following information is sent to Google:

  • Map size and location for retrieving map tiles and copyrights
  • Addresses for geocoding
  • Direction and Elevation requests
  • Locations around which to search for Places
  • KML when using KmlLayer
Can I generate a map image using the Google Static Maps API which I store and serve from my website?

You may not store and serve copies of images generated using the Google Static Maps API from your website. All web pages that require static images must link the src attribute of an HTML img tag or the CSS background-image attribute of an HTML div tag directly to the Google Static Maps API so that all map images are displayed within the HTML content of the web page and served directly to end users by Google.

Usage limits and billing

Which Google Maps APIs have usage limits?

Google Maps APIs are free for a wide variety of use cases, with complimentary usage limits and predictable overage pricing for use of the standard APIs, and annual contracts available for enterprise deployments.

The following APIs do not have usage limits:

Usage limits apply to the following Maps APIs. Click the API to view its usage limits details:

The Maps APIs must be deployed in compliance with the standard Terms of Service.

What are the usage limits for the Google Maps APIs?

Most of the Google Maps APIs have a complimentary per-day quota that can be set in the Google API Console. The daily default and maximum queries vary by API. You can increase the complimentary daily limits by enabling billing, or purchasing a Google Maps APIs Premium Plan license.

  • Web service APIs:

    Google Maps web service APIs include 2,500 free requests per day, calculated as the sum of your client-side requests (made via the Google Maps JavaScript API services) and your server-side requests. To access higher daily quotas (up to 100,000 per day), we offer pay-as-you-go pricing.

    to opt in to pay-as-you-go.

  • Web APIs:

    The Google Maps JavaScript API, Google Static Maps API, and Google Street View Image API have a free daily limit of 25,000 map loads per day. To access higher daily quotas (up to 100,000 per day), we offer pay-as-you-go pricing.

    If your website exceeds 25,000 map loads in a day, the API will cease to function for the rest of the day, unless you enable billing to pay for the excess usage.

    In certain instances, quota exceptions may apply. Learn more.

Please refer to specific questions for a precise definition of:

Note: Applications deemed in the public interest (as determined by Google at its discretion) are not subject to these usage limits. For example:

  • A disaster relief map is not typically subject to the usage limits even if it has been developed and/or is hosted by a commercial entity. Crisis response organizations may apply for increased quota limits. Learn more and apply.
  • Qualifying nonprofit organizations who demonstrate a need for increased geocoding limits or internal usage of the Google Maps APIs may apply for a Google Maps APIs Premium Plan license through the Google Earth Outreach grants program.
  • Qualifying news media organizations using the Standard plan may apply for increased quota limits. Learn more and apply.

How is quota usage calculated?

The calculation of quota usage varies by API. The web service APIs use requests (note that the Google Maps Distance Matrix API uses elements). The Web APIs use Map Loads to calculate quota usage.

For the Google Maps Distance Matrix API, each query sent to the API is limited by the number of allowed elements, where the number of origins times the number of destinations defines the number of elements.

There are two types of quotas that limit the usage of Google Maps APIs web services: long term (per day quota) and short term (request rate quota). These usage limits apply whether requests are made server-side, via the Maps Web Services APIs, or client-side, via JavaScript services for Directions, Distance Matrix, Elevation, or Geocoding.

Note: There may also be additional limits set on the APIs. For example, the Elevation API has a locations per request limit. And, in addition to a per-day quota, the image APIs include a maximum image resolution. View the usage limits pages for each of the Google Maps APIs for details.

How are map loads applied against the usage limits for Google Maps APIs for Web?

A single map load is charged when any of the following occur:

  • A web page or application displays a map using the Google Maps JavaScript API.
  • A web page or application displays a Google Street View Image API panorama using the Google Maps JavaScript API. If a Street View panorama replaces a map in the same div element, the panorama is not charged.
  • An application requests a single map image from the Google Static Maps API.
  • An application requests a single panorama image from the Google Street View Image API.

After a web page or application loads a map, a static map image, or a Street View panorama, any user interactions with it, such as panning, zooming, or switching map layers, do not generate additional map loads or affect usage limits.

Google Maps APIs Premium Plan applications consume quota in terms of Maps APIs Credits. Please refer to the Premium Plan Usage Rates and Limits for more information.

How do I monitor my quota usage?

You can monitor the quota usage of individual APIs in the Google API Console.

  1. Select the project that contains the API you want to review.
  2. From the list of APIs on the Dashboard, click the name of the API.
  3. Near the top of the page, click Quotas or Usage.

Note: To see a traffic report and billing information for an entire project, enable billing first.

What happens if I exceed the usage limits?

If you exceed the usage limits of a given Maps API, the API will return an error message. If you repeatedly exceed the limits, your access to the API may be temporarily blocked.

  • Web service APIs

    For Google Maps APIs web services there are two types of quotas that limit usage: long term (per day quota) and short term (request rate quota). If you exceed the usage limits or otherwise abuse the service, the web service will return a specific error message. If you continue to exceed limits, your access to the web service may be blocked.

    You can exceed the usage limits for the Google Maps APIs web services by:

    • Sending too many requests per day.
    • Sending requests too fast, i.e. too many requests per second.
    • Sending requests too fast for too long or otherwise abusing the web service.
    • Exceeding other usage limits, e.g. locations per request in the Elevation API.

    Note: Four of the web service APIs have an equivalent client-side service available in the JavaScript API: Directions, Distance Matrix, Elevation, and Geocoding.

    All usage limits, long term and short term, are shared by the service, whether the requests are made client-side or server-side. For example, free daily quota for the web services is set at 2,500 requests per day, shared between client-side services and server-side requests. If you use the JavaScript API Directions service to make 1,500 requests per day, and you also use the server-side Google Maps Directions API to make 2,000 requests per day, then you would be at 3,500 Directions requests in a day, exceeding the free daily quota by 1,000 requests.

  • Web APIs

    The Web APIs are the Google Maps JavaScript API v3, Google Static Maps API, and Google Street View Image API, each with a 25,000 map loads per day free limit.

    For some customers, quota exceptions may apply. Learn more.

Usage limits exceeded

If you exceed the usage limits you will get an OVER_QUERY_LIMIT status code as a response.

This means that the web service will stop providing normal responses and switch to returning only status code OVER_QUERY_LIMIT until more usage is allowed again. This can happen:

  • Within a few seconds, if the error was received because your application sent too many requests per second.
  • Within the next 24 hours, if the error was received because your application sent too many requests per day. The daily quotas are reset at midnight, Pacific Time.

If you regularly exceed your per-day usage limits, consider:

My site gets a lot of traffic. Can I use the Maps APIs?

Yes. However we recommend that you familiarize yourself with the usage limits for any of the Google Maps APIs that your application relies on.

Should I purchase the Google Maps APIs Premium Plan?

You should purchase the Google Maps APIs Premium Plan if your business or organization requires any of the following:

  • An SLA with 24-hour technical support
  • Ability to sell a product or service with embedded Google Maps
  • Ability to use Google Maps APIs for an internal application or website
  • A specific amount of quota
  • Ability to use Google Maps APIs (excluding the Places API) for asset tracking applications
  • Premium Plan features available with your existing Maps APIs for Work license

How do I purchase the Google Maps APIs Premium Plan?

Contact your Google sales representative for details on purchasing the Google Maps APIs Premium Plan and to receive a price quote based on an estimate of your application's usage.

  • Web service APIs

    If you are using web service APIs, we allow 2,500 free requests per day, calculated as the sum of your client-side requests (made via the Google Maps JavaScript API services) and your server-side requests. If you exceed the free quota, you have access to pay-as-you-go quota up to 100,000 requests in a day, if you enroll for automated billing.

  • Web APIs

    If you are using the Google Maps Web APIs (Maps JavaScript API, Static Maps API, or Street View Image API), we allow 25,000 free map loads per day. If you exceed the free quota, you have access to pay-as-you-go quota up to 100,000 map loads in a day, if you enroll for automated billing.

    In certain instances, quota exceptions may apply. Learn more.

If you exceed the free daily quota and billing is not enabled, the API ceases to function for the rest of the day.

How will excess usage be calculated and billed?

Excess usage over the complimentary quota for each Maps API service is calculated at the end of each day.

  • Web service APIs

    Web service APIs offer 2,500 free requests per day, calculated as the sum of your client-side requests (made via the Google Maps JavaScript API services) and your server-side requests. If you enable billing to access higher quotas, once you exceed 2,500 requests in a day, you are billed $0.50 USD / 1,000 additional requests, up to 100,000 daily.

  • Web APIs

    The Google Maps Web APIs (Maps JavaScript API, Static Maps API, or Street View Image API) offer 25,000 free map loads per day. If you enable billing to access higher quotas, you are billed $0.50 USD per 1,000 map loads over the daily limit of 25,000, up to a maximum of 100,000 map loads daily.

    In certain instances, quota exceptions may apply. Learn more.

Learn more about what happens if you exceed the usage limits.

If you chose to enable billing you need to provide your credit card details. Your excess usage will continue to be calculated at the end of each day, and the total charged to the credit card provided at the end of every month, priced as given below.

How much does it cost to use the Google Maps APIs?

Applications generating requests or map load volumes below the usage limits can use the Google Maps APIs at no cost providing the application meets the requirements of the Google Maps APIs Terms of Service.

For web service APIs, if your Maps API service exceeds the daily usage limits, and you choose to purchase excess quota online using the Google API Console, your excess usage will be charged at the rates shown below for the service concerned. Daily usage is tracked per project and calculated as the sum of your client-side requests (made via the Google Maps JavaScript API services) and your server-side requests.

For the Google Maps JavaScript API v3, Google Static Maps API, and Google Street View Image API, if your use of a Maps API service exceeds the daily usage limits and you choose to purchase excess map loads online using the Google API Console, your excess usage will be charged at the rates shown below for the service concerned. Daily usage is tracked per project.

Note that if your site consistently generates a high volume of requests or map loads per day, a Google Maps APIs Premium Plan license may be more cost effective. We recommend that you contact the Google Maps APIs Premium Plan Sales team for more information.

Web service APIs Free limit
(per day)
1000 excess requests
(in U.S. dollars)
Directions API + Directions client-side service 2,500 2 $0.50
Distance Matrix API + Distance Matrix client-side service 1 2,500 2 $0.50
Elevation API + Elevation client-side service 2,500 2 $0.50
Geocoding API + Geocoding client-side service 2,500 2 $0.50
Geolocation API 2,500 $0.50
Roads API 2,500 $0.50
Time Zone API 2,500 $0.50
1 Google Maps Distance Matrix API and Distance Matrix client-side service usage is measured in number of elements per day.
2 Free daily quota is calculated as the sum of client-side requests (made via the Google Maps JavaScript API services) and server-side requests.
Web APIs Free limit
(per day)
1000 excess map loads
(in U.S. dollars)
Google Maps JavaScript API 25,000* $0.50
Google Static Maps API 25,000* $0.50
Google Street View Image API 25,000* $0.50
* Quota exceptions may apply. Learn more.

Note that the purchase of excess quota online does not confer any additional rights or benefits other than the right to continue using the Google Maps APIs under the existing Terms of Service.

Is pricing available in other currencies?

Pricing is currently only available in U.S. dollars.

I’ve enabled billing. How do I view my bill?

Google charges you at the beginning of each month for the previous month's activity, using your specified payment method.

How do I avoid a large bill if my usage unexpectedly increases?

The Google Maps APIs provide complimentary daily quota and set maximum daily billable limits. You can cap the maximum daily limit on usage to protect against unexpected increases. You can also set billing alerts to receive email notifications when the charges on the billing account reach a threshold you set.

Capping the maximum daily billable limit:

  • For the web service APIs:

    The standard web service APIs support up to 100,000 requests or elements daily. A project will be restricted to the complimentary 2,500 per-day-limit until you've enabled billing on the project. Once billing has been enabled, if you exceed 2,500 requests in a day, you are billed at $0.50 USD / 1,000 additional requests, up to 100,000 daily. Note that usage is calculated as the sum of your client-side requests (made via the Google Maps JavaScript API services) and your server-side requests.

    To avoid a large bill, you can set a daily cap on usage to protect against unexpected increases in use. Currently, the maximum billable limit defaults to 100,000 requests per day. You can change this limit in the Google API Console. On the Quotas page of the API, click the edit icon next to the "requests per day" quota.

    Note: If your API usage reaches your billable limit on any given day, your application will not be able to access the API for the remainder of that day. Get more details about what happens if you exceed the usage limits.

  • For the Web APIs:

    For Google Maps JavaScript API v3, Google Static Maps API, and Google Street View Image API, if your use of the standard Google Maps Web APIs exceeds the free usage limits, you can purchase excess map loads online by enabling billing on the project. Once billing has been enabled, if you exceed the free usage limits, you are billed at $0.50 USD / 1000 additional requests, up to 100,000 daily.

    To avoid a large bill, you can set a daily cap on usage to protect against unexpected increases in use after billing has begun. Currently, the maximum billable limit defaults to 100,000 requests per day. You can change this limit in the Google API Console. On the Quotas page of the API, click the edit icon next to the "requests per day" quota.

    Note: If your API usage reaches your billable limit on any given day, your application will not be able to access the API for the remainder of that day. Get more details about what happens if you exceed the usage limits.

    Note: For some customers, quota exceptions may apply. Learn more.

Setting and managing billing alerts:

Set up billing alerts to send email notifications to billing administrators when the charges on the billing account reach a threshold you set. Billing administrators will be sent email notifications when the estimated charges on the billing account exceed 50%, 90%, and 100% of the threshold.

Recommendation: If your site consistently generates a high volume of requests or map loads per day a Google Maps APIs Premium Plan license may be more cost effective. We recommend that you contact the Google Maps APIs Premium Plan Sales team for more information.

Enabling billing

To enable billing and unlock higher quotas for the Google Maps APIs, we'll guide you through the Google Developers Console to complete a few tasks:

  1. Create or choose a project
  2. Set up or choose your billing profile
  3. Enable billing on your project
Continue

Using the Google Maps APIs

What keys or credentials should I use for different Maps products?

Each time you use the Google Maps APIs you must include a key, or other credentials, to validate your request. Google Maps APIs are available for Android, iOS or Web apps, and via HTTP web services. The type of credential required varies depending upon the API, and whether you have a standard or premium license.

The information in this section applies to standard plan customers and customers with the new Google Maps APIs Premium Plan, which became available in January 2016. If you have a previous Maps APIs for Work or Maps API for Business license, your required credentials may be different than those listed below.

  • API Key: An API key is a unique identifier that you generate using the Google API Console. API keys are generally used with the standard APIs. Premium Plan customers1 typically can choose to use a client ID or an API key.

    You can choose to use an API key without applying restrictions (called a “generic API key”) or a key with restrictions applied for greater security. APIs in any platform may use a generic API key.

    You can optionally add a restriction (for example, IP address) to the API key. Once restricted, a key will only work on platforms that support that type of restriction. Four types of API key restrictions are available:

    • Server restriction (by IP address) - for use with the web service APIs.
    • Browser restriction (by HTTP referrers) - for use with the Web APIs.
    • Android app restriction (by package name and fingerprint) - for use with the Android APIs.
    • iOS app restriction (by iOS bundle identifier) - for use with the iOS APIs.

    APIs of the same platform can use the same restricted key.

    Google Maps APIs Premium Plan and Google Maps APIs for Work customers, note: When generating a key on the Google API Console, you must select the project that was generated for you upon signup. The project name starts with Google Maps APIs for Business or Google Maps for Work or Google Maps.

    Example of loading an API with a key: &key=AIzaSyBjsINSH5x39Ks6c0_CoS1yr1Mb3cB3cVo

  • Client ID: A client ID is given to you when you sign up as a Google Maps APIs Premium Plan or Google Maps APIs for Work customer. Premium Plan customers typically can choose to use a client ID or an API key.

    Example of loading an API with a client ID: &client=gme-companyname

  • Digital Signature: Typically, a digital signature is used by Google Maps APIs Premium Plan and Google Maps APIs for Work customers when authenticating with a client ID. The digital signature is generated using a cryptographic key provided to you by Google. In addition, digital signatures are used with the Google Static Maps API and Google Street View Image API. If you are using the standard Google Static Maps API and Google Street View Image API, and billing is enabled, the digital signature is required with map loads that exceed the daily free quota.

The table below indicates which key/credential should be used with each Maps API product. (As mentioned above, the types of API key restrictions are: server, browser, Android, and iOS.)

API Standard API Users Premium Plan Users1
Google Maps Android API API key with Android restriction2 API key with Android restriction2
Google Places API for Android API key with Android restriction2 unavailable
Google Maps SDK for iOS API key with iOS restriction2 API key with iOS restriction2
Google Places API for iOS API key with iOS restriction2 unavailable
Google Maps JavaScript API API key with browser restriction2 API key with browser restriction2
or
Client ID
Google Static Maps API API key with browser restriction2 + optional3 Digital Signature API key with browser restriction2 + Digital Signature
or
Client ID + Digital Signature
Google Street View Image API API key with browser restriction2 + optional2 Digital Signature API key with browser restriction2 + Digital Signature
or
Client ID + Digital Signature
Google Maps Embed API API key with browser restriction2 unavailable
Google Maps Directions API API key with server restriction2 API key with server restriction2
or
Client ID + Digital Signature
Google Maps Distance Matrix API API key with server restriction2 API key with server restriction2
or
Client ID + Digital Signature
Google Maps Elevation API API key with server restriction2 API key with server restriction2
or
Client ID + Digital Signature
Google Maps Geocoding API API key with server restriction2 API key with server restriction2
or
Client ID + Digital Signature
Google Maps Geolocation API API key with server restriction2 API key with server restriction2
Google Maps Roads API API key with server restriction2 API key with server restriction2
Google Maps Time Zone API API key with server restriction2 API key with server restriction2
or
Client ID + Digital Signature
Google Places API Web Service API key with server restriction2 API key with server restriction2
1 Premium Plan refers to the new Google Maps APIs Premium Plan, which became available in January 2016. If you have a previous Maps APIs for Work or Maps API for Business license, your required credentials may be different than those listed above. Not sure which plan you purchased? Learn how to check your license type.
2 During development and prototyping, you may use a generic API key (a key with no restrictions) with any Maps or Places API. Before using an API key in a production environment, it’s recommended that you secure API keys with restrictions. Learn best practices for securely using API keys.
3 For Google Static Maps API and Google Street View Image API, if you are using the standard API and you enable billing, if you exceed the free daily quota of 25,000 map loads, then the digital signature is required for any billable map loads.
How do I switch my key restriction type from a browser restriction to a server restriction?

Important: If you are using any of the web service APIs with an API key that has referer restictions, your requests will fail with the error message: "API keys cannot have referer restrictions when used with this API." You should switch to using a server restriction.

Before you switch the API key restriction type from Browser to Server, ensure that all the APIs that use the API key are web service APIs. APIs of the same platform can use the same restricted key. If you need to cater for more than one platform, add a separate key with the required platform restriction. See how to add a new API key.

To switch a browser-restricted API key to a server-restricted key, do the following:

  1. Go to the Credentials page of the Google API Console.
  2. Select the project that contains the API key you want to edit.
  3. On the Credentials page, from the list of API keys, select the name of the API key to edit the details of the key.
  4. In the Restrictions section of the page, select “IP addresses (web servers, cron jobs, etc.)” and insert the appropriate server IP addresses, then click Save.
How do I get a new API key?

To create a new API key, do the following:

  1. Go to the Google API Console.
  2. Select or create a project.
  3. To generate a new API key, click the Create credentials button.
  4. Select API key from the list of credential types.
  5. The new key is generated and displayed in a pop-up window.
  6. To set any desired key restrictions (optional), select Restrict key, then follow instructions on the page to set the restriction.
  7. The API key is listed on the credentials page. Note that keys in the list are differentiated by restriction type. API keys with no restriction are generic and may be used with any API.

Specify the API key in your requests

To specify the API key in your request, include it as the value of a key parameter.

Examples:

For the Elevation API:

https://maps.googleapis.com/maps/api/elevation/json?locations=39.739,-104.984&key=YOUR_API_KEY

For the Geolocation API:

https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_API_KEY

How do I resolve the error: "This IP, site or mobile application is not authorized to use this API key."?

There are various scenarios which may cause this error:

  • You've enabled IP address (server) restrictions on your API key, and an unauthorized IP address is attempting a request.
  • You've enabled HTTP referrer (browser) restrictions on your API key, and an unauthorized referrer is attempting a request.
  • You've restricted usage to your Android apps by setting a package name and fingerprint, and an unauthorized Android app is attempting a request.
  • You've restricted requests from iOS apps by specifying bundle indentifiers and an unrecognized iOS app is attemting to send a request.
  • It used to be possible to get this error if you used any of the web service APIs with a browser-restricted API key. Requests to Web service APIs should be identified with a server-restricted API key. Switch your key restriction type from a browser-restricted key to a server-restricted key.

View and Edit your API Key Credentials

To view your API keys and manage any restrictions, do the following:

  1. Go to the Google API Console.
  2. Select the project that contains the API key you want to review.
  3. To view credential details, including any restrictions set for the key, from the list of API keys, click the name of the key.
  4. The full credentials of the selected API key are displayed, including any restrictions set up for the key. From here, the restrictions can be changed, deleted, or updated as needed.

How do I resolve the error: "API keys cannot have referer restrictions when used with this API."?

You are using any of the web service APIs with a browser-restricted API key. For security reasons, web service APIs need to use a server-restricted API key. Switch your key restriction type from a browser restriction to a server restriction.

How can I find out the changes introduced in each version of the Google Maps APIs?

We maintain a list of changes between Google Maps JavaScript API versions at:

https://developers.google.com/maps/documentation/javascript/releases

You can also check which version of the Google Maps APIs a particular bug was introduced and fixed in using the Google Maps APIs Issue Tracker at:

http://code.google.com/p/gmaps-api-issues/issues/list

How can I load the API into a page asynchronously after the page has loaded?

Just specify the callback parameter when loading the API. More information and sample code can be found in the Getting Started chapter of the Maps JavaScript API documentation.

How can I get the Google Maps APIs to display in a language other than English?

By default the API will attempt to load the most appropriate language based on the users location or browser settings. Some APIs allow you to explicitly set a language when you make a request. More information on how to set the language is available in the documentation for each API:

Supported Languages
Language Code Language Language Code Language
ar Arabic kn Kannada
bg Bulgarian ko Korean
bn Bengali lt Lithuanian
ca Catalan lv Latvian
cs Czech ml Malayalam
da Danish mr Marathi
de German nl Dutch
el Greek no Norwegian
en English pl Polish
en-AU English (Australian) pt Portuguese
en-GB English (Great Britain) pt-BR Portuguese (Brazil)
es Spanish pt-PT Portuguese (Portugal)
eu Basque ro Romanian
eu Basque ru Russian
fa Farsi sk Slovak
fi Finnish sl Slovenian
fil Filipino sr Serbian
fr French sv Swedish
gl Galician ta Tamil
gu Gujarati te Telugu
hi Hindi th Thai
hr Croatian tl Tagalog
hu Hungarian tr Turkish
id Indonesian uk Ukrainian
it Italian vi Vietnamese
iw Hebrew zh-CN Chinese (Simplified)
ja Japanese zh-TW Chinese (Traditional)

You can see what the map will look like in your language in this sample application.

Can the Google Maps APIs be accessed over SSL (HTTPS)?

The Google Maps JavaScript API, Google Static Maps API, and Google Maps APIs web services can be accessed over secure (HTTPS) connections by developers using either the free version of these APIs or Google Maps APIs Premium Plan. Please see the documentation for the API concerned for information on how to access the API over SSL.

Note that the Google Static Maps API does not support custom icon URLs that use HTTPS; the default icon will be displayed.

How do I report a bug or request a new feature in the Google Maps APIs?

If you experience behavior that you believe may be a bug, please begin by raising it in the relevant forum. This will allow other developers to validate the bug, and rule out any potential issues with your code.

If you wish to request a feature, please also first raise it in the relevant forum to confirm that a solution that meets your requirements is not already available.

Once you have confirmed that you have identified a new bug, or that your requirements can not be met by the existing functionality of the Google Maps APIs, please report your bug or feature request using the Google Maps APIs Issue Tracker.

Before adding a bug or feature request to the Issue Tracker please be sure to check that the bug or feature concerned has not already been added. If it has, you can star the issue to register your interest and be notified of updates.

What does this error mean?

If you encounter an error while loading the Google Maps JavaScript API, please see Error Messages to find explanations for the error codes.

I have a different question/problem. Who should I contact?

Google's Developer Relations team maintains a presence on Stack Overflow — a collaboratively-edited question and answer site for programmers. It's a great place to ask technical questions about developing and maintaining Google Maps applications. More information about asking questions on Stack Overflow is available on the Support page.

For best results when requesting help, please keep the following in mind:

  • Search the current discussions. Chances are someone else has experienced a similar issue and found a fix.
  • Submit a link to your site if possible. Only post code snippets if the code is not easily viewable online.
  • Provide all relevant information including browser versions, errors, and all other facts that may be useful in troubleshooting this problem.

Google Maps APIs Premium Plan customers may also contact Premium Plan Support.

Google Maps APIs Services

I need to convert addresses to latitude/longitude pairs. Can I do that with the Google Maps APIs?

Yes, this process is called "geocoding." The Google Maps JavaScript API includes a class for performing a geocoding service. The class is: google.maps.Geocoder.

Alternatively, Google also provides the Google Maps Geocoding API, which offers a REST interface that can respond in JSON and XML formats.

Please be aware of the usage limits that apply to geocoder requests, and note that use of the geocoder for any purpose other than obtaining locations that will be displayed using the Google Maps APIs is a violation of the Terms of Service. You may use the HTTP geocoder to geocode addresses outside of your Maps API application so that they may be cached and later displayed using one of the Google Maps APIs, but locations obtained using the Google Maps Geocoding API or Geocoding service may not be used by any other application, distributed by other means, or resold.

What countries is geocoding available in?

To see countries currently supported by the Google Maps APIs geocoders, please consult the Google Maps coverage data.

The accuracy of geocoded locations may vary per country, so you should consider using the returned location_type field to determine if a good enough match has been found for the purposes of your application. Please note that the availability of geocoding data depends on our contacts with data providers, so it is subject to change.

For geocoding in countries not currently supported by the Google Maps APIs, please browse this list of other geocoding services.

Why do the Google Maps APIs Geocoders provide different locations than Google Maps?

The API geocoder and Google Maps geocoder sometimes use different data sets (depending on the country). The API geocoder occasionally gets updated with new data, so you can expect to see results changing or improving over time.

How should I format my geocoder queries to maximise the number of successful requests?

The geocoder is designed to map street addresses to geographical coordinates. We therefore recommend that you format geocoder requests in accordance with the following guidelines to maximise the likelihood of a successful query:

  • Specify addresses in accordance with the format used by the national postal service of the country concerned.
  • Do not specify additional address elements such as business names, unit numbers, floor numbers, or suite numbers that are not included in the address as defined by the postal service of the country concerned.
  • Use the street number of a premise in preference to the building name where possible.
  • Use street number addressing in preference to specifying cross streets where possible.
  • Do not provide 'hints' such as nearby landmarks.

How should I format a U.S. address on a numbered highway for geocoding?

The Google Maps APIs geocoder requires that U.S. numbered highways be specified in addresses as follows:

  • County Roads: "Co Road NNN" where NNN is the road number. eg. "Co Road 82"
  • State Highways: "State NNN" where State is the full name of the state and NNN is the highway number. eg. "California 82"
  • U.S. Highways: "U.S. NNN" where NNN is the highway number. eg. "U.S. 101"
  • U.S. Interstates: "Interstate NNN" where NNN is the interstate number. eg. "Interstate 280"

When should I use an API geocoder class and when should I use the HTTP Geocoding Service?

See the document: Geocoding Strategies, which details the pros and cons of different geocoding strategies.

How do I provide driving directions with the Google Maps APIs?

The Google Maps JavaScript API allows you to provide driving directions via the google.maps.DirectionsService class. This class provides you with step-by-step access to basic and multi-point driving directions. The DirectionsRenderer class can automatically create the overlays and directions panel for you. Additional examples are provided in the documentation.

You can also easily link to Google Maps for driving directions. We suggest you use the following format for driving directions on Google Maps:

http://maps.google.com/maps?saddr={start_address}&daddr={destination_address}

In which countries are driving directions available?

To see countries currently supported by Driving Directions in the Maps APIs, consult the Google Maps coverage data. Please note that the availability of driving directions data depends on our contacts with data providers, and is subject to change.

In which countries are transit directions available?

The Google Maps Directions Service supports all of the transit providers listed in the Transit Coverage List, except for those in Japan.

What features of KML & GeoRSS are supported in the Google Maps JavaScript API?

The KmlLayer class in the Javascript API enables developers to overlay KML/KMZ and GeoRSS files on top of the map. Documentation and examples can be found here.

What are the limits on the size and complexity of KML that can be displayed using the KmlLayer class of the Google Maps JavaScript API?

The size and complexity limits on the display of KML using the KmlLayer class are documented here.

What is the maximum number of markers or path vertices supported by the Google Static Maps API?

There is no limit to the number of markers or path vertices supported by the Google Static Maps API. When using custom icons, up to five unique icons can be specified per request, but each can be used multiple times within the map.

Note that Google Static Maps API URLs can contain a maximum of approximately 2,000 characters which constrains the number of markers and path vertices that can be specified based on the number of decimal places used when specifying each latitude/longitude pair. For information on how the number of decimal places used relates to the accuracy on the Earth see the Wikipedia article on Decimal Degrees.

Why can't I access Google Maps APIs from China?

The Google Maps APIs are served within China from the domain maps.google.cn. This domain does not support https. When making requests to the Google Maps APIs from China, please replace https://maps.googleapis.com with http://maps.google.cn.

For example:

https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA

would become:

http://maps.google.cn/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA

The Google Maps JavaScript API can be loaded with the following bootstrap:

<script src="http://maps.google.cn/maps/api/js?key=YOUR_API_KEY"
type="text/javascript">
</script>

Google Maps SDK for iOS

I'm getting crashes when debugging with an iOS 8.x device. What should I do?

If you experience issues when debugging with devices running iOS 8.x, follow these steps to disable GPU frame capture in the XCode scheme you are running:

  1. In XCode, choose Product, Scheme, Manage Schemes.
  2. Select a scheme and choose Edit....

  3. Set the GPU Frame Capture option to Disabled. Note that this option may not be present for all devices.

Send feedback about...

Google Maps APIs
Google Maps APIs