What Is the TikTok LIVE API?
TikTok does not offer a public API for live stream data like chat, gifts, or viewer counts. The TikTok Business API only covers ads and shop analytics. To access real-time LIVE data, developers use third-party APIs.
The open-source libraries tiktok-live-connector (Node.js) and TikTokLive (Python) are MIT-licensed and free to use. They delegate TikTok signing to a backend; the default is Euler Stream.
TikTools is an independent alternative with its own signing infrastructure. It's a fully managed API: connection upkeep and authentication are handled on our side. One WebSocket connection delivers 90+ event types - chat, gifts, likes, follows, viewers, battles, and more. Official SDKs for Node.js and Python. Sandbox tier, no credit card required.
How Does the TikTok LIVE API Work?
TikTools sits between your application and TikTok's live streaming infrastructure. Here's the architecture:
Your App Connects
Your app opens a WebSocket to wss://api.tik.tools with a TikTok username and your API key.
TikTools Resolves
TikTools resolves the room ID, handles authentication, solves challenges, and joins the live stream.
Events Flow
Real-time events (chat, gifts, viewers, etc.) stream to your app as clean JSON - parsed, structured, and typed.
You never deal with TikTok's protocol directly. When TikTok changes their internal systems (which happens frequently), TikTools adapts - your code keeps working unchanged.
Quick Start - Node.js / TypeScript
Install the official SDK from npm:
npm install @tiktool/liveConnect to a live stream and receive events:
import { TikTokLive } from '@tiktool/live';
const client = new TikTokLive({
uniqueId: 'streamer_username',
apiKey: 'YOUR_API_KEY' // Evaluation key: https://tik.tools/pricing
});
client.on('chat', (event) => {
console.log(`${event.user.uniqueId}: ${event.comment}`);
});
client.on('gift', (event) => {
console.log(`${event.user.uniqueId} sent ${event.giftName} (${event.diamondCount} diamonds)`);
});
client.on('roomUserSeq', (event) => {
console.log(`${event.viewerCount} viewers watching`);
});
client.connect();Full TypeScript support - every event type, field, and parameter is fully typed with autocompletion in your IDE. Read the complete Node.js guide →
Quick Start - Python
Install from PyPI:
pip install tiktok-live-apiConnect with the SDK and register handlers with decorators:
from tiktok_live_api import TikTokLive
client = TikTokLive("streamer_username", api_key="YOUR_API_KEY") # Evaluation key: https://tik.tools/pricing
@client.on("chat")
def on_chat(event):
print(f"{event['user']['uniqueId']}: {event['comment']}")
@client.on("gift")
def on_gift(event):
print(f"{event['user']['uniqueId']} sent {event['giftName']} ({event['diamondCount']} diamonds)")
@client.on("roomUserSeq")
def on_viewers(event):
print(f"{event['viewerCount']} viewers watching")
client.run() # blocks; reconnects automaticallyPrefer asyncio? await client.connect() runs the same client inside your own event loop. The key can also come from the TIKTOOL_API_KEY environment variable.
Read the complete Python guide →
Quick Start - Raw WebSocket (Any Language)
Any language with WebSocket support works - Go, Rust, Java, C#, Ruby, PHP, Dart, Kotlin, Swift. Just connect to:
wss://api.tik.tools?uniqueId=TIKTOK_USERNAME&apiKey=YOUR_API_KEYEvery message is a JSON object with event and data fields. Clean, structured data - no binary parsing needed. Full WebSocket API reference →
All Event Types
The TikTok LIVE API streams 90+ real-time event types from any live stream:
chatChat message from a viewer. Includes user info, comment text, emotes, and badges.
giftVirtual gift sent by a viewer. Includes gift name, diamond value, repeat count, and combo status.
likeA viewer liked the stream. Includes per-event count and total likes.
memberA viewer joined the live room. Fires when users enter the stream.
followA viewer followed the streamer during the live stream.
shareA viewer shared the live stream with their friends.
subscribeA viewer subscribed to the streamer.
roomUserSeqViewer count update. Current viewer count and top viewers list.
battleBattle/LinkMic event. Battle status, teams, scores, and participants.
battleArmiesBattle armies update with team scores and participant rankings.
roomPinA chat message was pinned or starred by the streamer.
captionTikTok native auto-captions for the stream, one caption window per frame.
envelopeTreasure chest or envelope event in the stream.
emoteCustom emote sent in chat by a viewer.
liveIntroStream intro update - title and description changes.
streamEndThe live stream has ended. Includes the reason code.
connectedSuccessfully connected to the TikTok live stream.
errorConnection error occurred. Includes error details.
See full event reference with example payloads →
What Can You Build?
Chat Assistants
Build automated chat assistants that respond to viewer messages, commands, and gifts in real-time.
Analytics
Track viewer counts, engagement rates, gift revenue, and chat activity across streams.
Interactive Games
Let viewers control game elements with gifts, chat commands, and likes.
Stream Overlays
Create OBS/Streamlabs overlays showing chat, gift alerts, and viewer stats.
Creator Scouting
Follow creator rankings, top gifters, and league standings to find and grow talent.
Mobile Apps
Build mobile apps that monitor and interact with TikTok LIVE streams.
How TikTools compares with Euler Stream and open-source clients
The open-source tiktok-live-connector (Node.js) and TikTokLive (Python) libraries are free clients that rely on a signing backend, by default Euler Stream. TikTools is an independent managed API with its own infrastructure. The comparison pages list dated, sourced figures for prices, request limits, event formats and connection lifetimes.
Pricing & 7-day evaluation
Start with a 7-day evaluation key, no credit card. Then pick a paid plan for production.


