GET /google-maps/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 /google-maps/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
{
  "status": "OK",
  "data": [
    {
      "name": "Joe's Coffee - Columbus Ave",
      "address": "514 Columbus Ave, New York, NY 10024",
      "business_id": "0x89c259a9aeb1c6b5:0x35b1cfbc380cb867",
      "type": "Coffee shop"
    },
    {
      "name": "Joe's Pizza",
      "address": "7 Carmine St, New York, NY 10014",
      "business_id": "0x89c259eb5a4e1c31:0x6a4e2a2b3c4d5e6f",
      "type": "Pizza restaurant"
    },
    {
      "name": "Joe's Shanghai",
      "address": "9 Pell St, New York, NY 10013",
      "business_id": "0x89c259a1b2c3d4e5:0x1a2b3c4d5e6f7890",
      "type": "Chinese restaurant"
    }
  ]
}

Response Fields

FieldTypeDescription
statusstringRequest status
dataarrayList of autocomplete suggestions
data[].namestringPlace or business name
data[].addressstringFull address
data[].business_idstringUnique business identifier (use with detail endpoints)
data[].typestringPlace type or category

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/google-maps/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/google-maps/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/google-maps/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