Google Maps API
Scrape Google Maps listings and get structured local search results, location details, and map result metadata.
Scrape Google Maps results and receive structured local search data.
To enable this engine, set engine=google_maps.
Interacting with the Google Maps scraper is straightforward. Compared with the Google Search API, the Google Maps API exposes fewer options, but the data it returns is still rich and accurate.

Scrape Google Maps Results
Google Maps API Integration Examples
We will use the following URL as an example request:
https://serpapi.webscrapingapi.com/v2?engine=google_maps&api_key=<YOUR_API_KEY>&q=pizzaReady to Use Google Maps Scraping Scripts
curl --request GET \
--url "https://serpapi.webscrapingapi.com/v2?engine=google_maps&api_key=<YOUR_API_KEY>&q=pizza"const response = await fetch("https://serpapi.webscrapingapi.com/v2?engine=google_maps&api_key=<YOUR_API_KEY>&q=pizza", {
method: "GET"
});
const data = await response.text();
console.log(data);import http.client
connection = http.client.HTTPSConnection("serpapi.webscrapingapi.com")
connection.request("GET", "/v2?engine=google_maps&api_key=<YOUR_API_KEY>&q=pizza")
response = connection.getresponse()
data = response.read()
print(data.decode("utf-8"))<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://serpapi.webscrapingapi.com/v2?engine=google_maps&api_key=<YOUR_API_KEY>&q=pizza",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$error = curl_error($curl);
curl_close($curl);
echo $error ? "cURL Error #: " . $error : $response;package main
import (
"fmt"
"io"
"log"
"net/http"
)
func main() {
requestURL := "https://serpapi.webscrapingapi.com/v2?engine=google_maps&api_key=<YOUR_API_KEY>&q=pizza"
response, err := http.Get(requestURL)
if err != nil {
log.Fatal(err)
}
defer response.Body.Close()
body, err := io.ReadAll(response.Body)
if err != nil {
log.Fatal(err)
}
fmt.Println(string(body))
}HttpResponse<String> response = Unirest
.get("https://serpapi.webscrapingapi.com/v2?engine=google_maps&api_key=<YOUR_API_KEY>&q=pizza")
.asString();
System.out.println(response.getBody());var client = new RestClient("https://serpapi.webscrapingapi.com/v2?engine=google_maps&api_key=<YOUR_API_KEY>&q=pizza");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);require "uri"
require "net/http"
require "openssl"
url = URI("https://serpapi.webscrapingapi.com/v2?engine=google_maps&api_key=<YOUR_API_KEY>&q=pizza")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyGoogle Maps Specific Parameters
Query Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | ✅ | The keywords that you are searching for on Google Maps. |
Request Customization Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
place_type | string | ❌ | Accommodation type filter. Supported values are hotels and vacation_rentals. |
data | string | ❌ | Required only if q is not provided. Construct it as !4m5!3m4!1s + data_id + !8m2!3d + latitude + !4d + longitude. |
Device and Geolocation Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
device | string | ❌ | Device type used for the search. Supported values include desktop, mobile, and tablet. |
hl | string | ❌ | Interface language for the Google Maps search. |
gl | string | ❌ | Country code used to localize the Google Maps search. |
ll | string | ❌ | GPS coordinates where the query should be applied. Format it as @latitude,longitude,zoom. |
Pagination
Pagination is currently not supported for the Google Maps API. Parameters such as start, offset, and num do not change the returned Google Maps result set.
Response example
{
"general": {
"search_engine": "google_maps",
"page_title": "pizza - Google Maps",
"language": "en",
"location": "United States"
},
"organic": [
{
"title": "Joe's Pizza",
"rating": 4.5,
"reviews": 1204,
"address": "7 Carmine St, New York, NY",
"rank": 1
}
]
}