Script to Scraping Amazon Product in PHP with Amazon API

Well, this time I will share about how to scraping amazon products using Amazon API. Many new amazon players are still confused how amazon API worked to scraping amazon product. I dont suggest you to do the screen scraping, Because is not permissable. Scrap amazon products using the API is a legal way. Beside legal, its more easy to use than screen scraping.

Who still confused about scraping amazon products using APIs can see the video snippet below

 To build Scraping Amazon script, you need to prepare. 

1. Get your amazon public key and amazon private key from Read here for more info.


scraping amazon product - public key and private key

2. Build Function in PHP to get Product Advertising API URL

I got the function from this site, visit there if you need to learn more. I do a little modification to be easy to use.

Call that function with this syntax below

The results of the $A variable is you will get Product Advertising API URL like 

Script to Scraping Amazon Product in PHP with Amazon API

 If you get results as above, you've managed to get Amazon product XML. With a few additions and looping statements in the script above you will get thousands of Amazons data , within a matter of hours.

You can combine with my ASIN GRABBER SCRIPT to get a reliable program. See and try my example here.

For scraping amazon xml data and how to arrange the data so that look elegant, i will discuss on the next article, if you have a question please comment below 🙂 .

The following two tabs change content below.
This site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.


 Add your comment
  1. Thanks for this article. I am still stumped on how to get the public/private keys. I ‘thot’ I had them, but they appear to be certificate signature files (20 lines), not a normal 20-40 character string.
    I got them here:

  2. can this script be used to fetch all the amazon products?

Leave a Comment

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.