Menu

Google launched new Maps, Routes and Places functionality on June 11, 2018 and changed the way certain APIs and features were billed. People paid the “old good normal” amount for those services up until July 16, 2018 and after this date the new pricing model went into effect and new SKUs began to appear on people’s bills (which was a bit of a shock as the costs were dramatically higher than normal!)

To avoid paying for data that you don’t need, Google recommends to call “Autocomplete.setFields()” to specify only the place data that you will use.

If you do not specify at least one field with a request, or if you omit the fields parameter from a request, ALL possible fields will be returned, and you will be billed accordingly. This applies only to Place Details requests.

Please see below for further details:

  • Code example to set fields;
  • Places Details result without Autocomplete (and without setting “fields”) – all data is returned and this means Google is charging you as much as it can!;
  • Places Details result with Autocomplete (and with setting “fields”) – only the fields data that we set is returned! For this case; I only use Basic category fields and Basic category is the cheapest category, for categories carry on reading please;

 

Fields

Use the fields parameter to specify a comma-separated list of place data types to return. For example: fields=address_component,opening_hours,geometry. Use a forward slash when specifying compound values. For example: opening_hours/weekday_text.

Fields correspond to Place Details results, and are divided into three billing categories: Basic, Contact, and Atmosphere. Basic fields are billed at base rate, and incur no additional charges. Contact and Atmosphere fields are billed at a higher rate. See the pricing sheet for more information. Attributions (html_attributions) are always returned with every call, regardless of whether it has been requested.

Basic

The Basic category includes the following fields:
address_component, adr_address, alt_id, formatted_address, geometry, icon, id, name, 
permanently_closed, photo, place_id, plus_code, scope, type, url, utc_offset, vicinity

Contact

The Contact category includes the following fields:
formatted_phone_number, international_phone_number, opening_hours, website

Atmosphere

The Atmosphere category includes the following fields: price_level, rating, review

 

Nurhak Kaya, Software and Web Developer @ Felinesoft