I am using new places Autocomplete that is from 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 project I have to add following dependency in 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 web version, as I do not think so the session need to maintain for this new client library version.
Question:
As I am not able to figure out pricing for the Places Auto complete (library version), let me ask - is it free? or if it is not free what are billing criteria for this?
First of all, the new Google Places AutoComplete API is not free. ( after exceeding $200 monthly credit Equivalent free usage)
Now coming to the pricing, Google has introduced 3 possible pricing criteria:
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.