Post Scraper
This API can be used for scraping any person or company post. You just have to pass the post URL to our API.
You have to send a GET request to https://api.scrapingdog.com/profile/post along with the below given parameters. Each successful request will cost 5 credits.
Parameters
Parameters
Description
api_key required
Your personal API key. Available on your dashboard Type: String
id required
Post ID. Type: String
API Example
curl "https://api.scrapingdog.com/profile/post?api_key=APIKEY&id=6976499964512243712"import requests
url = "https://api.scrapingdog.com/profile/post"
params = {
"api_key": "APIKEY",
"id": "6976499964512243712"
}
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 url = 'https://api.scrapingdog.com/profile/post';
const params = {
api_key: 'APIKEY',
id: '6976499964512243712'
};
axios.get(url, { params: params })
.then(response => {
if (response.status === 200) {
const data = response.data;
console.log(data);
} else {
console.log(`Request failed with status code: ${response.status}`);
}
})
.catch(error => {
console.error('An error occurred:', error);
});
<?php
// URL and parameters
$url = 'https://api.scrapingdog.com/profile/post';
$params = array(
'api_key' => 'APIKEY',
'id' => '6976499964512243712'
);
// Initialize cURL session
$ch = curl_init();
// Set cURL options
curl_setopt($ch, CURLOPT_URL, $url . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Execute the cURL request
$response = curl_exec($ch);
// Check for errors
if ($response === false) {
echo 'cURL error: ' . curl_error($ch);
} else {
// Process the response
echo $response;
}
// Close the cURL session
curl_close($ch);
?>
require 'net/http'
url = URI.parse('https://api.scrapingdog.com/profile/post')
params = {
api_key: 'APIKEY',
id: '6976499964512243712'
}
url.query = URI.encode_www_form(params)
response = Net::HTTP.get_response(url)
if response.is_a?(Net::HTTPSuccess)
puts response.body
else
puts "HTTP request failed: #{response.code} #{response.message}"
end
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Main {
public static void main(String[] args) {
try {
String apiUrl = "https://api.scrapingdog.com/profile/post/?api_key=APIKEY&id=6976499964512243712";
URL url = new URL(apiUrl);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
int responseCode = connection.getResponseCode();
if (responseCode == 200) {
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = reader.readLine()) != null) {
response.append(inputLine);
}
reader.close();
System.out.println(response.toString());
} else {
System.out.println("HTTP request failed: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
Last updated