Autocomplete for Localities
GET
https://api.woosmap.com/localities/autocomplete
Autocomplete on worldwide suggestions for a for text-based geographic searches. It can match on full words as well as substrings. You can therefore send queries as the user types, to provide on-the-fly addresses, city names, postal codes or suburb name suggestions.
Authorization
Query Parameters
input
string required
types
string Defaults to
locality|postal_code excluded_types
string
components
string
language
string
location
string
radius
integer
data
string
extended
string
custom_description
string
Response
Autocompletion Localities successfully retrieved
localities
object[]
Show 7 propertiesHide 7 properties
Show 1 propertiesHide 1 properties
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
}
]
}
}
]
}
{
"detail": "Incorrect authentication credentials. Please check or use a valid API Key"
}
{
"detail": "This Woosmap API is not enabled for this project."
}
{
"detail": "The rate limit for this endpoint has been exceeded"
}