Locality Types
Understanding location types and how to filter results in Localities APIs.
- Overview
- Filterable Types
- Response Fields and Types
- Using Types
- Default Types by API
- Related Documentation
- Deprecated POI Types
Overview
Location types are categories that identify the characteristics of a place. A location can have one or more types assigned to it.
Types are used in two ways:
- In responses: The
types
array indicates what kind of location was returned - In requests: The
types
parameter filters which kinds of locations to return
The types
parameter is available in Autocomplete
and Geocode APIs.
Filterable Types
The following main types can be used as values for the types
parameter
in Autocomplete and Geocode
requests:
Type | Description | Coverage |
---|---|---|
address |
Street addresses with building numbers | See Address Coverage |
locality |
Populated places (cities, towns, villages, hamlets, boroughs, suburbs, quarters, neighbourhoods) | Worldwide |
postal_code |
Zip codes and postal codes | See Postal Code Coverage |
admin_level |
Administrative areas (states, regions, departments, provinces, districts) | Worldwide |
country |
National boundaries and sovereign states | Worldwide |
point_of_interest |
Points of interest (landmarks, attractions, businesses) - Available in Autocomplete and Nearby APIs | Worldwide |
For the complete list of all type values and POI categories, see the API Reference.
Locality Subtypes
When you specify types=locality
, results include these subtypes:
city
- Major urban centerstown
- Smaller urban areasvillage
- Small rural communitieshamlet
- Very small settlementsborough
- Administrative subdivisions of citiessuburb
- Residential districts within or near citiesquarter
- Named districts within citiesneighbourhood
- Local neighborhoods
Use the excluded_types
parameter to remove unwanted subtypes.
Point of Interest Types
Points of interest (POIs) include landmarks, attractions, businesses, and other notable locations. POI categories are organized into hierarchical families that allow flexible searching in both Autocomplete and Nearby APIs:
point_of_interest
- Matches all points of interest- Parent categories like
business
,tourism
,transit.station
- Match all POIs in that family - Child categories like
business.shop
,tourism.museum
,transit.station.airport
- Match specific POI types
Use the types
parameter for POI category filtering. Combine with excluded_types
to exclude certain categories.
Examples:
types=point_of_interest
- All POIstypes=business
- All business POIstypes=transit.station.airport
- Airports onlytypes=point_of_interest&excluded_types=business
- All POIs except businesses
See the API Reference for the complete list of POI types.
Response Fields and Types
Deprecated Response Field
The type
field (singular) is deprecated and may be removed in the future. Use the types
field (plural) instead,
which provides a more complete list of types for each location.
Response-Only Types
The following types may appear in the types
array or address_components
of API responses but cannot be used in
the types
request parameter:
Type | Description | Where It Appears |
---|---|---|
route |
Named streets and roads | Address results, address components |
premise |
Building or location names | Address components |
division_level_0 through division_level_3 |
Administrative division levels | Address components |
state , county , district |
Administrative subdivisions | Address components |
Using Types
Single Type
curl "https://api.woosmap.com/localities/autocomplete/?input=paris&types=locality&key=YOUR_KEY"
Multiple Types
Combine types with pipe (|
):
curl "https://api.woosmap.com/localities/autocomplete/?input=london&types=locality|postal_code&key=YOUR_KEY"
Exclude Subtypes
Remove unwanted locality subtypes:
curl "https://api.woosmap.com/localities/autocomplete/?input=downtown&types=locality&excluded_types=neighbourhood&key=YOUR_KEY"
Default Types by API
API | Default Types |
---|---|
Autocomplete | locality|postal_code |
Geocode | locality|postal_code|address |
Details | All types (based on public_id ) |
Nearby | point_of_interest (use types parameter to filter by category) |
Related Documentation
Deprecated POI Types
The following location types are deprecated for use in the types
request parameter. While they may still appear in
API responses for backward compatibility, use point_of_interest
or specific POI type values in
the Autocomplete and Nearby APIs
for POI filtering.
airport
→transit.station.airport
train_station
→transit.station.rail
metro_station
→transit.station
shopping
→business.shop
museum
→tourism.museum
tourist_attraction
→tourism.attraction
amusement_park
→tourism.attraction.amusement_park
art_gallery
→tourism.attraction
zoo
→tourism.attraction.zoo
marina
→ unsupported