Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

229 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Socialblade.com unofficial APIs

Maintainability Donate

Unofficial APIs for Socialblade.com website. The socialblade function returns the last 30 days data of a username for a particular source. See example below.

Install

npm i socialblade-com-api

Params of socialblade function

  1. source: one of the followings.
  2. username: account username on the specified source.
  3. cookie: required param if source is instagram. You need to sign up for a free account to socialblade.com, then get the value of PHPSESSXX Cookie from Chrome console (F12) > Application > Cookies.

Example

const { socialblade } = require('socialblade-com-api')

async function main () {
  try {
    const response1 = await socialblade('twitter', 'barackobama')
    const response2 = await socialblade('instagram', 'barackobama', '<your_socialblade_phpsessxx_cookie>')
  } catch (err) {
    console.error(err)
  }
}

Example response

{
  table: [
    {
      date: '2020/05/26',
      followersDelta: 5657,
      followers: 117937431,
      followingDelta: -7,
      following: 605960,
      postsDelta: 0,
      posts: 15811
    },
    ...
  ],
  charts: [
    {
      id: 'weekly-followers-gained',
      title: 'Weekly Followers Gained for ...',
      data: [ { date: '2020/05/26', value: 123 }, ... ]
    }
  ]
}

Run tests

  • npm test

Run lint

  • npm run lint

Bugs and feedbacks

Please open an issue.

Author

About

Unofficial APIs for socialblade.com website.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages