Google Maps Photos API
Using Google Maps Photos API you can scrape Google Maps Photos result without worrying about proxy rotation and data parsing. Our API is fast and reliable. Each successful request will cost you 5 API
You have to send a GET request to https://api.scrapingdog.com/google_maps/photos
with the below-given parameters.
Google Maps API pricing is available here.
Parameters
Parameter | Description |
---|---|
api_key required | Your personal API key. Available on your dashboard Type: String |
data_id required | It is the Google Maps data ID. You can get this by entering the location name as the query in our Google Maps API.
Type: |
language | Language of the results. Possible Values - |
category_id | This parameter specifies the category's unique identifier, which can be obtained from the categories array using our Google Maps Photos API.
Type: |
next_page_token | The next_page_token is used to get the next page results.
Type: |
API Example
cURL "https://api.scrapingdog.com/google_maps/photos?api_key=APIKEY&data_id=0x88371272500ebf33:0x70a094fd98fb45c0"
import requests
api_key = "5eaa61a6e562fc52fe763tr516e4653"
url = "https://api.scrapingdog.com/google_maps/photos"
params = {
"api_key": api_key,
"data_id": "0x88371272500ebf33:0x70a094fd98fb45c0"
}
response = requests.get(url, params=params)
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
const axios = require('axios');
const api_key = '5eaa61a6e562fc52fe763tr516e4653';
const url = 'https://api.scrapingdog.com/google_maps/photos';
const params = {
api_key: api_key,
data_id: "0x88371272500ebf33:0x70a094fd98fb45c0"
};
axios
.get(url, { params: params })
.then(function (response) {
if (response.status === 200) {
const data = response.data;
console.log(data)
} else {
console.log('Request failed with status code: ' + response.status);
}
})
.catch(function (error) {
console.error('Error making the request: ' + error.message);
});
<?php
// Set the API key and request parameters
$api_key = '5eaa61a6e562fc52fe763tr516e4653';
$data_id = '0x88371272500ebf33:0x70a094fd98fb45c0';
// Set the API endpoint
$url = 'https://api.scrapingdog.com/google_maps/photos/?api_key=' . $api_key . '&data_id=' . $data_id;
// Initialize cURL session
$ch = curl_init($url);
// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Execute the cURL request
$response = curl_exec($ch);
// Check if the request was successful
if ($response === false) {
echo 'cURL error: ' . curl_error($ch);
} else {
// Process the response data as needed
echo $response;
}
// Close the cURL session
curl_close($ch);
require 'net/http'
require 'uri'
# Set the API key and request parameters
api_key = '5eaa61a6e562fc52fe763tr516e4653'
data_id = '0x88371272500ebf33:0x70a094fd98fb45c0'
# Construct the API endpoint URL
url = URI.parse("https://api.scrapingdog.com/google_maps/photos/?api_key=#{api_key}&data_id=#{data_id}")
# Create an HTTP GET request
request = Net::HTTP::Get.new(url)
# Create an HTTP client
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true # Enable SSL (https)
# Send the request and get the response
response = http.request(request)
# Check if the request was successful
if response.is_a?(Net::HTTPSuccess)
puts response.body # Process the response data as needed
else
puts "HTTP request failed with code: #{response.code}, message: #{response.message}"
end
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.IOException;
public class Main {
public static void main(String[] args) {
try {
// Set the API key and request parameters
String apiKey = "5eaa61a6e562fc52fe763tr516e4653";
String data_id = "0x88371272500ebf33:0x70a094fd98fb45c0";
// Construct the API endpoint URL
String apiUrl = "https://api.scrapingdog.com/google_maps/photos/?api_key=" + apiKey
+ "&data_id=" + data_id
// Create a URL object from the API URL string
URL url = new URL(apiUrl);
// Open a connection to the URL
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
// Set the request method to GET
connection.setRequestMethod("GET");
// Get the response code
int responseCode = connection.getResponseCode();
if (responseCode == 200) {
// Read the response from the connection
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = reader.readLine()) != null) {
response.append(inputLine);
}
reader.close();
// Process the response data as needed
System.out.println(response.toString());
} else {
System.out.println("HTTP request failed with response code: " + responseCode);
}
// Close the connection
connection.disconnect();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Response
{
"categories": [
{
"name": "All",
"id": "CgIgAQ=="
},
{
"name": "Exterior",
"id": "CgIYEw=="
},
{
"name": "Videos",
"id": "CgIgARICCAQ="
},
{
"name": "Inside",
"id": "CgIYEg=="
},
{
"name": "House",
"id": "CgwKCC9tLzAzam01MAE="
},
{
"name": "Roof shingle",
"id": "Cg0KCS9tLzA3cXkyZzAB"
},
{
"name": "By owner",
"id": "CgIgARICEAE="
}
],
"photos": [
"https://lh5.googleusercontent.com/p/AF1QipPuISB_emFHS4wHahX13S5TjUwxyuOTUts7Ic6c=w203-h114-k-no",
"https://lh5.googleusercontent.com/p/AF1QipMc0OhhDPbDh2u9N7rK0_2RVk5P-oBizKIbYSyL=w203-h360-k-no",
"https://lh5.googleusercontent.com/p/AF1QipPgFaZpWJz12I9UCwhMsobfPZ7JammS-OAoV_IT=w203-h152-k-no",
"https://lh5.googleusercontent.com/p/AF1QipM7DLtIAul4-Y2Kkwo-FUHJr-QNtJdd_EA81fXP=w203-h152-k-no",
"https://lh5.googleusercontent.com/p/AF1QipOTd0e7cNgJ2ToFq37V6vOM8SNRD4mzPXIHOsPV=w203-h152-k-no",
"https://lh5.googleusercontent.com/p/AF1QipNIPuRjkSZp2eCtIwVvJ3GnpxpXYW-dG3iMCgYS=w203-h146-k-no",
"https://lh5.googleusercontent.com/p/AF1QipM4sZu01cH-4MmAYOnP6c3AMcb_2Q5gvABqTzId=w203-h152-k-no",
"https://lh5.googleusercontent.com/p/AF1QipMJZX1h6BwkMjYxi9RCn4L9b0ke1ii2EC3xtb7h=w203-h360-k-no",
"https://lh5.googleusercontent.com/p/AF1QipNtUC6POTo_DzsvUHda9tz667xq-PE9oxwZl5kz=w203-h152-k-no",
"https://lh5.googleusercontent.com/p/AF1QipPOD0F0PD4dcoWuhQhGH-WMfYb4C-7lY2Z-q8aL=w203-h152-k-no",
"https://lh5.googleusercontent.com/p/AF1QipPf-WhOS9QkmK3fpjlX7MA4b2a-lD1TI1_AdJPw=w203-h152-k-no",
"https://lh5.googleusercontent.com/p/AF1QipOrm1s_BX0CbrwoDZXDRklBL2elUNKWKZSM9Snx=w203-h152-k-no",
"https://lh5.googleusercontent.com/p/AF1QipPFMO7lSrnxETy2sUHc6dH3zqdnMxzAY0WCK_Ww=w203-h152-k-no",
"https://lh5.googleusercontent.com/p/AF1QipNvdbJns-Y5rG36uDybnGD43EUNufZAwqdHp8UB=w203-h360-k-no",
"https://lh5.googleusercontent.com/p/AF1QipP7jRK949QsWo4IYSq7BL23qBN5r7ck4IpzOnsq=w203-h135-k-no",
"https://lh5.googleusercontent.com/p/AF1QipMi25zNuiZBrTzUaEDgOaaoynrBZm3X_rmvhwis=w203-h152-k-no",
"https://lh5.googleusercontent.com/p/AF1QipOx8oA6WUZUUsnTrvN6Xz52--jPGGYpvZa-K2Id=w203-h152-k-no",
"https://lh5.googleusercontent.com/p/AF1QipMEcdOSEbNPEu8nPoSUbBGKO3_ZVdT8EMCOpOw=w203-h114-k-no",
"https://lh5.googleusercontent.com/p/AF1QipOYEpAIaqDj88VoWuzsh1GN6nHkYRlyJ5B09Y1V=w203-h152-k-no",
"https://lh5.googleusercontent.com/p/AF1QipPrXrj_5LDrQB7VHOMVrz82n686NDdjBgPl_JGu=w203-h360-k-no",
"https://lh5.googleusercontent.com/p/AF1QipN8f6ZAbl0NdiQREiHlvbX5zG0StLn2kALQ00Nj=w203-h360-k-no",
"https://lh5.googleusercontent.com/p/AF1QipNbddOit3JsPF4PlRApLzHQo3klIZKPBuAFrQqq=w203-h270-k-no",
"https://lh5.googleusercontent.com/p/AF1QipNysSnvytivcOGeaWQyNHhW26s3fMQ2wjP70HBn=w203-h114-k-no",
"https://lh5.googleusercontent.com/p/AF1QipMaP3H3mMFtimcPkiIA85-fi3NWnBHo8wS-Vy5k=w203-h114-k-no"
],
"serpdog_pagination": {
"next": "https://api.scrapingdog.com/maps_photos?api_key=APIKEY&data_id=0x88371272500ebf33:0x70a094fd98fb45c0&hl=en&next_page_token=EvgDKYQi49-NlUMIDwAAAAEAAAMAAAAAAAAAEFAAAAAAAAAAAAIAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAQIAAAAAAAAAAAAA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