Freelance Web Developer

Jan 28, 2014

Fetching Amazon product information using WSM API

Its Web Scrape Master API. Simplest way to Scrape web without writing code.

Using Visual Web Scraper to decide xpaths and generate API URL
Visual Web Scraper is simple to use, just paste URL and click "Scrape this page". On next page you can select any element just by clicking on it. Try this link.
If you have clicked on Item Title (for example). Here is your API URL[@id=title]

Got that, What if you need more elements?
Good news, You can do this, you can fetch more than one element from one webpage in on API call. Just click on "Try again" and click on another element. For example if you have clicked on price, you will get this xpath

You can use comma separated xpaths in API URL. Add this xpath to your last API URL.[@id=title],//span[@id=priceblock_ourprice]

Here is an example link with most of the information from Amazon product page[@id=title],//img[@id=landingImage],//span[@id=priceblock_ourprice],//div[@id=productDescription]/div/div,//div[@id=avgRating]/span,//div[@id=detail-bullets]/table/tbody/tr/td/div/ul/li[1]

You can change the ASIN code in URL to fetch other product pages.

I am on twitter as @motyar or you can contact me if you need any help.

Labels: , , , ,

By :