1 | initial version |
Yes, Google Places Auto complete can be restricted to a single state by providing the state's abbreviation or name in the componentRestrictions parameter in the Places Autocomplete API request. For example, to restrict the autocomplete results to California, the request would include:
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=[QUERY]&types=address&componentRestrictions=state:CA&key=[API_KEY]
This will only return results that are in California and exclude results from other states.