GET /google-maps/locate_and_search

Locate and Search

Geocode a location and search for nearby businesses in a single API call.

Google Maps Scraper API

Combine geocoding and business search into a single API call. This endpoint first resolves your query to geographic coordinates, then searches for businesses in that area. Supports pagination with limit and offset parameters for retrieving large result sets.

HTTP Request

1
GET /google-maps/locate_and_search

Parameters

ParameterTypeRequiredDefaultDescription
querystringYesSearch query including location context (e.g., “restaurants in Chicago”)
languagestringNo"en"Language code for the response
countrystringNo"us"Country code for regional bias
zoomintegerNo7Map zoom level (3-21). Higher values narrow the search area
limitintegerNo20Maximum number of results to return
offsetintegerNo0Number of results to skip for pagination

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "status": "OK",
  "data": [
    {
      "business_id": "0x880e2ca25bfc4081:0x2862c4e61b8e4491",
      "name": "Girl & The Goat",
      "address": "809 W Randolph St, Chicago, IL 60607",
      "phone": "+1 312-492-6262",
      "rating": 4.6,
      "reviews_count": 4521,
      "category": "Restaurant",
      "latitude": 41.8844,
      "longitude": -87.6478,
      "website": "https://girlandthegoat.com"
    }
  ],
  "location": {
    "latitude": 41.8781136,
    "longitude": -87.6297982
  }
}

Response Fields

FieldTypeDescription
statusstringRequest status
dataarrayList of matching businesses
data[].business_idstringUnique business identifier
data[].namestringBusiness name
data[].addressstringFull address
data[].phonestringPhone number
data[].ratingnumberAverage rating (1-5)
data[].reviews_countintegerTotal number of reviews
data[].categorystringPrimary business category
data[].latitudenumberBusiness latitude
data[].longitudenumberBusiness longitude
data[].websitestringBusiness website URL
locationobjectResolved coordinates for the query location
location.latitudenumberLatitude of the resolved location
location.longitudenumberLongitude of the resolved location

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
24
25
26
import requests

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

querystring = {
    "query": "restaurants in Chicago",
    "language": "en",
    "country": "us",
    "zoom": "7",
    "limit": "20",
    "offset": "0"
}

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()

print(f"Location: {data['location']['latitude']}, {data['location']['longitude']}\n")

for business in data["data"]:
    print(f"{business['name']} - {business['rating']} stars")
    print(f"  {business['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
25
26
27
const url = "https://google-maps-extractor2.p.rapidapi.com/google-maps/locate_and_search";

const params = new URLSearchParams({
  query: "restaurants in Chicago",
  language: "en",
  country: "us",
  zoom: "7",
  limit: "20",
  offset: "0",
});

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();

console.log(`Location: ${data.location.latitude}, ${data.location.longitude}\n`);

data.data.forEach((business) => {
  console.log(`${business.name} - ${business.rating} stars`);
  console.log(`  ${business.address}\n`);
});
1
2
3
4
5
6
7
8
9
curl -G "https://google-maps-extractor2.p.rapidapi.com/google-maps/locate_and_search" \
  --data-urlencode "query=restaurants in Chicago" \
  --data-urlencode "language=en" \
  --data-urlencode "country=us" \
  --data-urlencode "zoom=7" \
  --data-urlencode "limit=20" \
  --data-urlencode "offset=0" \
  -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