Google Maps Autocomplete API Documentation
The Google Maps Autocomplete API returns the suggestions the Google Maps search box shows while a query is being typed,
biased to the map area set with ll. A query suggestion is a search phrase that can be passed
as the q of the Google Maps API. A place suggestion
is a business, landmark, address, street, area or transit station, or coordinates or a plus code typed in
q. All but streets, coordinates and plus codes carry a data_id and place_id, which the
Google Maps Place API,
Google Maps Reviews API and
Google Maps Photos API accept.
API Parameters
Search Query
-
- Name
-
q - Required
- Required
- Description
-
The partial text typed into the Google Maps search box, for example
pizzor350 5th ave. Up to 100 characters and 30 words.
-
- Name
-
cp - Required
- Optional
- Description
-
Position of the text cursor within
q, counted in characters from the start, up to the length ofq. Google Maps completes the word at the cursor, and the rest ofqnarrows the suggestions. By default, and at0, the cursor is at the end ofq.
Geographic Location
-
- Name
-
ll - Required
- Optional
- Description
-
The map area the suggestions are biased to, as Google Maps shows it in its URL. It can be formatted in two ways:
@latitude,longitude,zoom(e.g.@40.7484,-73.9857,14z), with a zoom level, where Google Maps zooms from3z(the whole world) to21z(the closest view)@latitude,longitude,meters(e.g.@40.7484,-73.9857,5886m), with the height of the visible map in meters, where Google Maps shows about50mat the closest view and about15000000mfor the whole world
ll, the map centres on a major city of theglcountry, New York for the defaultus.
Localization
-
- Name
-
hl - Required
- Optional
- Description
-
The default parameter
endefines the interface language of the search. Check the full list of supported Googlehllanguages.
-
- Name
-
gl - Required
- Optional
- Description
-
The default parameter
usdefines the country of the search. Check the full list of supported Googleglcountries.
Engine
-
- Name
-
engine - Required
- Required
- Description
-
Parameter defines an engine that will be used to retrieve real-time data. It must be set to
google_maps_autocomplete.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
The
api_keyauthenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).
Zero Data Retention
-
- Name
-
zero_retention - Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set this parameter to
trueto disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.
API Examples
Suggestions
Each suggestion carries its type (query or place) and its full text as
value. A query suggestion can carry a thumbnail, such as a chain's logo.
A place suggestion also carries its title and, when Google Maps shows them, its
subtitle (the location line shown after the name, often shorter than the full address),
gps_coordinates and country_code. All but streets, coordinates and plus codes carry a
data_id and place_id.
https://www.searchapi.io/api/v1/search?engine=google_maps_autocomplete&ll=%4040.7484%2C-73.9857%2C14z&q=pizz
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "google_maps_autocomplete",
"q": "pizz",
"ll": "@40.7484,-73.9857,14z"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_Y80BKjxagxvjcKk35nMQeWO6",
"status": "Success",
"created_at": "2026-10-29T21:24:07Z",
"request_time_taken": 1.56,
"parsing_time_taken": 0.0,
"total_time_taken": 1.56,
"request_url": "https://www.google.com/maps/search/pizz/@40.7484,-73.9857,14z?hl=en&gl=us",
"html_url": "https://www.searchapi.io/api/v1/searches/search_Y80BKjxagxvjcKk35nMQeWO6.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_Y80BKjxagxvjcKk35nMQeWO6"
},
"search_parameters": {
"engine": "google_maps_autocomplete",
"q": "pizz",
"ll": "@40.7484,-73.9857,14z",
"hl": "en",
"gl": "us"
},
"suggestions": [
{
"value": "pizza hut",
"type": "query"
},
{
"value": "PizzArte, West 55th Street, New York, NY",
"type": "place",
"title": "PizzArte",
"subtitle": "West 55th Street, New York, NY",
"gps_coordinates": {
"latitude": 40.7629224,
"longitude": -73.9774359
},
"data_id": "0x89c25983c7d5790d:0x94de8163d799fbf",
"place_id": "ChIJDXnVx4NZwokRv595PRboTQk",
"country_code": "US"
},
{
"value": "pizza near me",
"type": "query"
},
{
"value": "Pizza Pizza",
"type": "query",
"thumbnail": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcSuFbGmMYLtmGa_l6_9k7aS-F7YdH5DVgoMZUaUGhA9qXtxxYrN"
},
...
]
}