Get Amazon Product Pricing and Details Instantly using ScrapeHero API

Here is how to use our Amazon Scraping API deployed in Mashape to gather product details and pricing, with just ASIN as input.

Here is a sample output for AmazonBasics 9 Volt Everyday Alkaline Batteries – https://www.amazon.com/AmazonBasics-Everyday-Alkaline-Batteries-8-Pack/dp/B00MH4QM1S/ref=cm_cr_arp_d_product_top

{
    "small_description": "Pack of eight 9 Volt Alkaline Batteries - 3-year shelf life so you can store for emergencies or use immediately - Works with a variety of devices including digital cameras, game controllers, toys, and clocks; do not attempt to recharge - Ships in Certified Frustration-Free Packaging",
    "average_rating": 4.1,
    "url": "https://www.amazon.com/dp/B00MH4QM1S",
    "product_information": {
        "Product Dimensions": "10 x 5 x 3 inches",
        "Amazon Best Sellers Rank": " #30 in Health & Household  #1 in Health & Household > House Supplies > Household Batteries > 9V #18 in Health & Household > Sales & Deals",
        "International Shipping": "This item can be shipped to select countries outside of the U.S.",
        "ASIN": "B00MH4QM1S",
        "Item model number": "6LR16-8PK",
        "Shipping Weight": "12.8 ounces ",
        "Domestic Shipping": "Currently, item can be shipped only within the U.S. and to APO/FPO addresses. For APO/FPO shipments, please check with the manufacturer regarding warranty and support issues.",
        "UPC": "841710157253 841710106381"
    },
    "availability_quantity": null,
    "availability_status": "In Stock. Ships from and sold by Amazon.com in easy-to-open packaging. Gift-wrap available. In Stock. ",
    "brand": "AmazonBasics",
    "images": [
        "https://images-na.ssl-images-amazon.com/images/I/51Sz3jJJTiL.jpg",
        "https://images-na.ssl-images-amazon.com/images/I/51HgnCzMQ8L.jpg",
        "https://images-na.ssl-images-amazon.com/images/I/41bKQSjRtrL.jpg",
        "https://images-na.ssl-images-amazon.com/images/I/31gEWM7HIDL.jpg",
        "https://images-na.ssl-images-amazon.com/images/I/414uNjRsgHL.jpg"
    ],
    "price": "$9.80",
    "model": "6LR16-8PK",
    "name": "AmazonBasics 9 Volt Everyday Alkaline Batteries (8-Pack)",
    "total_reviews": 4579,
    "full_description": "AmazonBasics brings you everyday items at a great value. An Amazon Brand.",
    "productCategory": "Health & Household > Household Supplies > Household Batteries > 9V"
}

Step 1: Create an Account in Mashape

  1. Go to the Mashape Marketplace page – https://market.mashape.com/
  2. If you are new to Mashape you can create an account by clicking on the ‘Sign Up’ button at the top of the page. If you have an account sign in to Mashape with your credentials.
  3. Then open up ScrapeHero’s API page – https://market.mashape.com/ScrapeHero/amazon-product-details-and-pricing

scrapehero-amazon-api-main-page

Step 2: Subscribe to a Plan and Get API

  1. To subscribe to ScrapeHero’s Amazon API, click on the ‘Pricing’ tab on the API page. The browser will redirect you to the API pricing page.
  2. Choose the basic plan to get 50 API calls for free. If you want more you can subscribe to a paid plan or contact us if your volume is high.

scrapehero-amazon-api-pricing-plan

After you have subscribed to ScrapeHero’s Amazon API, Mashape will automatically generate your personal API key that you can use in every call. It is your personal identifier and should not be shown to the public.

Step 3: Test the API

Now come back to the API documentation page https://market.mashape.com/ScrapeHero/amazon-product-details-and-pricing

  1. Find the product ASIN you need to search for. Every Amazon product will have an ASIN. (An ASIN from any other domain will not work.) For example, if the product URL is – https://www.amazon.com/Exploding-Kittens-LLC-EKG-ORG1-1-Card/dp/B010TQY7A8/. The ASIN will be B010TQY7A8.
  2. By default, the ASIN input box is filled with a sample product ASIN. If you want to try another product, paste the ASIN in the “asin” input box under URL parameters and click the button ‘TEST ENDPOINT’.

 

scrapehero-amazon-api-testing-the-endpoint

Step 4: Python Script to consume the API

The python script below will let you scrape details and pricing for multiple products using our API.

import requests
asins = [
"B00MH4QM1S",
"B00IQBT1AK",
"B0056GDG90",
"B00GMAWI66",
"B00HS3I8VA",
"B004IUN7JO",
"B00SG595J8",
"B0188NZSP2",
"B0188BA9KS"
]
data = []
for asin in asins: 
    response = requests.get("https://scrapehero-amazon-product-info-v1.p.mashape.com/product-details?asin=%s"%asin,
    headers={
    "X-Mashape-Key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Accept": "application/json"}
    )
    data.append(response.json())
print(data)

The data gathered would look like this –  https://gist.github.com/scrapehero/11cb43a72cf5b1cfbee8d9a63a4e45cf

You can save this scraped data to a JSON file or Database for further use.

We can help with your data or automation needs

Turn the Internet into meaningful, structured and usable data

Comments or Questions?

Turn the Internet into meaningful, structured and usable data