GET /autocomplete

Autocomplete

Get place autocomplete suggestions from Google Maps for a given query.

Google Maps Scraper API

Retrieve place autocomplete suggestions from Google Maps for a given query. Returns suggestions for places, addresses, and businesses as users type, useful for building location search interfaces. Supports geographic biasing and filtering by place type.

HTTP Request

1
GET /autocomplete

Parameters

ParameterTypeRequiredDefaultDescription
querystringYesThe search query to get suggestions for
languagestringNo"en"Language code for the response
countrystringNo"us"Country code for regional bias
latnumberNoLatitude to bias results toward a specific area
lngnumberNoLongitude to bias results toward a specific area
filter_typesstringNoComma-separated list of place types to filter results (e.g., restaurant,cafe)

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
  "status": true,
  "request_id": "2bdfc33d-cb14-a9d6-8189-e32223ad",
  "data": [
    {
      "title": "reading terminal market",
      "description": null,
      "google_id": null,
      "place_id": null,
      "latitude": null,
      "longitude": null,
      "country": null,
      "type": "other"
    },
    {
      "title": "reading terminal market parking",
      "description": null,
      "google_id": null,
      "place_id": null,
      "latitude": null,
      "longitude": null,
      "country": null,
      "type": "other"
    }
  ],
  "request_params": {
    "query": "Reading Terminal Mark"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique identifier for this request
dataarrayList of autocomplete suggestions
data[].titlestringThe suggested search text, lowercased
data[].descriptionstring/nullSecondary line, when the suggestion resolves to a place
data[].google_idstring/nullBusiness identifier, when the suggestion resolves to a place
data[].place_idstring/nullGoogle place ID, when available
data[].latitudenumber/nullLatitude, when the suggestion resolves to a place
data[].longitudenumber/nullLongitude, when the suggestion resolves to a place
data[].countrystring/nullCountry code, when available
data[].typestringSuggestion type, e.g. "other" or "general search"

Notes

  • This endpoint returns search-term suggestions, the same list Google shows as you type. It is not a place lookup.
  • In practice most suggestions come back with google_id, place_id, and the coordinate fields set to null, because the suggestion is a query string rather than a specific business. To turn a name into a business identifier, use Locate and Search and read google_id from the first result.

Code Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import requests

url = "https://google-maps-extractor2.p.rapidapi.com/autocomplete"

querystring = {
    "query": "Joe's",
    "language": "en",
    "country": "us",
    "lat": "40.7128",
    "lng": "-74.0060"
}

headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "google-maps-extractor2.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=querystring)
data = response.json()

for suggestion in data["data"]:
    print(f"{suggestion['name']} ({suggestion['type']})")
    print(f"  {suggestion['address']}\n")
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const url = "https://google-maps-extractor2.p.rapidapi.com/autocomplete";

const params = new URLSearchParams({
  query: "Joe's",
  language: "en",
  country: "us",
  lat: "40.7128",
  lng: "-74.0060",
});

const response = await fetch(`${url}?${params}`, {
  method: "GET",
  headers: {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "google-maps-extractor2.p.rapidapi.com",
  },
});

const data = await response.json();

data.data.forEach((suggestion) => {
  console.log(`${suggestion.name} (${suggestion.type})`);
  console.log(`  ${suggestion.address}\n`);
});
1
2
3
4
5
6
7
8
curl -G "https://google-maps-extractor2.p.rapidapi.com/autocomplete" \
  --data-urlencode "query=Joe's" \
  --data-urlencode "language=en" \
  --data-urlencode "country=us" \
  --data-urlencode "lat=40.7128" \
  --data-urlencode "lng=-74.0060" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: google-maps-extractor2.p.rapidapi.com"
Start building today

Get your API key and make your first request in under a minute.

Get Your API Key on RapidAPI