8

I am using the new Place Autocomplete that is from the new static Google Places SDK client library (here). So it is really easy to use and I just got this tutorial and it is working as expected.

To add this in the project, I have to add following dependency in the Gradle file:

implementation ‘com.google.android.libraries.places:places:1.0.0’

I have been reading Google pricing/usage and billing, but I have not figured out the pricing of this new Autocomplete (library version). All I found was this, but to me it looks like it is for the web version, as I do not think the session needs to maintain this new client library version.

As I am not able to figure out pricing for the Places Auto complete (library version), is it free? Or if it is not free, what are billing criteria for this?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
A.s.ALI
  • 1,992
  • 3
  • 22
  • 54
  • See: https://developers.google.com/places/android-sdk/client-migration#session-tokens which should explain the session tokens usage in the new client library and relates to existing billing documentation. – Morrison Chang May 27 '19 at 05:34
  • @MorrisonChang thanks for your comment, but I do not see there is need to maintain any session for the autocomplete. the link you shared is for something else. My autocomplete is textual search – A.s.ALI May 27 '19 at 05:39
  • Regarding using the same session token: https://developers.google.com/maps/billing/understanding-cost-of-use#ac-no-details-session And if you are using Text Search: https://developers.google.com/maps/billing/understanding-cost-of-use#text-search It is my interpretation that Google is standardizing costs between web and mobile: https://developers.google.com/places/android-sdk/releases – Morrison Chang May 27 '19 at 06:07

2 Answers2

28

First of all, the new Google Place Autocomplete API is not free (after exceeding the US$200 monthly credit equivalent free usage).

Now coming to the pricing, Google has introduced three possible pricing criteria:

  1. Autocomplete without Places Details – Per Session
  2. Autocomplete (included with Places Details) – Per Session
  3. Autocomplete - Per Request

You might be wondering: What's the difference between session and request?

Session

The session begins when the user starts typing a query, and concludes when they select a place and a call to Place Details is made. If the user does not make a selection, the session will end after a short time out period.

Request If you don't go with a session-based approach, you'll get billed per search query.

For example, if you type "S", it will increase your request count, now you write one more character "Sa", and it will again increase your request count.

So, if you type the whole word "San Francisco", you'll get billed for 13 requests.

Benefits of using session

As mentioned in the above example, if you don't want to get charged per character that you write, you have an option to combine your search queries into a single session. That way you'll save some bucks to spend somewhere else.

So, the "San Francisco" whole string will be billed as one session request instead of multiple.

Please note that session price is always higher than per request price but it is decided in such a way that if you are heavily using the auto-complete in your project with lots of user-base, then ultimately, session-based pricing becomes cheaper than request-based pricing.

Usually, in my opinion, a session-based approach can be helpful only to those who are having heavy usage of autocomplete, otherwise, the request-based approach is fine.

To do the math, go to Google Pricing Table and scroll to Places.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Maulik Hirani
  • 1,673
  • 1
  • 12
  • 19
  • 2
    good details, but I donot see how to manage session while working on autocomplete. in android – A.s.ALI May 28 '19 at 05:14
4

It costs less than US$3 for 1000 requests, but as a user you have US$200 monthly credit equivalent free usage, so the API is free as long as you don't exceed this.

Perhaps this pricing table would be helpful.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
MarkWalczak
  • 1,532
  • 3
  • 16
  • 24
  • 1
    once that free credit goes away, a lot of amateur app devs will be [screwed once again](https://www.reddit.com/r/webdev/comments/8vrkm6/google_places_api_new_pricing_from_0_to_2180_per/). – lasec0203 Sep 03 '19 at 10:27
  • 200$ is so small. I just test code, it call ~ 3000 places request – Kien Vu May 15 '20 at 14:23
  • 12
    200$ is so small. I just test code, it call ~ 3000 places request – Kien Vu May 15 '20 at 14:24