Autocomplete for assets
GET
https://api.woosmap.com/stores/autocomplete
Autocomplete on localizedNames with highlighted results on asset name. Use the field localized in your query parameter to search for localized names.
Authorization
Response
Assets Successfully Replaced
predictions
any
curl -L 'https://api.woosmap.com/stores/autocomplete/?language=en&query=localized%3Astreet&limit=3&key=YOUR_PUBLIC_API_KEY' \
-H 'Referer: http://localhost'
const requestOptions = {
method: "GET",
redirect: "follow"
};
fetch("https://api.woosmap.com/stores/autocomplete/?language=en&query=localized%3Astreet&limit=3&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/stores/autocomplete/?language=en&query=localized%3Astreet&limit=3&key=YOUR_PUBLIC_API_KEY"
payload = {}
headers = {
'Referer': 'http://localhost'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
{
"predictions": [
{
"store_id": "2670",
"name": "Sun Street",
"types": [
"Coffee shop"
],
"matched_substrings": [
{
"offset": 4,
"length": 6
}
],
"highlighted": "Sun <b>Street</b>"
},
{
"store_id": "16069",
"name": "7th Street",
"types": [
"Coffee shop"
],
"matched_substrings": [
{
"offset": 4,
"length": 6
}
],
"highlighted": "7th <b>Street</b>"
},
{
"store_id": "1013873",
"name": "The Street",
"types": [
"Coffee shop"
],
"matched_substrings": [
{
"offset": 4,
"length": 6
}
],
"highlighted": "The <b>Street</b>"
}
]
}
{
"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"
}