I have been using Google Map API on my site for about a year. I use 3 Distance Matrix requests and 1 Direction API request on each map. There is only 1 map per page.
The requests/sec for the map is about 0.02. So the Distance Matrix requests are about 0.06 and the Direction API requests are about 0.02 accordingly. But for certain hours of the day, while the map requests remain at 0.02 requests/sec, the Distance Matrix requests and the Direction API request jump to extremely high level. For example, the Distance Matrix requests can be as high as 4-5 requests/sec (or 15,000 per hour!). These huge requests start 3-5 AM and end 5-8 PM central time. The page containing the map has a page view count of about 200/hour only.
This started to happen since March. Since March I have been charged by Google $1,900 for these requests. The billing support at Google said this is a technical issue. I have searched everywhere and still not sure where to get technical support from Google.
Standard plan users are not entitled to technical support. Only Premium plan customers can get a technical support from Google.
Do you use a restricted API key? The first step might be adding an IP address restriction (web services) or HTTP referrer restriction (Maps JavaScript API) to your API key to be sure that it is used only by your application.
If you believe that API key is compromised just replace it with another one and add restrictions to new key. Once deleted the old key you will see if some part of your application is broken or not.
Update
Google introduced Google Maps Platform that replaces Google Maps Premium and Standard plans. In Google Maps platform you can file support case with Google Maps support team from your cloud project.
Related
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).
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.
I may be missing something, but the google places API indicates free usage of 150,000 requests per day (provided you enable billing). https://developers.google.com/maps/pricing-and-plans/
However, every request i place appears to be counting as "10-requests" on certain places on their website. i.e. i was capped today after making 15,000 requests. Specifically, on the billing page, it appears that each request is counted as 10. On the API Manager overview page, each request appears to be counted as 10 on the bar graph of usage, however on the response code overview it is correct. [i.e it indicates i have made 15,000 2xx Success requests within past 24-hours --- which is the case--- (and a bunch of 4xx errors, resulting from me hitting the max limit in the table...) whereas the bar graph indicates usage of 150,000].
My question is, is this a mistake, or is it the case that each request using the places API Web Services does count as 10?
There is a documented 10x multiplier on place Text Search requests:
from that documentation:
The Google Places search services share the same usage limits. However, the Text Search service is subject to a 10-times multiplier. That is, each Text Search request that you make will count as 10 requests against your quota. If you've purchased the Google Places API as part of your Google Maps APIs Premium Plan contract, the multiplier may be different. Please refer to the Google Maps APIs Premium Plan documentation for details.
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
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.