MCPcopy Index your code
hub / github.com/SocialBlade/socialblade-js

github.com/SocialBlade/socialblade-js @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
113 symbols 156 edges 55 files 2 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Social Blade API in TypeScript

npm Discord


API Information

Our API allows you to take the power of the Social Blade website and integrate it directly into your internal systems.

You gain access to the same public statistical information that is on the website along with our toplists, rankings, and more as we keep expanding its features!

Install

# with npm
npm install --save socialblade

# with yarn
yarn add socialblade

Important: We do not force any fetch polyfills, If you're using an older version of node non-lts (v18) you may need a fetch polyfill.

Usage

Import the library into your project and construct a new client which will be used to access the API.

TypeScript

import SocialBlade, { YouTubeUser } from 'socialblade';

const client: SocialBlade = new SocialBlade(SOCIALBLADE_CLIENT_ID, SOCIALBLADE_ACCESS_TOKEN);

// Get a YouTube User
const sbUser: YouTubeUser = await client.youtube.user('socialblade');

ES6+

const SocialBlade = require("socialblade");

const client = new SocialBlade(SOCIALBLADE_CLIENT_ID, SOCIALBLADE_ACCESS_TOKEN);

// Get a YouTube User
client.youtube.user('socialblade').then(console.log);
Code Examples

Troubleshooting

If you find an issue with this library, feel free to open an issue here on GitHub, or submit a PR! 😀 If it's an issue with the API, open a support ticket.

Extension points exported contracts — how you extend this code

Options (Interface)
(no doc)
lib/interfaces/options.ts
Data (Interface)
(no doc)
lib/interfaces/matrix.shared.ts
Id (Interface)
(no doc)
lib/interfaces/matrix.shared.ts
ExtendedId (Interface)
(no doc)
lib/interfaces/matrix.shared.ts
Grade (Interface)
(no doc)
lib/interfaces/matrix.shared.ts

Core symbols most depended-on inside this repo

user
called by 12
lib/platform.ts
top
called by 8
lib/platform.ts
top
called by 1
examples/ts/youtube-top-500.ts
top
called by 1
examples/js/youtube-top-500.js
constructor
called by 0
lib/platform.ts
constructor
called by 0
lib/platform.ts
constructor
called by 0
lib/client.ts
constructor
called by 0
lib/matrix.ts

Shape

Interface 95
Class 8
Method 8
Function 2

Languages

TypeScript100%

Modules by API surface

lib/interfaces/matrix.shared.ts11 symbols
lib/platform.ts8 symbols
lib/interfaces/youtube/user.ts7 symbols
lib/interfaces/twitter/user.ts6 symbols
lib/matrix.ts5 symbols
lib/interfaces/youtube/shared.ts5 symbols
lib/interfaces/twitch/user.ts5 symbols
lib/interfaces/trovo/user.ts5 symbols
lib/interfaces/instagram/shared.ts5 symbols
lib/interfaces/dlive/user.ts5 symbols
lib/interfaces/twitter/shared.ts4 symbols
lib/interfaces/twitch/shared.ts4 symbols

For agents

$ claude mcp add socialblade-js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact