Quick Start Guide

Getting Started with TikTok Live API

Connect to any TikTok LIVE stream and receive real-time data in under 30 seconds. Free Sandbox tier — no credit card required.

tiktok.com/@
Stream offlineEnter a live TikTok username above
Connecting to @ live
Offline
Live Stream Monitor
@
<50msLatency
99.9%Uptime
FreeTo Test
1

Get Your Free API Key

Sign up at tik.tools/login with your Google account. Your free API key is generated instantly — no credit card, no approval process.

The Sandbox tier includes 50 requests/day and 1 WebSocket connection (60s limit). Upgrade to Basic ($7/week) for 10,000 requests/day and 3 WebSocket connections.

2

Install the SDK

Install the TikTool Live SDK from npm. Works with Node.js, Bun, and Deno.

npm install @tiktool/live
3

Connect to a Live Stream

Use the SDK to connect to any TikTok user who is currently live streaming:

import { TikTokLive } from '@tiktool/live'

const client = new TikTokLive({
  uniqueId: 'tv_asahi_news',   // TikTok username (without @)
  apiKey: process.env.TIKTOOL_API_KEY
})

// Listen for chat messages
client.on('chat', (event) => {
  console.log(`[CHAT] ${event.nickname}: ${event.comment}`)
})

// Listen for gifts
client.on('gift', (event) => {
  console.log(`[GIFT] ${event.nickname} sent ${event.giftName}`)
})

// Listen for viewer count updates
client.on('viewer_count', (event) => {
  console.log(`[VIEWERS] ${event.viewerCount} watching`)
})

// Connect
await client.connect()
console.log('Connected! Listening for events...')
4

Run It

Save as app.mjs and run:

TIKTOOL_API_KEY=your_key_here node app.mjs

You'll see live events flowing in your terminal within seconds:

[CHAT] john_doe: Hello everyone! 👋
[GIFT] cool_user sent Rose (1 diamonds)
[VIEWERS] 1,247 watching
[CHAT] fan_123: Love this stream!
[GIFT] big_spender sent Universe (34,000 diamonds)
5

Alternative: Raw WebSocket

Don't want to use the SDK? Connect directly via WebSocket from any language:

// WebSocket URL format:
wss://api.tik.tools?uniqueId=USERNAME&apiKey=YOUR_KEY

// Every message is a JSON object:
{
  "event": "chat",
  "data": {
    "comment": "Hello!",
    "user": {
      "uniqueId": "john_doe",
      "nickname": "John",
      "profilePictureUrl": "..."
    }
  }
}

Works with Python, Go, Rust, Java, C#, Ruby — any language with WebSocket support.