Connect to any live broadcast and receive every chat message, gift, like, follow, viewer count, and battle event as JSON over WebSocket. SDKs for Node.js and Python. Works from any language.
import { TikTokLive } from 'tiktok-live-api'; const client = new TikTokLive('username', { apiKey: 'YOUR_API_KEY' }); client.on('chat', e => { console.log(`${e.user.uniqueId}: ${e.comment}`); }); client.on('gift', e => { console.log(`${e.giftName} x${e.repeatCount}`); }); client.connect();
Works in Node.js 18+, Bun, and Deno. TypeScript types included. Zero dependencies beyond
ws.
Python 3.8+. Async-first with websockets. Or use the raw WebSocket URL from any
language.
chat
Messages, emotes, user info
gift
Gifts, diamond values, streaks
like
Likes with running total
follow
New followers during stream
member
Viewer join events
share
Stream share events
roomUserSeq
Live viewer count
battle
Battle scores, teams
caption
AI speech-to-text
subscribe
Subscriber alerts
roomPin
Pinned messages
envelope
Treasure chest events
| TikTok Live API (TikTool) | TikTokLive (Python) | tiktok-live-connector | Euler Stream | |
|---|---|---|---|---|
| Stability | 99.9% uptime SLA | Breaks on updates | Unmaintained | Managed |
| Node.js SDK | ✓ tiktok-live-api | Python only | ✓ Outdated | No SDK |
| Python SDK | ✓ tiktok-live-api | ✓ | Node only | No SDK |
| Any language | ✓ Raw WebSocket | Python only | Node only | ✓ |
| AI Captions | ✓ Built-in | No | No | No |
| CAPTCHA handling | ✓ Auto-solved | Manual | None | ✓ |
| Free tier | ✓ No credit card | Free but breaks | Broken | Paid only |
No. TikTok does not provide any public API for live stream events. This API reverse-engineers the internal WebCast protocol and delivers events through a clean WebSocket interface. All protocol maintenance is handled on the server. Your integration never breaks.
Yes. The free Sandbox tier includes 1 WebSocket connection and 50 REST API calls per day. No credit card required. You can also test instantly with the public demo key on this page. No signup needed.
Official SDKs for Node.js (npm install tiktok-live-api) and Python
(pip install tiktok-live-api). The raw WebSocket works with any language that
supports WebSocket: Go, Rust, Java, C#, Ruby, PHP, Dart, Kotlin, Swift.
Those libraries connect directly to TikTok's internal protobuf protocol. They break every time TikTok pushes an update. This is a managed API. Protocol changes, CAPTCHA challenges, and room authentication are all handled on the server. Your code stays stable.
18+ real-time event types: chat messages, virtual gifts with diamond values, likes, follows, shares, viewer counts, battle scores, subscriber alerts, pinned messages, stream status changes, and AI-powered live captions with speaker identification and translation into 50+ languages.
Under 50 milliseconds. Events are delivered within 50ms of occurring on TikTok. Designed for real-time applications: live overlays, interactive games, chat bots, analytics dashboards.
Free tier. No credit card. Start receiving live events immediately.