user1669296
user1669296

Reputation: 445

How do you exclude streets from Google Places API?

How do you exclude streets from coming up when using the Google Places API? I want only cities and states to show if a user types in a location in the input field

Upvotes: 1

Views: 886

Answers (1)

miguev
miguev

Reputation: 4875

I think you want to add types to your Place Autocomplete requests.

Concretely, types=(regions) will limit Autocomplete predictions to cities, states, and a few more. See Place Types in the API documentation for more details.

Upvotes: 1

Related Questions