-1

I just trying to get and autocomplete suggestions by the python package google-map-services-python. Everything works fine, except when I add the types parameter on my statement:

gmaps.places_autocomplete('new', session_token=my_token, language='de', types='cities')

I've checked the documentation and they said that the types param is an String parameter... but seems that I'm doing something wrong... It only works when I remove the types param and I need to only get suggestions by cities.

gmaps.places_autocomplete('new', session_token=my_token, language='de')
geocodezip
  • 158,664
  • 13
  • 220
  • 245

1 Answers1

0

Ok, i just find the way to only filter results by cities, if anybody has the same problem as me, here is the answer.

gmaps.places_autocomplete('new', session_token=my_token,  types='(cities)')