tiktok-stats

This package gives you the statistics of which user tiktok !

Usage no npm install needed!

<script type="module">
  import tiktokStats from 'https://cdn.skypack.dev/tiktok-stats';
</script>

README

tiktok-stats

This package gives you the statistics of which user tiktok !

downloadsBadge versionBadge

Installation

Use the package manager npm to install tiktok-stats.

npm i tiktok-stats

Usage

const tiktokStats = require("tiktok-stats");
const stats = await new tiktokStats.Stats("account").getStats();
console.log(stats) // Return all accounts informations

Return

Exemple of return :

{
  "user": {
    "username": "Pioupia",
    "profileName": "pioupia_dev",
    "avatar": "https://p77-sign-sg.tiktokcdn.com/aweme/720x720/tos-alisg-avt-0068/f8ca5ba97d27cb3f90c02afc140bc7db.jpeg?x-expires=1605636000&x-signature=0awvFhUVv82Kj%2BZtDEG%2B8WKYAYw%3D",
    "description": "Développeur de site web & de bots Discord.",
    "certified": false
  },
  "stats": { "following": 2, "follower": 1, "like": 29 }
}

If the user does not exist, package return :

{
  "code": 404,
  "error": "This account cannot be found"
}

or

{
  "code": 429,
  "error": "The page cannot load."
}

This error appears because tiktok blocks when they receive too many requests.

Last patch

Patch error for any account and account not found.

Credits

Made by Pioupia with ❤️

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT