tiktok-live-api 1.4.0 โ†’ 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +16 -17
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -66,14 +66,14 @@ That's it. **No complex setup, no protobuf, no reverse engineering, no breakages
66
66
 
67
67
  ---
68
68
 
69
- ## ๐Ÿš€ Try It Now โ€” 5-Minute Live Demo
69
+ ## ๐Ÿš€ Try It Now โ€” Live Demo
70
70
 
71
- Copy-paste this into a file and run it. Connects to a live TikTok stream, prints every event for 5 minutes, then exits. Works on the free Sandbox tier.
71
+ Copy-paste this into a file and run it. Connects to a live TikTok stream and prints every event in real time. Works on the free Community tier โ€” 2 hours per WebSocket connection.
72
72
 
73
73
  **Save as `demo.mjs` and run with `node demo.mjs`:**
74
74
 
75
75
  ```javascript
76
- // demo.mjs โ€” TikTok LIVE in 5 minutes
76
+ // demo.mjs โ€” TikTok LIVE in real time
77
77
  // npm install tiktok-live-api
78
78
  import { TikTokLive } from 'tiktok-live-api';
79
79
 
@@ -90,11 +90,11 @@ client.on('member', e => { events++; console.log(`๐Ÿ‘‹ ${e.user.uniqueId} j
90
90
  client.on('follow', e => { events++; console.log(`โž• ${e.user.uniqueId} followed`); });
91
91
  client.on('roomUserSeq', e => { events++; console.log(`๐Ÿ‘€ Viewers: ${e.viewerCount}`); });
92
92
 
93
- client.on('connected', () => console.log(`\nโœ… Connected to @${LIVE_USERNAME} โ€” listening for 5 min...\n`));
94
- client.on('disconnected', () => console.log(`\n๐Ÿ“Š Done! Received ${events} events.\n`));
93
+ client.on('connected', () => console.log(`\nโœ… Connected to @${LIVE_USERNAME} โ€” streaming events...\n`));
94
+ client.on('disconnected', () => console.log(`\n๐Ÿ“Š Disconnected. Received ${events} events.\n`));
95
95
 
96
96
  client.connect();
97
- setTimeout(() => { client.disconnect(); }, 300_000);
97
+ // Press Ctrl+C to stop. Community tier caps each WebSocket at 2 hours.
98
98
  ```
99
99
 
100
100
  <details>
@@ -111,7 +111,7 @@ const LIVE_USERNAME = 'tv_asahi_news';
111
111
  const ws = new WebSocket(`wss://api.tik.tools?uniqueId=${LIVE_USERNAME}&apiKey=${API_KEY}`);
112
112
  let events = 0;
113
113
 
114
- ws.on('open', () => console.log(`\nโœ… Connected to @${LIVE_USERNAME} โ€” listening for 5 min...\n`));
114
+ ws.on('open', () => console.log(`\nโœ… Connected to @${LIVE_USERNAME} โ€” streaming events...\n`));
115
115
  ws.on('message', (raw) => {
116
116
  const msg = JSON.parse(raw);
117
117
  events++;
@@ -127,9 +127,8 @@ ws.on('message', (raw) => {
127
127
  default: console.log(`๐Ÿ“ฆ ${msg.event}`); break;
128
128
  }
129
129
  });
130
- ws.on('close', () => console.log(`\n๐Ÿ“Š Done! Received ${events} events.\n`));
131
-
132
- setTimeout(() => ws.close(), 300_000);
130
+ ws.on('close', () => console.log(`\n๐Ÿ“Š Disconnected. Received ${events} events.\n`));
131
+ // Press Ctrl+C to stop. Community tier caps each WebSocket at 2 hours.
133
132
  ```
134
133
 
135
134
  </details>
@@ -152,7 +151,7 @@ client.connect();
152
151
  2. Sign up (no credit card required)
153
152
  3. Copy your API key
154
153
 
155
- The free Sandbox tier gives you 50 requests/day and 1 WebSocket connection.
154
+ The free **Community** tier gives you 2,500 requests/day and 15 WebSocket connections (2 hours per connection). Forever free.
156
155
 
157
156
  ## Environment Variable
158
157
 
@@ -372,21 +371,21 @@ client.on('gift', (event: GiftEvent) => {
372
371
  | **Maintenance** | โœ“ Zero โ€” we handle it | โœ— You fix breakages | โœ— You fix breakages |
373
372
  | **CAPTCHA Solving** | โœ“ Built-in (Pro+) | โœ— | โœ— |
374
373
  | **Feed Discovery** | โœ“ See who's live | โœ— | โœ— |
375
- | **Free Tier** | โœ“ 50 requests/day | โœ“ Free (unreliable) | โœ“ Free (unreliable) |
374
+ | **Free Tier** | โœ“ 2,500 req/day, 15 WS, 2h per WS | โœ“ Free (unreliable) | โœ“ Free (unreliable) |
376
375
  | **ESM + CJS** | โœ“ Both supported | โœ“ | N/A |
377
376
 
378
377
  ## Pricing
379
378
 
380
379
  | Tier | Requests/Day | WebSocket Connections | Price |
381
380
  |------|-------------|----------------------|-------|
382
- | Community | 2,500 | 15 (no time limit) | Free forever |
383
- | Pro | 75,000 | 50 (8h) | from $59/mo +tax |
384
- | Ultra | 300,000 | 250 (8h) | from $219/mo +tax |
385
- | **Global Agency** | 300,000 | 500 (8h) + Firehose | $549/mo +tax |
381
+ | Community | 2,500 | 15 (2h per WS) | Free forever |
382
+ | Pro | 75,000 | 50 (8h per WS) | from $59/mo +tax |
383
+ | Ultra | 300,000 | 250 (8h per WS) | from $219/mo +tax |
384
+ | **Global Agency** | 300,000 | 500 (8h per WS) + Firehose | $549/mo +tax |
386
385
 
387
386
  Full plan details at [tik.tools/pricing](https://tik.tools/pricing). Highlights:
388
387
 
389
- - **Community** ($0 forever): 2,500 req/day ยท 15 WS ยท no time limit ยท masked leaderboards. Designed for devs building apps โ€” upgrade when you need real usernames. No datacenter proxies; calls must come from your own IP.
388
+ - **Community** ($0 forever): 2,500 req/day ยท 15 WS ยท 2 hours per connection ยท masked leaderboards. Designed for devs building apps โ€” upgrade when you need real usernames. No datacenter proxies; calls must come from your own IP.
390
389
  - **Pro** (monthly): 75K req/day ยท 50 WS ยท unmasked leaderboards ยท CAPTCHA Solver ยท Feed Discovery ยท 5 AI caption streams ยท priority routing ยท chat support
391
390
  - **Ultra** (monthly): 300K req/day ยท 250 WS ยท 20 AI caption streams ยท **League Rankings API** unmasked ยท 99.5% uptime SLA ยท priority chat support
392
391
  - **Global Agency** ($549/mo): Everything in Ultra + **Live Gifter Firehose WS** (region/league/global filters, min-diamond threshold) + VIP Telegram alerts + VIP Web Vault (unmasked historical visual access)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiktok-live-api",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Unofficial TikTok LIVE API Client โ€” Real-time chat, gifts, viewers, battles, and AI live captions from any TikTok livestream. Managed WebSocket API with 99.9% uptime.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",