Socket
Socket
Sign inDemoInstall

amazon-buddy

Package Overview
Dependencies
8
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

amazon-buddy

Amazon Scraper. Scrape products


Version published
Weekly downloads
111
increased by14.43%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Amazon Product Scraper

Useful tool to scrape product information from amazon

Features

  • Scrape products from amazon search result: asin, rating, number of reviews, price, title, url, sponsored or not, discounted or not
  • Result can be save to a CSV file
  • You can scrape up to 100 produtcs

alt text

Note:

  • Empty parameter = empty value

Possible errors

  • If there will be let me know

Installation

Install from NPM

$ npm i -g amazon-buddy

Install from YARN

$ yarn global add amazon-buddy

USAGE

Terminal

$ amazon-buddy --help

Usage: amazon-buddy <command> [options]

Commands:
  amazon-buddy search [options]

Options:
  --help, -h       help                                                [boolean]
  --version        Show version number                                 [boolean]
  --keyword, -k    Amazon search keyword ex. 'Xbox one'
                                               [string] [required] [default: ""]
  --products, -p   Number of products to scrape. Maximum 100       [default: 20]
  --save, -s       Save to a CSV file?                [boolean] [default: false]
  --sponsored, -s  Scrape sponsored products          [boolean] [default: false]

Examples:
  amazon-buddy search -k 'Xbox one'

Example

Scrape 40 producs from the "vacume cleaner" keyword and save everything to a CSV file

$ amazon-buddy search -k 'vacume cleaner' -s -p 40

The file will be saved in a folder from which you run the script: 1552945544582.csv

Module

const amazonScraper = require('amazon-buddy');

(async() => {
    try{
        let result = await amazonScraper({keyword: 'Xbox One', number: 50, save: true });
        console.log(result)
    }catch(error){
        console.log(error);
    }
})()

JSON/CSV output:

[{ 
    asin: 'B01N6HLV9L',
    discounted: false,  // is true if product is with the discount
    sponsored: false,  // is true if product is sponsored
    price: '$32.99',
    before_discount: '$42.99', // displayed only if price is discounted
    title:'product title',
    url:'long amazon url' 
}...]

Options

let options = {
    //Search keyword
    keyword: 0,

    //Number of products to scrape. Default 20
    number: 20,

    //Save to a CSV file
    save: true,
    
    //Set proxy
    proxy: "",
};

License

MIT

Free Software

Keywords

FAQs

Last updated on 07 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc