TikTok LIVE API

There is no official TikTok LIVE API. TikTools is a managed alternative - connect to any live stream and receive real-time chat, gifts, viewers via WebSocket. Connection upkeep and authentication handled for you. No reverse engineering needed.

Get API KeyGet an API key
Docsfor Developers

Gaming Ranks

NEW · AGENCY EXCLUSIVE
Top 5 now - United States GamingFull board
Real-timeEvent delivery
7 daysEvaluation

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:

1

Your App Connects

Your app opens a WebSocket to wss://api.tik.tools with a TikTok username and your API key.

2

TikTools Resolves

TikTools resolves the room ID, handles authentication, solves challenges, and joins the live stream.

3

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/live

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

Connect 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 automatically

Prefer 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_KEY

Every 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:

chat

Chat message from a viewer. Includes user info, comment text, emotes, and badges.

gift

Virtual gift sent by a viewer. Includes gift name, diamond value, repeat count, and combo status.

like

A viewer liked the stream. Includes per-event count and total likes.

member

A viewer joined the live room. Fires when users enter the stream.

follow

A viewer followed the streamer during the live stream.

share

A viewer shared the live stream with their friends.

subscribe

A viewer subscribed to the streamer.

roomUserSeq

Viewer count update. Current viewer count and top viewers list.

battle

Battle/LinkMic event. Battle status, teams, scores, and participants.

battleArmies

Battle armies update with team scores and participant rankings.

roomPin

A chat message was pinned or starred by the streamer.

caption

TikTok native auto-captions for the stream, one caption window per frame.

envelope

Treasure chest or envelope event in the stream.

emote

Custom emote sent in chat by a viewer.

liveIntro

Stream intro update - title and description changes.

streamEnd

The live stream has ended. Includes the reason code.

connected

Successfully connected to the TikTok live stream.

error

Connection 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.

See more use cases →

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.

TierWebSocketRESTPrice
Sandbox3 concurrent (50/24h)5,000/daySandbox Tier
Pro50 concurrent75,000/day$15/week
Ultra250 concurrent300,000/day$45/week
Agency Global500 + Firehose1,000,000/day$119/week

Frequently Asked Questions

Is there a public API for live stream data?

Is the TikTok LIVE API free?

What programming languages does the TikTok LIVE API support?

How is TikTools different from open-source live stream libraries?

What data can I get from TikTok LIVE streams?

What is the latency?

Can I build a TikTok LIVE chat assistant?

How many streams can I monitor simultaneously?

How does TikTools compare to Euler Stream?

Is TikTools better than TikFinity for developers?

Can I use TikTok LIVE API for stream analytics?

Does the TikTok LIVE API work with OBS and Streamlabs?