Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 days 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 (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-02T08:05:43.000Z (6 months ago)
- Last Synced: 2024-05-22T13:41:15.973Z (6 months ago)
- Topics: crawler, scraper, scraping, social, social-media, socialblade
- Language: JavaScript
- Homepage:
- Size: 1.03 MB
- Stars: 10
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Socialblade.com unofficial APIs
[![](https://github.com/davideviolante/socialblade-com-api/workflows/Node.js%20CI/badge.svg)](https://github.com/DavideViolante/socialblade-com-api/actions?query=workflow%3A"Node.js+CI") [![Maintainability](https://api.codeclimate.com/v1/badges/5cf562601140598e1f8a/maintainability)](https://codeclimate.com/github/DavideViolante/socialblade-com-api/maintainability) [![Donate](https://img.shields.io/badge/paypal-donate-179BD7.svg)](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/)