- Get author metrics such as likes, followers etc.
- Get video metrics such as likes, shares, comments etc.
npm install nirs-tiktok-metrics-api
-
author_name
- author name from account url (https://www.tiktok.com/@author_name
) -
video_id
- video id from video url (https://www.tiktok.com/@author_name
/video/video_id
)
const tiktok = require('nirs-tiktok-metrics-api');
tiktok.author('author_name')
.then(authorStats=>console.log(authorStats));
const tiktok = require('nirs-tiktok-metrics-api');
tiktok.video('author_name','video_id')
.then(videoStats=>console.log(videoStats));
{
message: "{'followerCount': 1400000, 'followingCount': 246, 'heart': 47800000, 'heartCount': 47800000, 'videoCount': 1276, 'diggCount': 6632}",
status: 200
}
{
message: "{'diggCount': 16500, 'shareCount': 36, 'commentCount': 161, 'playCount': 199500}",
status: 200
}
NOTE: The package relies on fetch calls to my tiktok api app hosted on heroku (currently a private repo)