Google Maps Posts API
Using Google Maps Posts API you can scrape Google Maps Posts result without worrying about proxy rotation and data parsing. Our API is fast and reliable. Each successful request will cost you 5 API cr
You have to send a GET request to http://api.scrapingdog.com/google_maps/posts
with the below-given parameters.
Google Maps API pricing is available here.
Parameters
Parameters
Description
api_key required
Your personal API key. Available on your dashboard Type: String
data_id required
next_page_token
The next_page_token is used to get the next page results.
Type: String
API Example
cURL "https://api.scrapingdog.com/google_maps/posts?api_key=APIKEY&data_id=0x88371272500ebf33:0x70a094fd98fb45c0"
import requests
api_key = "5eaa61a6e562fc52fe763tr516e4653"
url = "https://api.scrapingdog.com/google_maps/posts"
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/posts';
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/posts/?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/posts/?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/posts/?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
{
"post_results": {
"location_details": {
"name": "Kline Home Exteriors",
"logo": "https://lh3.googleusercontent.com/-prudi4SDf0Y/AAAAAAAAAAI/AAAAAAAAAAA/amGm1Mdgbc8/s40-c-k-mo/photo.jpg"
},
"post_data": [
{
"description": "Upgrade Your Home's Exterior with Stonework!!Check our latest blog post to see the benefits and options with manufactured stone!!",
"date": "Aug 4, 2022",
"image": "https://lh3.googleusercontent.com/geougc/AF1QipOHtMv9JsXmSZKqP09NmAnKV1jBETJNJNtbETNZ=h400-no",
"link": "https://www.klinehomeexteriors.com/blog/upgrade-your-homes-exterior-with-stonework"
},
{
"description": "Check out our latest blog post on tips to follow before installing new Vinyl Siding!",
"date": "Jul 7, 2022",
"image": "https://lh3.googleusercontent.com/geougc/AF1QipNl49lhymIZHTNZejjthCcV2DwHpdaPWd20bWte=h400-no",
"link": "https://www.klinehomeexteriors.com/blog/before-installing-new-vinyl-siding"
},
{
"description": "Check out our latest blog to help you choose a new roof for your home!",
"date": "May 13, 2022",
"image": "https://lh3.googleusercontent.com/geougc/AF1QipP7tsANa2TyubOFjmQjof2sHs-0L4_ytdzxQq3h=h400-no",
"link": "https://www.klinehomeexteriors.com/blog/how-to-choose-a-new-roof-for-your-home"
},
{
"description": "What makes our composite decking so unique? ⭐️They use compress technology, which makes the decking dense, strong and built to last!⭐️The EverGrain core, which is used in amusement parks and stadiums, is resilient and durable.⭐️Non-repeating grains makes each board stand out with a natural appearance.Are you ready to update your deck to something that will last?",
"date": "Apr 27, 2022",
"image": "https://lh3.googleusercontent.com/geougc/AF1QipOaKDSNYDlqzoRMHF6dC131I5g9s94R3nDPJQL7=h400-no",
"link": "https://www.klinehomeexteriors.com/services/decks-porches"
},
{
"description": "Are you looking for a company with a mission?We value you as a customer, and strive to make a positive impact on your home!",
"date": "Mar 18, 2022",
"image": "https://lh3.googleusercontent.com/geougc/AF1QipNAslnaPnm9MsCLK8xot57PL9WopoeaCDefYmxE=h400-no",
"link": "http://klinehomeexteriors.com/"
},
{
"description": "Exciting things are coming!We filmed a short segment with Fox 8 for their Virtual Home Show!Scott is a great face for the company. We will let you know soon when it's airing and where you can catch it!",
"date": "Jan 26, 2022",
"image": "https://lh3.googleusercontent.com/geougc/AF1QipMqMpKCGgFGVR_ZbcxDJtfs6-rLcosxmLtM0l5k=h400-no",
"link": "http://klinehomeexteriors.com/"
},
{
"description": "Is this chilly weather making you long for spring?Start dreaming! What projects are you looking forward to in 2022?",
"date": "Dec 14, 2021",
"image": "https://lh3.googleusercontent.com/geougc/AF1QipMjtqOOj8eFRyQ1bUaKfdl_pjz3GUUeqJQtVRAB=h400-no",
"link": "http://www.klinehomeexteriors.com/"
},
{
"description": "What a difference a new roof can make! Add a modern flare 🔥 to your home with a WeatherMax Metal Roof and see the difference on your own home! 🏡",
"date": "Nov 3, 2021",
"image": "https://lh3.googleusercontent.com/geougc/AF1QipNoa4qSJ1Vsj6W_Im_QAbDSAxkiVc_eqpHrraed=h400-no",
"link": "http://www.klinehomeexteriors.com/"
},
{
"description": "What are your home exterior dreams? Let Kline Home Exteriors help you make them come true!",
"date": "Oct 6, 2021",
"image": "https://lh3.googleusercontent.com/geougc/AF1QipNJGcclDn3Y1zFdm0s3Abkel_sHBp3tJw0uY41x=h400-no",
"link": "http://www.klinehomeexteriors.com/"
},
{
"description": "Are you thinking about the deck you've been wanting to build? NOW IS THE TIME! We have time to build your deck in 2021! Contact us today for your free quote!",
"date": "Aug 18, 2021",
"image": "https://lh3.googleusercontent.com/geougc/AF1QipMj0veifwlrbFvLDf22MCsI5efwXHZjPu9DAEEO=h400-no",
"link": "http://klinehomeexteriors.com/"
}
],
"next_page_token": "CgwI7vvziAYQ2M6i6QIqBkVnSUlDZw=="
}
}
Last updated