socialblade-com-api

    2.2.3 • Public • Published

    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. urlprefix: Socialblade website is protected by Cloudflare, I use Scraperapi.com as prefix to bypass the blocks.
    2. source: one of the followings.
    3. username: username on the specified source.

    Example

    const { socialblade } = require('socialblade-com-api')
    
    async function main () {
      try {
        const response = await socialblade('http://api.scraperapi.com?api_key=<YOUR_API_KEY>&url=', 'twitter', 'barackobama')
      } 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

    Install

    npm i socialblade-com-api

    DownloadsWeekly Downloads

    7

    Version

    2.2.3

    License

    MIT

    Unpacked Size

    17.9 kB

    Total Files

    9

    Last publish

    Collaborators

    • davideviolante