The Autosuggest API delivers The Autosuggest API delivers smart, predictive search results based on partial user input. It enhances the search experience by suggesting relevant place names, POIs, or addresses based on popular usage patterns, real-time input, and geographic context.
🧭 The API can return relevant suggestions around a given latitude and longitude. Suggestions are provided within a 50km radius of the specified location.[Text Wrapping Break][Text Wrapping Break]🖱️ You can enable users to drop a marker on a map, automatically fetch the coordinates, and receive contextual suggestions within a 50km radius around that exact point.
Authorization: X-Authorization-Token
(Get your token HERE)/v4/autosuggest
https://apihub.latlong.ai/v4/autosuggest
Parameter | Type | Required | Description |
---|---|---|---|
Query | String | Yes | The partial string to generate suggestions from |
Lat | Float | No | Latitude to influence the results spatially (within 50km radius) |
Long | Float | No | Longitude to influence the results spatially (within 50km radius) |
category | String | No | Filter results by category (e.g., restaurant, hospital) |
Limit | Int | No | Maximum number of suggestions to return (default: 5, max: 20) |
Language | String | No | Preferred language for results |
curl --location ‘https://apihub.latlong.ai/v4/autosuggest.json?query=McDonalds&latitude=13.0827&longitude=80.2707'
{
"code": 1001,
"status": "success",
"data": [
{
"name": "McDonald's, Dr.Seetharaman Nagar,Velacherry Village, Ward 179, Chennai, Tamil Nadu, 600042",
"coordintes": {
"latitude": 12.972389,
"longitude": 80.219863
}
},
{
"name": "McDonald's, Ward 103, Chennai, Tamil Nadu",
"coordintes": {
"latitude": 13.083283,
"longitude": 80.240232
}
},
{
"name": "McDonald's, Dr Radhakrishnan Salai, Ward 125, Chennai, Tamil Nadu",
"coordintes": {
"latitude": 13.042947,
"longitude": 80.274127
}
},
{
"name": "McDonald's, Ward 106, Chennai, Tamil Nadu",
"coordintes": {
"latitude": 13.073869,
"longitude": 80.22143
}
},
{
"name": "McDonald's, Ward 101, Chennai, Tamil Nadu",
"coordintes": {
"latitude": 13.084916,
"longitude": 80.217224
}
},
{
"name": "McDonald's, Kemp Fort Mall, Konena Agrahara, Bangalore, Karnataka, 560017",
"coordintes": {
"latitude": 12.959029,
"longitude": 77.656673
}
},
{
"name": "McDonald's, ITPL Main Road, Dodda Nekkundi, Bangalore, Karnataka",
"coordintes": {
"latitude": 12.967059,
"longitude": 77.716762
}
},
{
"name": "McDonald's, Sunkenahalli, Bangalore, Karnataka",
"coordintes": {
"latitude": 12.947333,
"longitude": 77.568005
}
},
{
"name": "McDonald's, Hampi Nagar, Bangalore, Karnataka",
"coordintes": {
"latitude": 12.968683,
"longitude": 77.53691
}
},
{
"name": "McDonald's, HMT Ward, Bangalore, Karnataka",
"coordintes": {
"latitude": 13.033446,
"longitude": 77.531164
}
}
]
}
Fast and responsive type-ahead suggestions
Context-aware results using `lat`/`lon` (within 50km radius)
️ Interactive map marker support – pick a location on a map and get suggestions nearby
Category filtering to narrow down suggestions
Multi-language support for international apps
Status Code | Message | Description |
---|---|---|
400 | Missing required parameters | When query is not provided |
401 | Unauthorized | API key missing or invalid |
429 | Rate limit exceeded | Too many requests in a short time |
500 | Internal Server Error | Something went wrong on our side |
lat
and lon
for context-aware suggestionslimit
to keep the UI clean and fast