Locality Types

Understanding location types and how to filter results in Localities APIs.

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 Localities Autocomplete and Localities 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 centers
  • town - Smaller urban areas
  • village - Small rural communities
  • hamlet - Very small settlements
  • borough - Administrative subdivisions of cities
  • suburb - Residential districts within or near cities
  • quarter - Named districts within cities
  • neighbourhood - 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 POIs
  • types=business - All business POIs
  • types=transit.station.airport - Airports only
  • types=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

Shell
        curl "https://api.woosmap.com/localities/autocomplete/?input=paris&types=locality&key=YOUR_KEY"

    

Multiple Types

Combine types with pipe (|):

Shell
        curl "https://api.woosmap.com/localities/autocomplete/?input=london&types=locality|postal_code&key=YOUR_KEY"

    

Exclude Subtypes

Remove unwanted locality subtypes:

Shell
        curl "https://api.woosmap.com/localities/autocomplete/?input=downtown&types=locality&excluded_types=neighbourhood&key=YOUR_KEY"

    

Default Types by Endpoint

Endpoint Default Types
Autocomplete locality|postal_code
Geocoding locality|postal_code|address
Details All types (based on public_id)
Nearby point_of_interest (use types parameter to filter by category)

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 Localities Autocomplete and Localities Nearby endpoints for POI filtering.

  • airporttransit.station.airport
  • train_stationtransit.station.rail
  • metro_stationtransit.station
  • shoppingbusiness.shop
  • museumtourism.museum
  • tourist_attractiontourism.attraction
  • amusement_parktourism.attraction.amusement_park
  • art_gallerytourism.attraction
  • zootourism.attraction.zoo
  • marina → unsupported
Was this helpful?