Autocomplete API

Get place suggestions as the user types. Returns matching places with their coordinates for fast, typo-tolerant search experiences.

Try in Playground →

Endpoint

GET/v4/autocomplete.json

Authentication

Include your token in the request header:

X-Authorization-Token: your_token

Parameters

NameTypeDescription
querystringPartial text to search for
latitudenumberBias results near this latitude
longitudenumberBias results near this longitude

Code Examples

curl "https://apihub.latlong.ai/v4/autocomplete.json?query=VALUE" \
  -H "X-Authorization-Token: YOUR_TOKEN"

Example Response

JSON
{
  "status": "success",
  "code": 1001,
  "data": [
    {
      "name": "Koramangala, Bangalore, Karnataka",
      "geoid": "abc123",
      "latitude": 12.9352,
      "longitude": 77.6245
    },
    {
      "name": "Koramangala 4th Block, Bangalore",
      "geoid": "def456",
      "latitude": 12.9340,
      "longitude": 77.6260
    }
  ]
}

Notes

  • Minimum 3 characters required for results.
  • Pass latitude/longitude to bias results toward a specific area.
  • Use the returned geoid with the Search API to get full details.