Google Maps JavaScript API v3 25,000 Usage Limits - google-maps

Does the 25,000 per day map load usage limit on the Google Maps JavaScript API v3 apply to the API key or the website using it?
Here is a scenario: A developer, who has an API key, creates multiple websites for multiple clients, each with its own domain name. These websites may be shared on a single server (same IP). The code that calls the Maps API runs on the client side (in the browser). Do these sites share the 25,000 limit or each of them get its own 25,000?
Here is the Google page on usage limits (it does not make this distinction):
https://developers.google.com/maps/documentation/javascript/usage
Edit: The Google Maps API Community Support page refers users to StackOverflow for questions regarding usage. I haven't gotten any answers here yet. Does anyone know how to contact Google and ask them this question? I couldn't find any way to contact them about this.

The usage quota is applied on the per project basis.
The limit of 25K daily map loads is shared between all API keys that belong to the same project. So, if you have only one API key in your project and use it on multiple domains, all these domains will share the 25K quota.
Regarding the last question, you can reach out to Google Maps API support team and ask questions only if you have a Premium plan license. Otherwise you are stick to community support.
https://developers.google.com/maps/premium/support#contact-support
Hope this solves your doubt.
Update
As of 2019 Google introduced a Google Maps Platform and deprecated Premium and Standard plans. In Google Maps Platform there is no daily quota by default, although you can set your own daily limit in your project for each API.
Also you can now file support cases with Google Maps support team from your cloud project interface.

In order to understand usage for map loading, as:
map = new google.maps.Map(document.getElementById('map'), {
zoom: 7,
center: { lat: 42.345, lng: 12.46 }
});
I searched on Google documentation and found this:
How are map loads applied against the usage limits for Google Maps APIs for Web? A single map load is charged when [..] A web page or application displays a map using the Google Maps JavaScript API.
So, in your case, if you use your API key to load different maps on multiple websites, it will result to a unique 25,000 limit of request per day

Related

Understanding Requests from Google Places API for Web w Place Autocomplete

We are considering using Google Places API for a new web application project and I believe we are vastly underestimating the number of requests we would use.
We would be using place search, Maps JavaScript API map load to grab Place IDs from Google as well as Place Autocomplete to help users find the defined location. So my questions are:
Would the Autocomplete be considered a request on every keystroke?
Would if also be a request when we select the suggestion (Places API)
and update to Map?
I have seen that with the premium Plan autocompletes use 0.1 Maps API Credit, while JavaScript API map load is 1 and Places API is 2 credits. Trying to understand how to count before the 150k limit and after
As mentioned in the comment of your question, Google is making some drastic changes to their collective maps API usage rates. Starting June 11th, the new pricing will go into effect.
Would the Autocomplete be considered a request on every keystroke?
As of now, places autocomplete is counted on every keystroke. Starting June 11th, you have the option to switch to session-based billing. They have different pricing rates which can be see in the pricing sheet link. Depending on your application, you'll want to use the option that minimizes API calls. I think if your use case is one time selecting of location by your users then you're better off with billing by keystroke.
Would if also be a request when we select the suggestion (Places API)
and update to Map?
Selecting a suggestion from Places API would not incur an API request (requesting the suggestions does), but updating a google map using the Map API would use an API request.
The 150k daily limit is going away in favor of the new billing rates, so I would suggest you look into that now. There are some free unlimited services still offered, like the Google Maps Embed API. Loading a map using the Embed API is not counted towards any billing (as of now).

Google Maps Static API is asking for API Key

When using the google maps static API service, all my requests are showing up as a 403 Forbidden. When taking a look at my request, I notice this error message: "The Google Maps API server rejected your request. This service requires an API key."
The code that is calling the service is below:
<img src="http://maps.googleapis.com/maps/api/staticmap?center=Albany,+NY&zoom=13&scale=false&size=600x300&maptype=roadmap&format=png&visual_refresh=true" alt="Google Map of Albany, NY">
I've used the static map service before and it worked fine and easily. But for some reason, all my requests show up as a 403 now? I've never had to use an API key in the past. If I do use an API key with this call, it works.
What is going on here?
The Google Static Maps API now requires a key (as of June 22, 2016), existing applications should be "grandfathered" with keyless access. See this blog post for more information (relevant text below):
As of June 22, 2016 we are making the following changes to the Google Maps APIs Standard Plan:
We no longer support keyless access (any request that doesn't include an API key). Future product updates are only available for requests made with an API key. API keys allow us to contact developers when required and help us identify misbehaving implementations.
We have implemented a simple 25,000 map loads per day free limit to new Google Maps JavaScript API, Static Maps API, and Street View Image API implementations. The confusing 90-consecutive-day grace period for these APIs is being retired on October 12, 2016. With this change, developers can predictably plan for growth while media sites and US nonprofits can request more quota at no charge via our dedicated support programs.
We have reduced the daily map load maximum limit you can purchase for Google Maps JavaScript API, Static Maps API, and Street View Image API from 1,000,000 to 100,000 requests per API.* We believe higher-volume developers are best served with a Premium Plan license, which includes technical support and a Service Level Agreement, and with this change we've also created consistency between Standard Plan quotas across our maps and web service APIs.
We now count Google Maps JavaScript API client-side requests towards the daily limit of the associated web service API.*
The new policies will apply immediately to all Maps API implementations created on or after June 22nd, 2016.
Existing applications have been grandfathered based on their current usage to ensure that they continue to function both now and in the future. We will also be proactively contacting all existing API key users who, based on usage growth patterns, may be impacted in the future. If you’re an existing user, please take the time to read our Policy Update for Standard Plan summary for details on how each of these changes might affect your implementation.

WindowsPhone app and GoogleMaps limits

My goal is to write a windows phone free app (with some ads) with milions of google maps requests per day. This request will come form thousands of independent users (free of any charge).
However, the problem is google maps API limits. For simple things, like getting maps or geocoding - no any API key is required. However if I search for places (e.g. Pizza in London or Cinema, Paris or Doctor AnyCityHere) - than 'places API' is accessed. It is limited for 100k requests per day per API KEY (not per user) so if my app will be succesfull it will stop working very soon each day.
According to https://developers.google.com/places/uplift - I can use "Places Library..." rather than "Places API web service" - in order not to use API key, and make limits counts for each user, not entire App. The problem is, that this alternative solution is a JavaScript library, and probably can't be used in WindowsPhone App, am I right?
So the question is: can anyone tell me how to give WindowsPhone users a reliable google maps solution, that makes places searach requests limit for single user, not for enitire app?
For now there is no point to write succesfull google maps client for WindowsPhone because getting success means you either stuck because API requests limit, or you have to pay google for this, am I right? or I am missing something?
You can use Nokia Maps which is based on the powerfull maps of Navteq
Maps and navigation for Windows Phone 8

Google Maps API Key - Get one for everyone of my users programmatically?

I saw that one has not to obtain a Google Maps API key if you want to use their maps api in general, only if you want to use their web services and statistics etc.
Now I have two questions regarding this:
If I have a public website which uses the Google Maps API to display a map with default options. How does Google count the API calls if I don't use an API key? (Maybe with the help of the domain which requests the map?)
If they do so and my site exceeds the 25k calls/day, is there a possiblity that my users can login with their Google account on my site and some backend logic will get them an API key from Google that I store e.g. in a database. So I could use the API keys of my users to bypass the API usage limits only for my site.
Assuming you are using the Javascript API v3:
This SO question partially answers your queries.
Have a look at the usage limits, it looks like that you cannot use more than one API key:
Can I use more than one API key to increase my available usage over
the documented limits?
Google reserves the right to withhold access to the Maps API from any site that attempts to use more than the permitted number of map
loads of the Maps API without permission, and fails to respond when
contacted by Google.
Though this may be debatable, to me it seems a bad idea using your user's API key. For sure you need to ask the permission, then you have to monitor their quotas and so on, a minefield...
TL;DR if you exceed constantly the daily quota you should purchase a larger quota.

How does Google Geocoding API usage limits apply to [Sales]force.com?

The following are the usage limits as specified by Google on their Developer Guide pages:
Google Maps JavaScript API v3 => For-profit web sites are permitted to generate up to 25,000 map loads per day
Google Geocoding API => subject to a query limit of 2,500 geolocation requests per day
Google Maps API for Business => may perform up to 100,000 requests per day
Am trying to evaluate using any one of the above for use with Visualforce on Salesforce.com (SFDC) platform [*]
I understand for a public website the requests are per IP. Now for SFDC, there could be many different Organizations on a particular server (say, NA1). So, two different companies using SFDC and Google Maps API could have an URL at https://na1.salesforce.com/something_here and their requests should be counted separately.
Will it be so? What will happen in case of each API?
[*]SFDC is a SaaS cloud for the purpose of our discussion. All users login through the same page but they could be logged into different "orgs"/"organizations" but their URLs might look similar
It's important to differentiate between the server-side and client-side limits here. The server-side geocoding api would have have the 2500 limit enforced across the shared Salesforce instance based on how many machines the requests come from (I assume NA1 isn't 1 huge server). Multiple organization using the free geocoding API would all share the same server-side geocoding limit. I've actually run into the same limits using Google's own App Engine platform, where a bunch of applications share the same outbound IP address.
For any sort of guaranteed performance you'll need to send the queries from your own server or go the Maps for Business route which lets you authenticate your queries to get those higher limits.
Client-side geocoding via the JavaScript API doesn't have these server-limits, so if users do any sort of action to trigger a geocode or two using the JS API is the best route.
You can already create your own "bucket" to track your 25K map loads per day by signing up for an API Key.
This question on SO addresses the geocoding API specifically being run from a visualforce page directly, Salesforce: Google maps query status 620 G_GEO_TOO_MANY_QUERIES and it does seem to mean that without a key the limits are shared. I would suspect that unless you plan on giving the app away that you are working on, you will pretty much be forced to pick up an upgraded API key. One thing you may want to look at to work around this is hosting the maps portion in another location, and iframing it into Salesforce.