Google Map API billing to Autocomplete without Places Details – Per Session - google-maps

I need to autocomplete a Country and City fields for my responsive website.
https://developers.google.com/maps/billing/gmp-billing#ac-no-details-session
A bit confused with billing options. Wish to understand if I'm charged for that.
https://scrnli.com/RN0ZXJfh6T4OAw
I see 0.00 USD Price per SESSION in the grid, but 0.017 USD per session in the last line.
I'd be much obliged if you could clarify what are the free option limits.

The autocomplete response does not include the country or city. This requires a second call to place details using the same session token.
AutoComplete using sessiontoken -> place_id
Get details using place_id, sessiontoken, and specifying only the fields you need.
Please note there is a $200/monthly credit of maps platform usage. https://developers.google.com/maps/billing-credits#monthly

Related

Google Places charging stations fields retrieval problem

I'm developing an app for calculating the routes of electric cars through the recharge points obtained on the google map(charging stations). I need to get the type of recharge connection via API (CHAdeMO, CCS, Type2 etc).
Here's an example query with fields I need.
Are these fields included in the Google Places API?
I can't find any documentation about it.
"Charging station" is not a supported place type so you can't filter charging stations by recharge type either through the Places API.
However, there are feature requests for this in Google's Issue Tracker which I recommend starring to increase visibility and subscribe to future notifications:
https://issuetracker.google.com/issues/111378624
https://issuetracker.google.com/issues/63055661
Hope this helps!

Places API Billing - am I charged for only including the places API js?

First of all sorry if this is the wrong place to ask this - waiting for the company's credentials to open a google support ticket.
I can't find a clear answer for this - does the Places API charge us for just including <script src="https://maps.googleapis.com/maps/api/js?key=..."></script>, even if the user does not type on the widget?
In my billing report, along with API request billings, I see these lines:
"Autocomplete without Places Details - Per Session"
"Autocomplete (included with Places Details) - Per Session"
You will not be billed if you include libraries=places in
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places&callback=initMap"
async defer></script>
You will also not be billed for the Autocomplete Widget if it did not get any interactions from your user (e.g. Typing places). You will only be billed for
Autocomplete without Places Details - Per Session
If you type in the autocomplete widget but did not select any suggestion. And for
Autocomplete (included with Places Details) - Per Session
You will be billed for this if you type in autocomplete widget and select a suggestion. Note that if you this SKU is billed in your account, the Autocomplete request will be free and you will only be billed for the Place Details request.

Select Google place detail fields

I'm using the Google Places API to get details about certain places.
I would like to be able to limit the number of fields returned by the detail of a place. For example, get the Google Places API to return only the name, phone number and location of a place.
I read this article from the documentation but, it does not talk about it:
https://developers.google.com/places/web-service/details?hl=es-419
Any ideas ?
The ability to define which fields should be available in the response of Places API web service will become effective today, June 11 2018 or within next days.
I can see that you are checking Spanish version of documentation. Usually localized translations of Google Maps documentation are outdated. I would suggest always checking only English version. However, as I can see Google didn't update English version yet. I would expect an updated documentation within a couple of days.
In the meantime you can find explanations regarding fields in the user guide related to the transition to Google Maps Platform.
https://cloud.google.com/maps-platform/user-guide/product-changes/#frequently-asked-questions
According to the user guide,
Places Details requests will be updated to return only the fields that you specify. Currently when you make a Places Details request, the API returns all of the available data associated with the specified place. With this change, the response is limited to only those fields specified using the fields parameter.
The fields correspond to Places Details results, and are divided into three billing categories: Basic, Contact, and Atmosphere. The cost for each request varies depending on which fields are selected;
The Basic category does not result in any additional charge and includes the following fields:
place_id, name, type, address_components, formatted_address, url, utc_offset, permanently_closed, geometry.location, geometry.viewport, photo.photo_reference, icon, types, adr_address, scope, vicinity
The Contact category results in an additional charge and includes the following fields:
opening_hours.weekday_text, opening_hours.open_now, opening_hours.period, website, formatted_phone_number, international_phone_number
The Atmosphere category results in an additional charge and includes the following fields:
price_level, rating, reviews
Based on this documentation you should create the following request
https://maps.googleapis.com/maps/api/place/details/json?placeid=YOUR_PLACE_ID&fields=name,formatted_phone_number,geometry.location&key=YOUR_API_KEY
I've just tried this request, but it looks like Google didn't switch on fields filter yet. I'm getting all fields in the response. I believe it just matter of days to see this functionality in action.
I hope this helps!

Does Google/Bing/HERE Maps Autosuggestion Make Request for Every Keystroke?

I've noticed that Map services mention how different types of requests count towards an application's quota, but didn't see how autocomplete requests compare.
I'm trying to calculate the number of transactions/requests that will be made if an application utilizes an autocomplete feature for address searches. What I wanted to know is that when a user enters an address for geocoding, every time a new list of suggestions is returned (i.e. for every keystroke) is it counted as a request -- i.e. does it count as multiple requests instead of a single request?
In Bing Maps, the way it works is that a transaction isn't created until the user has selected a suggestion. Individual keystrokes are not counted. At the end of the day its the suggestion the user selects that matters. Additionally, Bing Maps also creates a session when that first transaction is created. What this does is if the user performs another search and selects another suggestion, the second transaction will be marked as non-billable as it is considered part of that session. This assumes that the autosuggest module wasn't reloaded some how (i.e. page refresh). So with Bing Maps, if a user needs 3 key strokes or 7, there is no cost until they actually select a suggestion. This should make calculating the required transactions for your application much easier. More often than not developers will require the user to use the autosuggest feature only once as part of a user experience, usually on a single page. So you basically would only need to know the number of page views for the page in that part of the user experience. Also worth noting, if you use the autosuggest module in Bing Maps with the interactive map, the autosuggest module will not generate any billable transactions as it is grouped into the map user session. For example, if you have a page that loads a map and also provides an autosuggest box, the user can type as much as they want in the autosuggest box and select as many suggestions as they want. They can also pan/zoom, calculate directions and use any feature of Bing Maps that you expose in your app. This will generate a total of 1 billable transaction for when the interactive map was loaded and all other transactions will be grouped into the map session and marked as non-billable.
Looking through HERE Maps documentation I can't find any mention of an autosuggest or autocomplete feature.

Regarding Places Library for Google Maps API Quota limits

Quick question, just to clarify the wording and meaning (because it's changed a couple of times for Map loading...)
There are the two following statements in the Places API FAQs:
The Google Places API has the following query limits:
Users with an API key are allowed 1 000 requests per 24 hour period.
Users who have verified their identity through the APIs console are
allowed 100 000 requests per 24 hour period. A credit card is required
for verification, by enabling billing in the console. We ask for your
credit card purely to validate your identity. Your card will not be
charged for use of the Places API. While the lower limit is sufficient
for development and testing, we recommend enabling the higher limit
before launching your application. It is possible to request an
additional quota. If granted, the additional quota is free of charge.
If, at some stage in the future, an option becomes available to pay
for an additional quota, that quota will be over and above the
existing free quota, and you will need to sign up for it explicitly.
Note that some services may have a multiplier:
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. The Radar Search Service is subject to a 5-times
multiplier. That is, each Radar Search request that you make will
count as 5 requests against your quota. If you've purchased the Google
Places API as part of your Maps API for Business contract, the
multiplier may be different. Please refer to the Google Maps API for
Business documentation for details.
This implies that use of the Google Places API is restricted to 100,000 queries per day, or 10,000 if you're doing a Text Search.
However, on the Uplift page, it says the following:
If you are developing a web based application that only needs to
search for places, and is not submitting new places or Place Bumps,
you should use the Places library of the Maps API rather than using
the Places API web service. The Places library assigns a quota to each
end user rather than to each key. This means that your available quota
increases with your user base rather than being capped at a fixed
amount.
I am using the Places API in the following way:
https://maps.googleapis.com/maps/api/js?key=XXX&libraries=places
...
service = new google.maps.places.PlacesService(map);
service.textSearch(request, callback);
And also for some details searching and photo searching.
Therefore my question is; Given my usage of the Places API, am I subject to the 100,000 queries limit on my app, or am I essentially uncapped at an app level, as my quota is per end-user? (i.e. per unique IP? if I had 10,000 users I have an effective quota for my entire user base of 100,000*10,000?)
EDIT:
For clarity: if I throw my API key into https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=XXXX, it will increment my Places quota count on the Google API console, however if I run queries through my JS app, I see no quota use change. I want to make sure that i'm not suddenly going to be hit with a massive quota result.
Use of the JavaScript API services, like those provided by the Places library, have quota assigned to each end-user. It's a very similar setup as objects like the google.maps.Geocoder, which has been discussed in a bit more detail in this Geocoding Strategies article.
You may apply for an uplift to the quota so that the restriction is taken away and you have unlimited access:
https://docs.google.com/forms/d/18pkOdu0uofeI8tbQoReDVfkbOIAscLvjiKc9ZP06hEM/viewform
This form is applicable to Android, IOS and Web.