Amazon Product Scraper
This API can be used for scraping any product page from Amazon. All you need is the ASIN code of that product.
You have to send a GET request to https://api.scrapingdog.com/amazon/product
with the below given parameters.
Parameters
Parameter | Description |
---|---|
api_key required | Your personal API key. Available on your dashboard Type: String |
domain required | This is the TLD extension of the amazon page.
Example - in, com, tr, etc
Type: |
asin required | This is the Amazon product ID.
Type: |
country required | For targetting a particular country. This should be the ISO code of a country.
Default value is |
postal_code | Type:
Contact us for using the |
API Example
curl "https://api.scrapingdog.com/amazon/product?api_key=5eaa61a6e562fc52fe763tr516e4653&domain=com&asin=B00AP877FS"
import requests
url = "https://api.scrapingdog.com/amazon/product"
params = {
"api_key": "5eaa61a6e562fc52fe763tr516e4653",
"domain": "com",
"asin": "B00AP877FS"
}
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/amazon/product';
const params = {
api_key: '5eaa61a6e562fc52fe763tr516e4653',
domain: 'com',
asin: 'B00AP877FS',
};
axios
.get(url, { 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('Request failed with an error:', error);
});
<?php
$apiUrl = 'https://api.scrapingdog.com/amazon/product';
$apiKey = '5eaa61a6e562fc52fe763tr516e4653';
$domain = 'com';
$asin = 'B00AP877FS';
$queryString = http_build_query([
'api_key' => $apiKey,
'domain' => $domain,
'asin' => $asin,
]);
$fullUrl = $apiUrl . '?' . $queryString;
$ch = curl_init($fullUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($httpCode == 200) {
$data = json_decode($response, true);
print_r($data);
} else {
echo "Request failed with status code $httpCode\n";
}
curl_close($ch);
?>
require 'net/http'
require 'json'
api_url = 'https://api.scrapingdog.com/amazon/product'
api_key = '5eaa61a6e562fc52fe763tr516e4653'
domain = 'com'
asin = 'B00AP877FS'
params = {
'api_key' => api_key,
'domain' => domain,
'asin' => asin
}
uri = URI(api_url)
uri.query = URI.encode_www_form(params)
response = Net::HTTP.get_response(uri)
if response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)
puts data
else
puts "Request failed with status code #{response.code}"
end
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Main {
public static void main(String[] args) {
String apiURL = "https://api.scrapingdog.com/amazon/product";
String apiKey = "5eaa61a6e562fc52fe763tr516e4653";
String domain = "com";
String asin = "B00AP877FS";
try {
// Create the URL with query parameters
URL url = new URL(apiURL + "?api_key=" + apiKey + "&domain=" + domain + "&asin=" + asin);
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 data
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line;
StringBuilder response = new StringBuilder();
while ((line = reader.readLine()) != null) {
response.append(line);
}
reader.close();
// Print the response data
System.out.println(response.toString());
} else {
System.out.println("Request failed with response code: " + responseCode);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
Response
{
"title": "Cosmetic Brush Kit 5 Pcs Makeup Brush Travel Set Princessa - Pink",
"product_information": {
"UPCundefined": "716189022169",
"ASINundefined": "B00AP877FS",
"CustomerReviews": "5.0 stars and 4 reviews"
},
"brand": "Brand: BeautyEZ",
"brand_url": "/s/ref=bl_dp_s_web_0?ie=UTF8&search-alias=aps&field-keywords=BeautyEZ",
"description": "This set of 5 pieces makeup brushes provides an assortment of brushes for cosmetic applications. It is an important beauty essential for you. The Brushes are used for applying powder, foundation, brush, and eye shadow. Its design is suitable to carry and use when you are travelling.",
"price": "$6.95",
"list_price": "$6.95",
"shipping_info": "Details",
"availability_status": "In Stock",
"images": [
"https://m.media-amazon.com/images/I/41BWGQGj93L.jpg",
"https://m.media-amazon.com/images/I/41tEyvqzdxL.jpg",
"https://m.media-amazon.com/images/I/41Bvv57t03L.jpg",
"https://m.media-amazon.com/images/I/41Bvv57t03L.jpg"
],
"number_of_videos": 0,
"product_category": "Beauty & Personal Care › Tools & Accessories › Makeup Brushes & Tools › Brush Sets",
"average_rating": 5,
"feature_bullets": [
"1 set of 5 pcs makeup brushes",
"Lash & Brow Comb, Sponge Tip Applicator",
"Powder Brush, Liner Brush and Eye Shadow Brush",
"Soft tips and Stylish design",
"4 to 4.2 inches each to easily fit in your travel case."
],
"total_reviews": 4,
"total_answered_questions": "",
"other_sellers": [],
"customization_options": {
"color": [],
"size": [],
"style": []
},
"merchant_info": "BEAUTYezSHOP",
"ships_from": "BEAUTYezSHOPBEAUTYezSHOP",
"sold_by": "BEAUTYezSHOP"
}
Last updated