similarweb-scrape

0.0.1 • Public • Published

similarweb-scrape

Scrapes SimilarWeb site to get analytics for domain.

NOTE: Due to SimilarWeb's bot detection, this will only work for a very few number of requests. Only use this for experimenting. Do not use this for production. Also, this module will most likely break in the future when SimilarWeb updates their DOM selectors.

Install

npm install similarweb-scrape

Usage

const {getData} = require('similarweb-scrape')
 
const domain = 'github.com'
 
getData(domain)
.then(data => {
  console.log(data)
 
  /*
  {
    domain: 'github.com',
    totalVisits: '387.76M',
    avgVisitDuration: '00:06:10',
    pagesPerVisit: '6.63',
    bounceRate: '41.63%',
    globalRank: '78',
    category: 'Computer and Electronics > Software' }
  }
  */
})
.catch(error => {
  console.error(error)
})

Test

npm test

License

MIT

Package Sidebar

Install

npm i similarweb-scrape

Weekly Downloads

4

Version

0.0.1

License

MIT

Last publish

Collaborators

  • miguelmota