Amazon Product API
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.ecommerceapi.io/amazon/product
with the below given parameters.
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
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.
5 credits will be charged for each successful request with this parameter.
Type: String
API Example
curl "https://api.ecommerceapi.io/amazon/product?api_key=APIKEY&domain=com&asin=B0BSHF7WHW"
const axios = require('axios');
const url = 'https://api.ecommerceapi.io/amazon/product';
const params = {
api_key: 'APIKEY',
domain: 'com',
asin: 'B0BSHF7WHW',
};
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);
});
import requests
url = "https://api.ecommerceapi.com/amazon/product"
params = {
"api_key": "APIKEY",
"domain": "com",
"asin": "B0BSHF7WHW"
}
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}")
<?php
$apiUrl = 'https://api.ecommerceapi.io/amazon/product';
$apiKey = 'APIKEY';
$domain = 'com';
$asin = 'B0BSHF7WHW';
$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.ecommerceapi.io/amazon/product'
api_key = 'APIIKEY'
domain = 'com'
asin = 'B0BSHF7WHW'
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.ecommerceapi.io/amazon/product";
String apiKey = "APIKEY";
String domain = "com";
String asin = "B0BSHF7WHW";
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();
}
}
}
API Response
{
"title": "Apple 2023 MacBook Pro Laptop with Apple M2 Pro chip with 12‑core CPU and 19‑core GPU: 16.2-inch Liquid Retina XDR Display, 16GB Unified Memory, 1TB SSD Storage. Works with iPhone/iPad; Space Gray",
"location": "Delivering to Ashburn 20146",
"brand": "Visit the Apple Store",
"brand_url": "/stores/Apple/page/77D9E1F7-0337-4282-9DB6-B6B8FB2DC98D?ref_=ast_bln",
"description": "",
"price": "$2,149.95 with 20 percent savings",
"list_price": "$2,149.95",
"exact_price": 2149.95,
"price_symbol": "$",
"is_prime_exclusive": false,
"number_of_people_bought": "50+ bought in past month",
"shipping_info": "FREE Thursday, December 26 ",
"availability_status": "In Stock",
"aplus": false,
"previous_price": "$2,699.00",
"is_coupon_exists": false,
"coupon_text": "",
"images_of_specified_asin": [
"https://m.media-amazon.com/images/I/317kEbusAZL._AC_SR38,50_.jpg",
"https://m.media-amazon.com/images/I/31cQiUCcY3L._AC_SR38,50_.jpg",
"https://m.media-amazon.com/images/I/31lys+O11KL._AC_SR38,50_.jpg",
"https://m.media-amazon.com/images/I/31jCAZcLrAL._AC_SR38,50_.jpg",
"https://m.media-amazon.com/images/I/51DkAFukNbL._AC_SR38,50_.jpg",
"https://m.media-amazon.com/images/I/316rmr9DBPL._AC_SR38,50_.jpg",
null,
"https://images-na.ssl-images-amazon.com/images/G/01/x-locale/common/transparent-pixel._V192234675_.gif"
],
"images": [
"https://m.media-amazon.com/images/I/61fd2oCrvyL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/71ZAeHYYlHL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61C9irOOQVL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81j1XDaqcML._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81OBjqVEGwL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61FhAanYdhL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61bwiPRcv2L._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/71-uDe4TN1L._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61C9irOOQVL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81KJXaswhrL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81OBjqVEGwL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61CdlgWgngL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61EXF2Vr9LL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61fd2oCrvyL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/71ZAeHYYlHL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61C9irOOQVL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81j1XDaqcML._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81OBjqVEGwL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61FhAanYdhL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61ldExf7mbL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/71-uDe4TN1L._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61C9irOOQVL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81KJXaswhrL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81OBjqVEGwL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61CdlgWgngL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61ldExf7mbL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/71-uDe4TN1L._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61C9irOOQVL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81KJXaswhrL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81OBjqVEGwL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61CdlgWgngL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61fd2oCrvyL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/71ZAeHYYlHL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61C9irOOQVL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81j1XDaqcML._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81OBjqVEGwL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61FhAanYdhL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61fd2oCrvyL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/71ZAeHYYlHL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61C9irOOQVL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81j1XDaqcML._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/81OBjqVEGwL._AC_SL1500_.jpg",
"https://m.media-amazon.com/images/I/61FhAanYdhL._AC_SL1500_.jpg"
],
"number_of_videos": 0,
"product_category": "",
"average_rating": "4.7",
"feature_bullets": [
"SUPERCHARGED BY M2 PRO OR M2 MAX — Take on demanding projects with the M2 Pro or M2 Max chip. M2 Pro has 12 CPU cores, 19 GPU cores, and up to 32GB unified memory. M2 Max has 12 CPU cores, up to 38 GPU cores, and up to 96GB unified memory.",
"UP TO 22 HOURS OF BATTERY LIFE — Go all day thanks to the power-efficient design of the M2 Pro or M2 Max chip. And the MacBook Pro laptop delivers exceptional performance whether it’s running on battery or plugged in.",
"FULLY COMPATIBLE — All your pro apps run lightning fast — including Adobe Creative Cloud, Xcode, Affinity Designer, Microsoft 365, and many of your favorite iPhone and iPad apps.",
"BEAUTIFUL PRO DISPLAY — The 16.2-inch Liquid Retina XDR display features Extreme Dynamic Range, over 1000 nits of brightness for stunning HDR content, and pro reference modes for doing your best work on the go.",
"ADVANCED CAMERA AND AUDIO — Look sharp and sound great with a 1080p FaceTime HD camera, a studio-quality three-mic array, and a six-speaker sound system with Spatial Audio.",
"CONNECT WHAT YOU WANT — MacBook Pro features a MagSafe charging port, three Thunderbolt 4 ports, an SDXC card slot, an HDMI port, and a headphone jack. And enjoy seamless wireless connectivity with Wi-Fi 6E and Bluetooth 5.3.",
"MAGIC KEYBOARD WITH TOUCH ID — Magic Keyboard comes with a full-height function key row and Touch ID, which gives you a fast, easy, secure way to unlock your Mac and sign in to apps and sites.",
"WORKS WITH ALL YOUR APPLE DEVICES — You can do amazing things when you use your Apple devices together. Copy something on iPhone and paste it on MacBook Pro. Use your MacBook Pro to answer FaceTime calls or send texts with Messages. And that’s just the beginning.",
"BUILT TO LAST — The all-aluminum unibody enclosure is exceptionally durable. Free software updates keep things running smoothly and securely for years to come.",
"LEGAL DISCLAIMERS — This is a summary of the main product features. See legal disclaimers below."
],
"total_reviews": "421 ratings",
"total_answered_questions": "Search this page",
"other_sellers": [
],
"customization_options": {
"color": [
{
"is_selected": false,
"url": "https://www.amazon.com/dp/B0BSHF1YSR/ref=twister_B0BSMHLDXD",
"value": "Silver",
"image": "https://m.media-amazon.com/images/I/11nqT6LvQmL._SS36_.jpg"
},
{
"is_selected": true,
"url": "",
"value": "Space Gray",
"image": "https://m.media-amazon.com/images/I/11wAM9fACuL._SS36_.jpg"
}
],
"size": [
{
"is_selected": true,
"url": "",
"value": "1TB"
},
{
"is_selected": false,
"url": "https://www.amazon.com/dp/B0BSHF7LLL/ref=twister_B0BSMHLDXD",
"value": "512 GB"
}
],
"style": [
{
"is_selected": false,
"url": "https://www.amazon.com/dp/B0BSHF1YSR/ref=twister_B0BSMHLDXD",
"value": "Apple M2 Max Chip"
},
{
"is_selected": true,
"url": "",
"value": "Apple M2 Pro Chip"
}
]
},
"merchant_info": "ShipsfromandsoldbyAdorama.",
"ships_from": "6ave6aveShipsfrom6ave",
"sold_by": "6ave 6ave Sold by 6ave",
"author": {
"title": "",
"description": ""
},
"customers_freuqently_viewed": [
],
"products_related_to_this_item": [
],
"customer_who_bought_this_item_also_bought": [
],
"customers_say": "Customers appreciate the notebook computer's sound, speed, screen quality, and build quality. They find it capable, efficient, and well-made. Many praise its great battery life and ease of use. However, some customers have issues with system compatibility and differing opinions on value for money.",
"customer_sentiments": [
{
"title": "Sound quality",
"sentiment": "POSITIVE"
},
{
"title": "Speed",
"sentiment": "POSITIVE"
},
{
"title": "Screen quality",
"sentiment": "POSITIVE"
},
{
"title": "Build quality",
"sentiment": "POSITIVE"
},
{
"title": "Battery life",
"sentiment": "POSITIVE"
},
{
"title": "Ease of use",
"sentiment": "POSITIVE"
},
{
"title": "Value for money",
"sentiment": "MIXED"
},
{
"title": "System compatibility",
"sentiment": "NEGATIVE"
}
],
"ratings_distribution": [
{
"rating": 5,
"distribution": "85"
},
{
"rating": 4,
"distribution": "8"
},
{
"rating": 3,
"distribution": "2"
},
{
"rating": 2,
"distribution": "3"
},
{
"rating": 1,
"distribution": "3"
}
],
"customer_reviews": [
{
"customer_name": "Michael McNulty",
"customer_profile": "/gp/profile/amzn1.account.AHWZGTDKJZXJCML57FSNXYBXZICA/ref=cm_cr_dp_d_gw_tr?ie=UTF8",
"thumbnail": "https://images-na.ssl-images-amazon.com/images/G/01/x-locale/common/grey-pixel.gif",
"rating": "5.0 out of 5 stars",
"review_title": "5.0 out of 5 starsThis thing is insane.",
"date": "Reviewed in the United States on July 22, 2023",
"review_snippet": "I upgraded from the $3,499 i9 Intel MacBook Pro from 2019, and this laptop seriously blows that away. The keyboard is amazing and so much better, the screen is amazing, I love the refresh rate, the responsiveness of jumping between pages and apps is so ridiculously fast, the trackpad and speakers are still just amazing, and the battery life on this is mind-blowing.Seriously, 10/10, absolutely recommend this to anyone, this thing is insane. I put it in my backpack for 9 days, and 9 days later it was still at 54%, even though it was powered on the entire time. I literally got a FaceTime call on my iPhone and my MacBook rang in my backpack at the same time on day 9.Get this MacBook if you need power and battery life, nothing will beat this."
},
{
"customer_name": "Kayleigh D.",
"customer_profile": "/gp/profile/amzn1.account.AHNE6YK7J7WURJNNFN4VUCQ2FI3A/ref=cm_cr_dp_d_gw_tr?ie=UTF8",
"thumbnail": "https://images-na.ssl-images-amazon.com/images/G/01/x-locale/common/grey-pixel.gif",
"rating": "5.0 out of 5 stars",
"review_title": "5.0 out of 5 starsA reliable computer",
"date": "Reviewed in the United States on September 8, 2024",
"review_snippet": "I bought this Mac so I could play sims 4 with some of my expansion packs and this thing runs like an absolute dream. I’m a firm believer in paying what you get for, and this is one of those cases. It’s a great quality computer."
},
{
"customer_name": "Tim G.",
"customer_profile": "/gp/profile/amzn1.account.AHT2DMILIN3J5G6M4ZWENQ6FZPPA/ref=cm_cr_dp_d_gw_tr?ie=UTF8",
"thumbnail": "https://images-na.ssl-images-amazon.com/images/G/01/x-locale/common/grey-pixel.gif",
"rating": "5.0 out of 5 stars",
"review_title": "5.0 out of 5 starsGood Price",
"date": "Reviewed in the United States on November 15, 2024",
"review_snippet": "While not top of the line, this is still a very capable machine. Works great for everyday tasks along with working with large graphic files."
},
{
"customer_name": "Walter Thompson",
"customer_profile": "/gp/profile/amzn1.account.AHNKEURKDOQSGMKIST2CZ7NO6ASQ/ref=cm_cr_dp_d_gw_tr?ie=UTF8",
"thumbnail": "https://images-na.ssl-images-amazon.com/images/G/01/x-locale/common/grey-pixel.gif",
"rating": "5.0 out of 5 stars",
"review_title": "5.0 out of 5 starsArrived packed safely and promptly.",
"date": "Reviewed in the United States on August 21, 2024",
"review_snippet": "Awesome product! Fast and powerful! Great for ProTools!"
},
{
"customer_name": "Melvin Jenkins",
"customer_profile": "/gp/profile/amzn1.account.AERNXR7TNCYUWLGNXLMFJFLUWIRA/ref=cm_cr_dp_d_gw_tr?ie=UTF8",
"thumbnail": "https://images-na.ssl-images-amazon.com/images/G/01/x-locale/common/grey-pixel.gif",
"rating": "5.0 out of 5 stars",
"review_title": "5.0 out of 5 starsSolid company to purchase from!",
"date": "Reviewed in the United States on November 18, 2024",
"review_snippet": "I appreciate the quality and prompt delivery of my Mac , you guys are top shelf, I’ve used it every day since I got it and man oh man am I overly satisfied, thank you, definitely doing more business in the future 👍🏾"
},
{
"customer_name": "Mike",
"customer_profile": "/gp/profile/amzn1.account.AE544YCSTONVBPT326ZZEC4PL3XA/ref=cm_cr_dp_d_gw_tr?ie=UTF8",
"thumbnail": "https://images-na.ssl-images-amazon.com/images/G/01/x-locale/common/grey-pixel.gif",
"rating": "4.0 out of 5 stars",
"review_title": "4.0 out of 5 starsScreen is a notable improvement from my last macpro",
"date": "Reviewed in the United States on November 21, 2024",
"review_snippet": "Easy and comfortable to use.I think I got my money’s worth. Of course only time can confirm in this regard."
},
{
"customer_name": "Armin A. Wolff",
"customer_profile": "/gp/profile/amzn1.account.AH76HUP4I3LLO4T3RSEENODBTAJA/ref=cm_cr_dp_d_gw_tr?ie=UTF8",
"thumbnail": "https://images-na.ssl-images-amazon.com/images/G/01/x-locale/common/grey-pixel.gif",
"rating": "5.0 out of 5 stars",
"review_title": "5.0 out of 5 starsApples products are good but expensive",
"date": "Reviewed in the United States on April 6, 2024",
"review_snippet": "The service from this seller on Amazon was good and and the delivery was right on time.The new Apple products with the Apple made chips are impressive in their performance and frugal use of electricity. They also support their products with regular software updates longer than most other manufacturers.Because of this, Apple products have a fantastic battery life. Remember in this life you generally get what you pay for."
},
{
"customer_name": "Mrs.Sylvia Lopez",
"customer_profile": "/gp/profile/amzn1.account.AHZGOIPTRI3ZTKLBHOQVY4XHR4RA/ref=cm_cr_dp_d_gw_tr?ie=UTF8",
"thumbnail": "https://images-na.ssl-images-amazon.com/images/G/01/x-locale/common/grey-pixel.gif",
"rating": "5.0 out of 5 stars",
"review_title": "5.0 out of 5 starsBeautiful MacBook",
"date": "Reviewed in the United States on October 15, 2024",
"review_snippet": "A fantastic Mac but unfortunately I couldn't keep it cause it wasn't compatable with my machines. Broke my heart. Had it been, this would have been an absolute winner.Customer service is excellent with responding to my messages in returning it as well. Appreciate the help and support."
}
]
}
Last updated