Raz
Raz

Reputation: 1994

Google Places API - does the limit of requests a day is for unique requests or one can request multiple times in a row?

I have noticed that in order to make places autocomplete with Google Places API I should not over the limit that they exceeded which is 1,000 request a day for the free edition.

I want to know - when someone auto complete the city: "London", does Google count this as ONE request since this is on the same session, or does Google count this as 21 requests since each keyup re-requesting the data?

Thanks.

Upvotes: 1

Views: 2395

Answers (1)

xomena
xomena

Reputation: 32178

Currently Google counts each keystroke when you type an address in autocomplete widget.

This behavior will be changed after June 11, 2018 once they migrated to the Google Maps Platform that was announced on May 2, 2018:

https://mapsplatform.googleblog.com/2018/05/introducing-google-maps-platform.html

After June 11, 2018 the built-in autocomplete widget will create sessions and manage session tokens automatically, so autocomplete won't be charged on per keystroke basis. In case if you create your own autocomplete and call autocomplete service of Google you should create your session tokens in order to avoid per keystroke billing.

You can find explanation about sessions and tokens in user guide documentation of Google Maps Platform:

https://cloud.google.com/maps-platform/user-guide/pricing-changes/

Have a look at Place Autocomplete section of this page.

Other questions about sessions and tokens in place autocomplete that might be useful for you:

How to implement Google Places Autocomplete per session from SDKs?

How long do the new Places API session tokens last?

I hope this helps!

Upvotes: 1

Related Questions