Create a simple script to scrape Amazon product listings from the first page of search results for a given keyword.
I took the liberty of using the React library in the front-end together with Tailwind CSS to implement the interface
Front-end: React, TailwindCSS, Axios
Back-end: Express, Node , Axios and JSDOM
- You need to have node.js instaled in your system: version 21.7.1
after cloning the repository...
cd server/
npm install
cd server/
npm install
node serve.js
npm start
GET http://localhost:5000/api/scrape?keyword=${keyword}
Parâmetro | Tipo | Descrição |
---|---|---|
keyword |
string |
keyword is mandatory. |
example:
{
"title": "Mouse Gamer Redragon Storm Elite RGB Lunar White M988W-RGB, Branco",
"rating": "4,6",
"reviews": "163",
"image": "https://m.media-amazon.com/images/I/51tniuFnhzL._AC_UL320_.jpg"
},