Real-time data from any TikTok live stream

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.

demo.mjs
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();
See it working. Right now.
This connects to a real TikTok live stream using the public demo key. No signup, no install. Watch real events stream in below.
Ready
Click "Connect to live stream" to see real TikTok events appear here.
Events: 0 Stream: - Viewers: - Key: demo_tiktokliveapi_public_2026
Install and connect in 30 seconds
The SDK handles WebSocket connections, reconnection, and event parsing. You write the business logic.
Node.js
npm install tiktok-live-api copy

Works in Node.js 18+, Bun, and Deno. TypeScript types included. Zero dependencies beyond ws.

Python
pip install tiktok-live-api copy

Python 3.8+. Async-first with websockets. Or use the raw WebSocket URL from any language.

18+ real-time event types
Every event from a TikTok live stream, delivered as clean JSON.
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

View full event reference with payload schemas →

Direct-protocol libraries break. Managed APIs don't.
TikTok updates their internal protocol regularly. Libraries that connect directly break every time. A managed API doesn't.
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
Start free. Scale when you need to.
No contracts. Cancel anytime. All plans include full API access.
Sandbox
Free
forever
1 WebSocket
50 REST calls/day
No credit card
Basic
$7
/week
3 WebSockets
60 REST/min
8-hour sessions
Pro
$15
/week
50 WebSockets
Unlimited REST
Auto CAPTCHA
Ultra
$45
/week
500 WebSockets
Unlimited REST
Priority support

Full plan comparison →

Common questions
Does TikTok have an official live stream API?

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.

Is this free to use?

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.

What languages are supported?

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.

How is this different from TikTokLive or tiktok-live-connector?

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.

What data can I access?

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.

What is the latency?

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.

Get your API key in 30 seconds

Free tier. No credit card. Start receiving live events immediately.

Sign up free → Read the docs