GET /google-maps/search_nearby

Search Nearby

Search for businesses and places near a specific location on Google Maps.

Google Maps Scraper API

Search for businesses and places near a specific location. Provide a search query along with optional geographic coordinates to find relevant businesses in the area. Returns a list of businesses with key details like name, address, rating, and contact information.

HTTP Request

1
GET /google-maps/search_nearby

Parameters

ParameterTypeRequiredDefaultDescription
querystringYesSearch query (e.g., “coffee shops”, “dentist”, “Italian restaurant”)
languagestringNo"en"Language code for the response
countrystringNo"us"Country code for regional bias
latnumberNoLatitude of the center point for the search
lngnumberNoLongitude of the center point for the search

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
  "status": "OK",
  "data": [
    {
      "business_id": "0x89c259a9aeb1c6b5:0x35b1cfbc380cb867",
      "name": "Joe's Coffee",
      "address": "514 Columbus Ave, New York, NY 10024",
      "phone": "+1 212-555-0100",
      "rating": 4.5,
      "reviews_count": 342,
      "category": "Coffee shop",
      "latitude": 40.7851,
      "longitude": -73.9754,
      "website": "https://joescoffee.com",
      "hours": "Mon-Fri 7AM-7PM, Sat-Sun 8AM-6PM"
    }
  ]
}

Response Fields

FieldTypeDescription
statusstringRequest status
dataarrayList of matching businesses
data[].business_idstringUnique business identifier (use with detail endpoints)
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
data[].hoursstringOperating hours

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/search_nearby"

querystring = {
    "query": "coffee shops",
    "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 business in data["data"]:
    print(f"{business['name']} - {business['rating']} stars ({business['reviews_count']} reviews)")
    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
const url = "https://google-maps-extractor2.p.rapidapi.com/google-maps/search_nearby";

const params = new URLSearchParams({
  query: "coffee shops",
  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((business) => {
  console.log(`${business.name} - ${business.rating} stars (${business.reviews_count} reviews)`);
  console.log(`  ${business.address}\n`);
});
1
2
3
4
5
6
7
8
curl -G "https://google-maps-extractor2.p.rapidapi.com/google-maps/search_nearby" \
  --data-urlencode "query=coffee shops" \
  --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"
  • Query Locate — Geocode a location name to coordinates for use with this endpoint
  • Business Details — Get full details for a business found in search results
  • Locate and Search — Combine geocoding and search in a single call
Start building today

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

Get Your API Key on RapidAPI