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: String
asin
required
This is the Amazon product ID.
Type: String
country
required
For targeting a particular country. This should be the ISO Code of a country.
5 credits will be charged for each successful request with this parameter. 1 credit will be charged if the target country is the USA.
Default value is us.
Type: String
postal_code
To get data from a particular postal code.
Type: String
language
The language parameter in your Amazon Product API should be defined using standard ISO 639-1 codes (e.g., en for English, de for German, fr for French) to specify the language in which the product data (like titles and descriptions) should be returned. This helps tailor results according to regional Amazon domains, such as amazon.de for German (de) or amazon.fr for French (fr). Use this parameter to map the request to the appropriate Amazon locale and return content in the desired language.
Type: String
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"
}