Amazon Reviews API
This API can be used for scraping reviews from 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/reviews
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: |
page required | This is the page number.
Type: |
url | This is the Amazon Product Reviews URL which can be used instead of asin, domain and page.
Type: |
API Example
curl "https://api.scrapingdog.com/amazon/reviews?api_key=5eaa61a6e562fc52fe763tr516e4653&domain=com&asin=B00AP877FS&page=1"
import requests
url = "https://api.scrapingdog.com/amazon/reviews"
params = {
"api_key": "5eaa61a6e562fc52fe763tr516e4653",
"domain": "com",
"asin": "B00AP877FS",
"page": 1
}
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/reviews';
const params = {
api_key: '5eaa61a6e562fc52fe763tr516e4653',
domain: 'com',
asin: 'B00AP877FS',
page: 1
};
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/reviews';
$apiKey = '5eaa61a6e562fc52fe763tr516e4653';
$domain = 'com';
$asin = 'B00AP877FS';
$page= 1
$queryString = http_build_query([
'api_key' => $apiKey,
'domain' => $domain,
'asin' => $asin,
'page' => $page
]);
$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/reviews'
api_key = '5eaa61a6e562fc52fe763tr516e4653'
domain = 'com'
asin = 'B00AP877FS'
page = 1
params = {
'api_key' => api_key,
'domain' => domain,
'asin' => asin,
'page' => page
}
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/reviews";
String apiKey = "5eaa61a6e562fc52fe763tr516e4653";
String domain = "com";
String asin = "B00AP877FS";
int page = 1;
try {
// Create the URL with query parameters
URL url = new URL(apiURL + "?api_key=" + apiKey + "&domain=" + domain + "&asin=" + asin + "&page=" + page);
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
{
"reviews": 4,
"rating": 5,
"actual_reviews": 3,
"customer_reviews": [
{
"user": "pagan chavez",
"title": "so cute!!",
"date": "Reviewed in the United States on June 3, 2014",
"rating": 5,
"review": "i love this its so cute and i really wanted something to match my vanity area and i dont think i will use these much just because they are so cute... i did try them and i love the coverage that it gives.... who would have known that a cheap priced brush set would be so good.... i would definitely recommend this to everyone!!! i might just order another set just so i can still use one set and keeep the other one as decoration! my only downside is that the color i received is a little different then the one on the picture... but thats ok because i love both colors"
},
{
"user": "Shi",
"title": "Gift",
"date": "Reviewed in the United States on May 2, 2022",
"rating": 5,
"review": "Yeah I know she was happy with it and the color design"
},
{
"user": "Ginger",
"title": "Good price, good quality, five stars!",
"date": "Reviewed in the United States on November 30, 2013",
"rating": 5,
"review": "Very cute, great for price, and good quality. I ordered it standard delivery and it got here six days earlier than expected! Very happy and so is the recipient of my gift (who by the way is 20, not a little one as you may assume)!"
}
]
}
Last updated