Place & Address Typeahead Autocomplete
GET/v1/places/autocomplete5 Credits / request($0.0005 / request ($0.20–$0.50 / 1K calls))
Real-time typeahead predictions for businesses, street addresses, cities, and landmarks with optional coordinate and country biasing.
Parameters
qstringrequiredPartial text input from the user (e.g., '1600 Amphitheatre' or 'Felix Roast').
Example:
1600 AmphitheatrecountrystringISO 3166-1 alpha-2 country code restriction (e.g., 'US').
Example:
USlatnumberOptional latitude for proximity biasing.
Example:
37.422lngnumberOptional longitude for proximity biasing.
Example:
-122.084
Example Request (cURL / Python / JavaScript)
curl "https://api.googlemapsapi.io/v1/places/autocomplete?q=1600+Amphitheatre" \
-H "x-api-key: gm_live_your_api_key"Live Response Preview
{
"request_id": "req_gm_33817a4bc110",
"status": "ok",
"data": [
{
"place_id": "ChIJtYuu0V25j4ARwu5e4wwRYgE",
"description": "1600 Amphitheatre Parkway, Mountain View, CA, USA",
"main_text": "1600 Amphitheatre Parkway",
"secondary_text": "Mountain View, CA, USA",
"types": [
"street_address",
"geocode"
],
"coordinates": {
"latitude": 37.4220656,
"longitude": -122.0840897
}
}
],
"meta": {
"credits_used": 5,
"credits_remaining": 1919,
"count": 1,
"has_more": false,
"next_cursor": null,
"cache_hit": false
}
}Response Fields
Ordered list of typeahead place and address predictions.
| Field | Type | Sample / Notes |
|---|---|---|
request_id | string | Unique request trace identifier. |
status | string | Response status ('ok'). |
data | array of AutocompletePrediction | Typeahead predictions. |
place_id | string | Google Maps Place ID. |
description | string | Full prediction label. |
main_text | string | Primary place or street name. |
secondary_text | string | City, state, and country context. |
types | array of string | Place classification tags. |
coordinates | CoordinatesObject | |
latitude | number | WGS84 latitude coordinate. |
longitude | number | WGS84 longitude coordinate. |
meta | ResponseMeta | |
credits_used | integer | Credits deducted for this API call. |
credits_remaining | integer | Remaining credit balance on the account. |
count | integer | Number of records returned in data. |
has_more | boolean | Whether additional pages are available. |
next_cursor | string | Opaque cursor token for fetching the next page. |
cache_hit | boolean | Whether the response was served from the sub-50ms local index. |
Status Codes
- 200
- Ordered list of typeahead place and address predictions.