Address Autocomplete API
Suggest addresses, streets, cities and places while someone types. Each suggestion carries its own coordinates and precision, so when the user picks one you already have everything you need. No session tokens, no separate details call, no per-session pricing.
Example
$ curl -H "X-API-Key: YOUR_KEY" "https://api.mygeocode.com/v1/autocomplete?q=Downing+Street&country=gb&limit=3"Responses are tuned for typing: they come back in a few tens of milliseconds and tolerate missing letters and swapped words. Send proximity=lat,lon to rank nearby places first, which matters a lot for street names that exist in many towns.
Debounce keystrokes to about 150 ms. A typical address takes 4 to 6 requests to pick.
{
"status": "ok",
"query": "Downing Street",
"suggestions": [
{
"text": "Downing Street, Sutton in Ashfield NG17, United Kingdom",
"lat": 53.130158,
"lon": -1.255838,
"type": "street",
"precision": "street",
"place_id": "3Lltbd2XB51zrKAqGvlsuI3aqHeKE1o"
},
{
"text": "Downing Street, Newport NP19, United Kingdom",
"lat": 51.580617,
"lon": -2.962322,
"type": "street",
"precision": "street",
"place_id": "y1bayWVddEmnt-Yxv5rrftBMYcWlU2U"
},
{
"text": "Downing Street, Farnham GU9, United Kingdom",
"lat": 51.213693,
"lon": -0.799268,
"type": "street",
"precision": "street",
"place_id": "x5MIQlCnssim2YPGUxQtqGK3ZlZIvc8"
}
]
}What you get back
| Field | Meaning |
|---|---|
text | The suggestion as it should be shown, one line. |
lat, lon | Coordinates of the suggestion. Present on every suggestion. |
type | address, street, postcode, city, region, country or poi. |
precision | Same values as geocoding. |
place_id | A stable identifier. Pass it to /v1/forward?place_id=... if you want the full components and bounds for the chosen suggestion. |
Where it is used
Checkout address forms
One field instead of six. The chosen suggestion's place_id fetches the components to fill the rest of the form.
Search boxes on maps
Pass the map centre as proximity so "High Street" means the one on screen.
Replacing Places Autocomplete
The Google Maps JavaScript drop-in provides google.maps.places.Autocomplete backed by this endpoint, without session pricing.
Price and limits
Each call is one request. There is no per-session pricing and no separate charge for picking a suggestion. Every account has 2,500 free requests a day, shared by all of its keys; past that, €0.0001 each from prepaid credit, or nothing on an Unlimited key (€50 a month). Pricing.