GET /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 /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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  "status": true,
  "request_id": "7acc52d9-e389-95de-dadc-3a45ed0c",
  "data": [
    {
      "google_id": "0x89c6c62958fb0109:0xcd8fd007dc1d6b01",
      "google_mid": "/g/1td1ск8x",
      "place_id": "ChIJCQH7WCnGxokRAWsd3AfQj80",
      "cid": "14812286431621114625",
      "name": "Reading Terminal Market",
      "status": "Open",
      "address": "1136 Arch St, Philadelphia, PA 19107",
      "full_address": "1136 Arch St, Philadelphia, PA 19107, United States",
      "detailed_address": {
        "street": "1136 Arch St",
        "city": "Philadelphia",
        "state": "PA",
        "zip_code": "19107",
        "country": "United States"
      },
      "main_category": "Market",
      "categories": ["Market", "Farmers' market"],
      "latitude": 39.9533,
      "longitude": -75.1590,
      "time_zone": "America/New_York",
      "rating": 4.7,
      "reviews_count": 46154,
      "phone": "+1 215-922-2317",
      "full_phone": "+1 215-922-2317",
      "website_url": "https://readingterminalmarket.org/",
      "website_domain": "readingterminalmarket.org",
      "price_range": null,
      "working_hours": { "Monday": ["8 AM-6 PM"] },
      "featured_photo": "https://lh3.googleusercontent.com/...",
      "can_claim": false
    }
  ],
  "request_params": {
    "query": "coffee",
    "lat": "39.9526",
    "lng": "-75.1652"
  }
}

Response Fields

Each item carries the same shape as Locate and Search .

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique identifier for this request
dataarrayList of matching businesses
data[].google_idstringBusiness identifier in hex format. Pass this as business_id to the detail endpoints
data[].google_midstringGoogle knowledge-graph machine ID
data[].place_idstringGoogle place ID
data[].cidstringNumeric customer ID used in Maps URLs
data[].namestringBusiness name
data[].statusstringOperating status, e.g. "Open"
data[].addressstringShort address
data[].full_addressstringFull address including country
data[].detailed_addressobjectAddress split into street, district, city, state, zip_code, country
data[].main_categorystringPrimary category
data[].categoriesarrayAll categories
data[].latitudenumberBusiness latitude
data[].longitudenumberBusiness longitude
data[].time_zonestringIANA time zone
data[].ratingnumberAverage rating (1-5)
data[].reviews_countintegerTotal number of reviews
data[].phonestring/nullPhone number
data[].full_phonestring/nullPhone number in international format
data[].website_urlstring/nullWebsite URL. null when the listing has none
data[].website_domainstring/nullWebsite domain only
data[].price_rangestring/nullPrice range, when Google shows one
data[].working_hoursobjectOpening hours keyed by weekday
data[].featured_photostring/nullMain photo URL
data[].can_claimbooleanWhether the listing is unclaimed

Hotel listings additionally carry hotel_about, hotel_descriptions, and hotel_stars. Listings that take orders or bookings carry order_online_url, reservation_url, and reservation_domain.

Notes

  • The coordinate parameters are lat and lng. Passing latitude and longitude returns an empty data array rather than an error.
  • limit is not a parameter on this endpoint, so passing it has no effect: a request with limit=2 still returns 20 results, which is the internal default. Slice client-side if you need fewer, or use Locate and Search , which does accept limit (up to 999) and offset. This 20 applies only here — it is not a platform-wide cap.
  • To search by place name instead of coordinates, use Locate and Search , which geocodes and searches in one call.

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