To restrict autocomplete elements to specific types, please use OSM class/ type to restrict, entered with the tag parameter.
Example: For a city, OSM class is "place" & OSM type is "city". To restrict by city, we have to use tag=place:city
Example: For all types of a OSM class, OSM class is "place" & OSM type is everything under place.
To restrict the results to all elements under a particular class, we have to use tag=place:
You can also use 'countrycodes' parameter if you are looking only to geocode within a particular country.
How can I restrict elements of specific types in autocomplete? Print
Modified on: Tue, 24 Mar, 2020 at 7:28 PM
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.