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-api-sdk

v0.2.0

Published

TikTok API SDK for Node.js & TypeScript. Typed client for the EulerStream TikTok API: user profiles, videos, OAuth, request signing and captcha solving, plus the full TikTok LIVE API for real-time chat, gifts, rooms, rankings, alerts and moderation.

Readme

TikTok API SDK for Node.js & TypeScript

npm version npm downloads License: MIT Discord

tiktok-api-sdk is the official Node.js / TypeScript client for the EulerStream TikTok API. Use one typed TikTok API client to look up TikTok users, videos, comments, sounds and hashtags, search TikTok, run TikTok OAuth, sign TikTok web requests and solve TikTok captchas. The complete TikTok LIVE API is included as well, so the same client can read real-time LIVE chat, gifts and viewer counts.

The TikTok API behind this SDK is hosted by EulerStream, the managed TikTok backend behind TikTokLive (Python) and TikTok-Live-Connector (Node.js). Request signing, captcha solving and the LIVE connection layer are maintained for you, so your integration keeps working when TikTok changes.

Unofficial: this project is not affiliated with, endorsed by, or connected to TikTok or ByteDance.

Only need TikTok LIVE? tiktok-live-api-sdk is the same client with just the LIVE groups.

Installation

npm install tiktok-api-sdk
# or
pnpm add tiktok-api-sdk
# or
yarn add tiktok-api-sdk

Requires Node.js 18+. Ships ESM with bundled TypeScript declarations.

TikTok API quick start

  1. Create a free EulerStream account (no credit card required)
  2. Copy your API key from the dashboard
  3. Make your first TikTok API calls:
import TikTokApiSdk from "tiktok-api-sdk";

const client = new TikTokApiSdk({ apiKey: "YOUR_API_KEY" });

// TikTok users API: look up any TikTok user by @username
const user = await client.tikTokUsers.retrieveTikTokUserBasic("tv_asahi_news");
console.log(user.data.user?.nickname);

// TikTok videos API: a creator's latest videos, newest first
const videos = await client.tikTokUsers.retrieveTikTokUserVideos("tv_asahi_news");
console.log(videos.data.videos?.length);

// TikTok LIVE API (included): list the hashtags LIVE streams are grouped under
const hashtags = await client.webcast.retrieveHashtagList();
console.log(hashtags.data.message);

Every method returns an Axios response (res.status, res.data, res.headers). The client defaults to https://api.eulerstream.com; pass basePath to override it.

What the TikTok API covers

The client exposes one typed property per API group. Each is generated from the EulerStream OpenAPI spec, so it always matches the live TikTok API.

| TikTok API | Property | Methods | |---|---|---| | TikTok users API | client.tikTokUsers | retrieveTikTokUserBasic, retrieveTikTokUserProfile, retrieveTikTokUserVideos, retrieveTikTokUserReposts, retrieveTikTokUserStories, retrieveTikTokUserPlaylists, retrieveTikTokPlaylistVideos, retrieveTikTokUserInfo, plus the users catalog (searchTikTokUsersCatalog, retrieveTikTokUsersCatalogUsername, retrieveTikTokUsersCatalogNumericId) | | TikTok videos API | client.tikTokVideos | retrieveTikTokVideoDetailed, retrieveTikTokVideoComments, retrieveTikTokVideoCommentReplies, retrieveTikTokVideoCaptions, retrieveTikTokVideoThumbnail | | TikTok search API | client.tikTokSearch | searchTikTokGeneral, searchTikTokVideos, searchTikTokUsers, searchTikTokPhotos, searchTikTokAutocomplete | | TikTok sounds API | client.tikTokSounds | retrieveTikTokSound, retrieveTikTokSoundVideos | | TikTok hashtags API | client.tikTokTags | retrieveTikTokTagVideos | | TikTok short links | client.tikTokLinks | resolveTikTokShortLink | | TikTok OAuth | client.tikTokOAuth | exchangeToken, introspectToken, revokeToken, validateRefreshToken, getUserInfo, getPublicClient | | TikTok request signing | client.signing | signTikTokUrl, plus decryptors for TikTok's encrypted payloads | | TikTok captcha solving | client.captchas | completePuzzleCaptcha, completeShapesCaptcha, completeIconCaptcha, completeWhirlCaptcha | | Your account | client.accounts / client.authentication / client.analytics | Account details, rate limits, API keys, JWTs and usage analytics |

Per-endpoint TypeScript examples for every TikTok API operation are in the EulerStream API docs.

TikTok LIVE API included

Everything in tiktok-live-api-sdk is part of this package too:

| Property | TikTok LIVE API group | |---|---| | client.webcast | Core TikTok LIVE: bulk live checks, webcast feed, hashtag lists, rankings | | client.anchors | LIVE creators: webcast URL by @username, room info / ID / cover, gift gallery, earnings, moderators, LIVE analytics | | client.rooms | LIVE rooms: webcast URL by room ID, room info, room gifts, send chat | | client.tikTokLiveEvents | TikTok LIVE event history for a creator | | client.gifts | TikTok LIVE gifts: the gift list, the gift catalog, search and single-gift lookup | | client.rankings | LIVE creator leaderboards, rankings and ranking history | | client.agencies | TikTok LIVE agency catalog | | client.alerts / client.alertTargets | TikTok LIVE start/end alerts and webhook targets | | client.moderation | LIVE kicks, bans, mutes, sensitive words and comment toggles | | client.tikTokWebSocketAPI | Your cloud WebSocket connections and their state |

What you can build with the TikTok API

  • Creator lookups and profile tools backed by TikTok user profiles, a creator's videos, reposts, stories and playlists, and the users catalog
  • Video tools that fetch TikTok video details, comments, replies, captions and thumbnails by ID
  • Search and discovery across TikTok videos, users and photos, plus the videos under a hashtag or a sound
  • "Sign in with TikTok" flows using the OAuth token, introspection and revocation routes
  • Scrapers and data pipelines that sign TikTok web requests through the API instead of maintaining signature code
  • Captcha handling for your own TikTok automation: puzzle, shapes, icon and whirl solvers
  • Everything TikTok LIVE: stream overlays, gift alerts, chat bots, moderation tools and LIVE monitoring

Migrating

Coming from tiktok-live-api-sdk 0.8 or earlier, or from @eulerstream/euler-api-sdk? This package is the same client with everything it had, so migrating is a package name change:

npm uninstall tiktok-live-api-sdk
npm install tiktok-api-sdk

Then point your imports at tiktok-api-sdk. The client class is now called TikTokApiSdk. The old name, EulerStreamApiClient, is still exported and still works, but it is deprecated and will be removed in a future major version. Default imports are unaffected, whatever you named them.

Other languages

The TikTok API SDK is also available for Python, C# / .NET, Java and Go, and anything else can call the TikTok API over plain HTTP.

Links

License

MIT © EulerStream