npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tiktok-hks

v1.0.4

Published

Full API Tiktok Data - JavaScript Version by HKS

Readme

Tiktok Api Full Data By TikWM - JavaScript Version (tiktok-hks)

  • Download video no watermark
  • Get trending video
  • Get info video
  • Get info user
  • Get info music
  • Get info hashtag
  • Search hashtag,video,music,..
  • And more...

Details about API in src/Tiktok.js, you can get endpoint and customize it. Do not update this package only if the api is changed

Installation

Install the package with npm:

npm install tiktok-hks

Or with yarn:

yarn add tiktok-hks

Dependencies

This package requires:

  • axios for HTTP requests
  • lodash for utility functions

Usage

Using the main class directly:

const { Tiktok } = require('tiktok-hks');
// or
const Tiktok = require('tiktok-hks').default;

// Create instance with default axios
const tiktok = new Tiktok();

// Get user info
async function getUserInfo() {
    try {
        const userInfo = await tiktok.getUserInfo('GET', 'huykaiser.it');
        console.log(userInfo);
    } catch (error) {
        console.error(error);
    }
}

getUserInfo();

Using the Service Provider:

const { TiktokApiServiceProvider } = require('tiktok-hks');

// Create service provider instance
const serviceProvider = new TiktokApiServiceProvider();
const tiktokApi = serviceProvider.register();

// Use the API
async function example() {
    const userInfo = await tiktokApi.getUserInfo('GET', 'huykaiser.it');
    console.log(userInfo);
}

example();

Using the Facade (Static methods):

const { TiktokApiFacade } = require('tiktok-hks');

// Use static methods
async function example() {
    const userInfo = await TiktokApiFacade.getUserInfo('GET', 'huykaiser.it');
    console.log(userInfo);
}

example();

API Methods

All methods are async and return Promises:

Video Methods

  • getTrendingVideo(method, region, count) - Get trending videos
  • getVideoByHashTag(method, challenge_id, count, cursor) - Get videos by hashtag
  • getVideoByKeyword(method, keyword, count, cursor) - Search videos by keyword
  • getVideosByUser(method, unique_id, count, cursor) - Get user's videos
  • getVideosByMusicId(method, music_id, count, cursor) - Get videos by music ID
  • getVideoNoWaterMark(method, tiktok_url, hd) - Download video without watermark

User Methods

  • getSimilarUsers(method, unique_id, count) - Get similar users
  • getUserInfo(method, unique_id) - Get Info users
  • getUserLiked(method, unique_id, count, cursor) - Get user's liked videos
  • getUserFollowing(method, user_id, count, time, cursor) - Get user's following list
  • getUserFollowers(method, user_id, count, time, cursor) - Get user's followers list

HashTag Methods

  • getHashTagDetail(method, challenge_name) - Get hashtag details
  • getHashTagBYKeyword(method, keyword, count, cursor) - Search hashtags

Other Methods

  • getCommentsVideo(method, video_url, count, cursor) - Get video comments
  • getRegions(method) - Get available regions
  • getMusicDetail(method, music_url) - Get music details

Example Response

// getUserInfo response example:
{
  user: {
    id: '6818563029089682434',
    uniqueId: 'huykaiser.it',
    nickname: 'HuyKaiser',
    avatarThumb: 'https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/407836f4f406fc4a5324fc79231fa7e1~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=f7078260&x-expires=1754647200&x-signature=uGErzLG4XUsifpehyWdkOqn2bcM%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=2472a6c6&idc=maliva',
    avatarMedium: 'https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/407836f4f406fc4a5324fc79231fa7e1~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=cee7318b&x-expires=1754647200&x-signature=KT3RL0p5Eb8Aiix1NXhTpyVQtac%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=2472a6c6&idc=maliva',
    avatarLarger: 'https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/407836f4f406fc4a5324fc79231fa7e1~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=8d1c9c1b&x-expires=1754647200&x-signature=B4nZCFgJi0scfyLdickUuGmgWVY%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=2472a6c6&idc=maliva',
    signature: 'HuyKaiser',
    verified: false,
    secUid: 'MS4wLjABAAAA0g1V9SC5clkjxEpwiQ9hzo-zRdSzub5vYq4aHhfIVOIqHjxfM7IrRw_-Qz5a6AqM',
    secret: false,
    ftc: false,
    relation: 0,
    openFavorite: true,
    commentSetting: null,
    duetSetting: null,
    stitchSetting: null,
    privateAccount: false,
    isADVirtual: false,
    isUnderAge18: false,
    ins_id: '',
    twitter_id: '',
    youtube_channel_title: '',
    youtube_channel_id: '',
    bio_email: '[email protected]'
  },
  stats: {
    followingCount: 9353,
    followerCount: 1183,
    heartCount: 159,
    videoCount: 6,
    diggCount: 33223,
    heart: 159
  }
}

Rate Limits

Please be aware of the API rate limits:

  • Most endpoints: 1 request per 10 seconds
  • Some endpoints: 1 request per 1 second
  • User following/followers: max 50 count per request

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see the LICENSE file for details.

Author

Nguyễn Văn Huy (HuyKaiser)

Support

If you find this package helpful, please consider giving it a ⭐ on GitHub!