https://github.com/DavideViolante/socialblade-com-api
Unofficial APIs for socialblade.com website.
https://github.com/DavideViolante/socialblade-com-api
crawler scraper scraping social social-media socialblade
Last synced: 12 months ago
JSON representation
Unofficial APIs for socialblade.com website.
- Host: GitHub
- URL: https://github.com/DavideViolante/socialblade-com-api
- Owner: DavideViolante
- License: mit
- Created: 2020-05-26T13:10:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-01-01T14:20:06.000Z (over 1 year ago)
- Last Synced: 2025-06-17T22:39:23.115Z (about 1 year ago)
- Topics: crawler, scraper, scraping, social, social-media, socialblade
- Language: JavaScript
- Homepage:
- Size: 872 KB
- Stars: 17
- Watchers: 3
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Socialblade.com unofficial APIs
[](https://github.com/DavideViolante/socialblade-com-api/actions?query=workflow%3A"Node.js+CI") [](https://codeclimate.com/github/DavideViolante/socialblade-com-api/maintainability) [](https://www.paypal.me/dviolante)
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](https://github.com/DavideViolante/socialblade-com-api/blob/master/functions.js#L4).
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
```js
const { socialblade } = require('socialblade-com-api')
async function main () {
try {
const response1 = await socialblade('twitter', 'barackobama')
const response2 = await socialblade('instagram', 'barackobama', '')
} catch (err) {
console.error(err)
}
}
```
### Example response
```js
{
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
- [Davide Violante](https://github.com/DavideViolante/)