amazon-scraper is build for performing two types of scraping on Amazon platform. Given product url, it can scrape the details of the product. It also supports the category wise listing of all the products on Amazon and stores all the product details in the database.
Clone the repository and acquire all dependencies using command:
go mod download
Setup MySQL and create database with database name as amazon
.
Run the server using the command:
go run main.go
There are two endpoints for scraping the information from Amazon:
It takes the url of the product as input and provides the information about the product such as:
productName
category_id
manufacturer
price
ratings
description
It takes category-name
as input and provides all the products in the specified category. It stores all the products with the detailed information in the database. It will scrape the products continuously till the last item in the category.