Autocomplete

GET
https://api.woosmap.com/localities/autocomplete

Returns worldwide place suggestions for a text query, matching on whole words or substrings. Designed for as-you-type input: addresses, cities, postal codes, suburbs, and more.

Ratelimit: 50/1s

Authorization

key
apiKey query

Public key of the project usually starts with woos-

private_key
apiKey query

Private key with or without write permission.

X-Api-Key
apiKey header

Private key with or without write permission.

Header Parameters

Query Parameters

input
string required

Text to search for. Predictions are matched on this string and ordered by relevance.

Only the first 20 tokens (within 150 characters) are processed.

Example: London
language
string Defaults to ""

Language code (ISO 639-1, two letters) for the response.

Resolution order:

  1. language (this parameter)
  2. The request's Accept-Language header
  3. locale default
  4. English (when neither is recognised)

Only part of the address components are translated; not required for postal-code requests.

Example: en
data
string Defaults to standard

Selects the postal-code dataset. advanced extends the default Western-Europe coverage to worldwide postal codes.

Requires a dedicated license option subject to specific billing — please contact us.

Available options: advanced, standard
Example: advanced

Restricts results to one or more countries. Pass each country as a country:<ISO-3166-1 Alpha-2 or Alpha-3> filter. Use | to provide multiple values.

Example: country:gb
types
string Defaults to locality|postal_code

Restricts results to one or more types. Use | to provide multiple values.

Show 3 variants Hide 3 variants
LocalitiesTypes string
Show 17 enum values Hide 17 enum values
country
admin_level
admin_level_1
admin_level_2
admin_level_3
postal_code
address
route
locality
city
town
village
hamlet
borough
suburb
quarter
neighbourhood
LocalitiesTypesPoi string
Show 80 enum values Hide 80 enum values
point_of_interest
beach
government
park
park.national
place_of_worship
police
post_office
sports
sports.golf
sports.winter
transit
transit.station
transit.station.airport
transit.station.rail
transit.station.rail.subway
transit.station.rail.train
transit.station.rail.light_rail
transit.station.rail.monorail
transit.station.rail.funicular
transit.station.rail.tram
business
business.car_repair
business.car_rental
business.cinema
business.conference_centre
business.exhibition_centre
business.theatre
business.nightclub
business.finance
business.finance.bank
business.fuel
business.parking
business.mall
business.food_and_drinks
business.food_and_drinks.bar
business.food_and_drinks.biergarten
business.food_and_drinks.cafe
business.food_and_drinks.fast_food
business.food_and_drinks.pub
business.food_and_drinks.restaurant
business.food_and_drinks.food_court
business.shop
business.shop.mall
business.shop.bakery
business.shop.butcher
business.shop.library
business.shop.grocery
business.shop.sports
business.shop.toys
business.shop.clothes
business.shop.furniture
business.shop.electronics
business.shop.doityourself
business.shop.craft
education
education.school
education.kindergarten
education.university
education.college
education.library
hospitality
hospitality.hotel
hospitality.hostel
hospitality.guest_house
hospitality.bed_and_breakfast
hospitality.motel
medical
medical.hospital
medical.pharmacy
medical.clinic
tourism
tourism.art_gallery
tourism.attraction
tourism.attraction.amusement_park
tourism.attraction.zoo
tourism.attraction.aquarium
tourism.monument
tourism.monument.castle
tourism.museum
LocalitiesTypesPoiAlias string
Show 9 enum values Hide 9 enum values
airport
train_station
metro_station
shopping
museum
zoo
amusement_park
art_gallery
tourist_attraction
Example: address

Restricts results by excluding one or more types. Use | to provide multiple values.

Show 3 variants Hide 3 variants
LocalitiesTypes string
Show 17 enum values Hide 17 enum values
country
admin_level
admin_level_1
admin_level_2
admin_level_3
postal_code
address
route
locality
city
town
village
hamlet
borough
suburb
quarter
neighbourhood
LocalitiesTypesPoi string
Show 80 enum values Hide 80 enum values
point_of_interest
beach
government
park
park.national
place_of_worship
police
post_office
sports
sports.golf
sports.winter
transit
transit.station
transit.station.airport
transit.station.rail
transit.station.rail.subway
transit.station.rail.train
transit.station.rail.light_rail
transit.station.rail.monorail
transit.station.rail.funicular
transit.station.rail.tram
business
business.car_repair
business.car_rental
business.cinema
business.conference_centre
business.exhibition_centre
business.theatre
business.nightclub
business.finance
business.finance.bank
business.fuel
business.parking
business.mall
business.food_and_drinks
business.food_and_drinks.bar
business.food_and_drinks.biergarten
business.food_and_drinks.cafe
business.food_and_drinks.fast_food
business.food_and_drinks.pub
business.food_and_drinks.restaurant
business.food_and_drinks.food_court
business.shop
business.shop.mall
business.shop.bakery
business.shop.butcher
business.shop.library
business.shop.grocery
business.shop.sports
business.shop.toys
business.shop.clothes
business.shop.furniture
business.shop.electronics
business.shop.doityourself
business.shop.craft
education
education.school
education.kindergarten
education.university
education.college
education.library
hospitality
hospitality.hotel
hospitality.hostel
hospitality.guest_house
hospitality.bed_and_breakfast
hospitality.motel
medical
medical.hospital
medical.pharmacy
medical.clinic
tourism
tourism.art_gallery
tourism.attraction
tourism.attraction.amusement_park
tourism.attraction.zoo
tourism.attraction.aquarium
tourism.monument
tourism.monument.castle
tourism.museum
LocalitiesTypesPoiAlias string
Show 9 enum values Hide 9 enum values
airport
train_station
metro_station
shopping
museum
zoo
amusement_park
art_gallery
tourist_attraction
Example: suburb|quarter|neighbourhood

Overrides the suggestion description format per type. Available fields depend on the type. Use | to provide multiple values.

Example: locality:"{name} - {administrative_area_level_0}"|postal_code:"{name} ({administrative_area_level_1})"
extended
string

Allows a refined search over locality names sharing the same leading postal_code. Suggestion descriptions switch to name (postal code), admin_1, admin_0. Avoid combining with the postal_code type to prevent duplicate locations.

Supported countries: France, Monaco, Italy, Spain, Belgium, Switzerland, Luxembourg.

Example: postal_code
location
string

Biases results toward a point, specified as latitude,longitude. Pair with radius.

Example: 52.479699,-1.902691
radius
integer Defaults to 100000

Radius in meters around location to prioritise results. Results outside this radius may still appear.

Example: 200000

Response

200 application/json

Successful Response

localities
object[] required
Show 7 propertiesHide 7 properties
localities. public_id
string required

Unique identifier for this place. Pass it to the /details endpoint to retrieve the full record.

localities. type
string required deprecated

This field might be removed in the future, please use the types field which is more exhaustive.

localities. types
string[] required

An array containing the types of the result

localities. description
string required

Concatenation of name, admin_1, admin_0 to be used as suggestion in drop-down list if needed. The description can vary depending on the type requested.

localities. matched_substrings
object | null

Contains a set of substrings in the description field that match elements in the input. It can be used to highlight those substrings. Each substring is identified by an offset and a length.

Show 1 propertiesHide 1 properties
localities.matched_substrings. description
object[] required

Substrings of description that match the input, each given as an offset and length.

Show 2 propertiesHide 2 properties
localities.matched_substrings.description. offset
integer required
localities.matched_substrings.description. length
integer required
localities. has_addresses
boolean | null

Indicates whether a postal code has addresses you can drill into. Returned for postal codes in some territories (e.g. United Kingdom, Ireland). When true, call /details with this suggestion's public_id will list the addresses; each address carries its own public_id for a further /details lookup.

Contains a set of related elements to the locality suggestion.

Errors

401

Unable to locate credentials.

application/json
detail
string required
402

Out of free quota.

application/json
detail
string required
403

Credentials found, but not matching.

application/json
detail
string required
422

Validation Error

application/json
detail
object[]
Show 5 propertiesHide 5 properties
detail. loc
any[] required
detail. msg
string required
detail. type
string required
detail. input
any
detail. ctx
object
429

Rate limit reached

application/json
detail
string required
        curl -L 'https://api.woosmap.com/localities/autocomplete/?input=Lond&components=country%3Agb&no_deprecated_fields=true&key=YOUR_PUBLIC_API_KEY' \
-H 'Referer: http://localhost'

    
        const requestOptions = {
  method: "GET",
  redirect: "follow"
};

fetch("https://api.woosmap.com/localities/autocomplete/?input=Lond&components=country%3Agb&no_deprecated_fields=true&key=YOUR_PUBLIC_API_KEY", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

    
        import requests

url = "https://api.woosmap.com/localities/autocomplete/?input=Lond&components=country%3Agb&no_deprecated_fields=true&key=YOUR_PUBLIC_API_KEY"

payload = {}
headers = {
    'Referer': 'http://localhost'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)


    
        
{
"localities": [
{
"public_id": "Ch6qA8cLmvyvEEoFy6nYeFcEdNU=",
"type": "locality",
"types": [
"locality",
"city"
],
"description": "London, City of London, United Kingdom",
"matched_substrings": {
"description": [
{
"offset": 0,
"length": 4
}
]
}
},
{
"public_id": "m/T2C4YI2LgszkKXrELBC+9dfC8=",
"type": "locality",
"types": [
"locality",
"city"
],
"description": "Derry/Londonderry, Derry City and Strabane, United Kingdom",
"matched_substrings": {
"description": [
{
"offset": 6,
"length": 4
}
]
}
},
{
"public_id": "J6eISGMjjvQwPkao8rsByB3aVwM=",
"type": "locality",
"types": [
"locality",
"village"
],
"description": "London Colney, Hertfordshire, United Kingdom",
"matched_substrings": {
"description": [
{
"offset": 0,
"length": 4
}
]
}
},
{
"public_id": "52MnrbHVWH21CLWH8VY/YWKhqeM=",
"type": "locality",
"types": [
"locality",
"village"
],
"description": "London Apprentice, Cornwall, United Kingdom",
"matched_substrings": {
"description": [
{
"offset": 0,
"length": 4
}
]
}
},
{
"public_id": "S/5AkUmMBhX35qVI2jR38+dALwk=",
"type": "locality",
"types": [
"locality",
"city"
],
"description": "City of London, United Kingdom",
"matched_substrings": {
"description": [
{
"offset": 8,
"length": 4
}
]
}
}
]
}
Was this helpful?