Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use SKU:Basic with google places api?

Google states, that SKU:Basic with google places is free: https://developers.google.com/places/web-service/usage-and-billing#new-pricing-for-the-places-api

I'm using google maps javascript API and use autocomplete (with react).

How can I activate SKU:Basic? (Sorry the pricing model is a huge ????? for me)

like image 747
Fabian Lurz Avatar asked Jun 26 '18 15:06

Fabian Lurz


1 Answers

You shouldn't activate SKU:Basic Data anywhere it will be taken into account automatically according to the list of fields that you specify in your details request. The basic group of fields according to the documentation is the following

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

source: https://developers.google.com/places/web-service/details

Also you should understand that SKU:Basic Data refers only to the data part of details request. But you will always trigger SKU: Places Details. In other words when you try to get a details for a place getPlaceDetails() will trigger the following SKUs:

  • SKU: Places Details (17$ per 1000, always)
  • SKU: Basic Data (Free, if you request basic fields)
  • SKU: Contact Data (3$ per 1000, if you request contact fields)
  • SKU: Atmosphere Data (5$ per 1000, if you request atmosphere fields)

If you don't specify fields in request all SKUs are included which results in 25$. In case of autocomplete followed by place details request you will get

  • SKU: Autocomplete (included with Places Details) – Per Session (Free)
  • Details SKUs as described before

That means that price for place autocomplete widget varies from 17$ per 1000 requests to 25$ per 1000 requests depending on the list of fields that you specify in details requests.

I hope my answer clarifies your doubt.

If you have any price specific questions I would suggest reaching directly to Google support team via https://console.developers.google.com/google/maps-apis/support

like image 166
xomena Avatar answered Sep 21 '22 17:09

xomena