tiktok-live-api 1.3.1 → 1.4.0

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 (3) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +27 -9
  3. package/package.json +84 -84
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 TikTool
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 TikTool
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -12,7 +12,6 @@
12
12
  [![npm downloads](https://img.shields.io/npm/dm/tiktok-live-api)](https://www.npmjs.com/package/tiktok-live-api)
13
13
  [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue)](https://www.typescriptlang.org/)
14
14
  [![License](https://img.shields.io/npm/l/tiktok-live-api)](https://github.com/tiktool/tiktok-live-api/blob/main/LICENSE)
15
- [![Discord](https://img.shields.io/discord/1482387222912172159?logo=discord&label=Discord&color=5865F2)](https://discord.gg/y8TwuFBAmD)
16
15
 
17
16
  <p align="center">
18
17
  <img src="https://raw.githubusercontent.com/tiktool/tiktok-live-api/main/tiktok-live-api.gif" alt="TikTok Live API Demo — real-time chat, gifts, and viewer events" width="700">
@@ -380,17 +379,36 @@ client.on('gift', (event: GiftEvent) => {
380
379
 
381
380
  | Tier | Requests/Day | WebSocket Connections | Price |
382
381
  |------|-------------|----------------------|-------|
383
- | Sandbox | 50 | 1 (5 min) | Free |
384
- | Basic | 10,000 | 3 (8h) | $9/wk +tax |
385
- | Pro | 75,000 | 50 (8h) | $19/wk +tax |
386
- | Ultra | 300,000 | 250 (8h) | $58/wk +tax |
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 |
387
386
 
388
387
  Full plan details at [tik.tools/pricing](https://tik.tools/pricing). Highlights:
389
388
 
390
- - **Sandbox** ($0): 50 req/day · 1 WS (5 min limit) · basic endpoints · signatures included
391
- - **Basic** ($9/wk): 10K req/day · 3 WS · all endpoints · 1 AI caption stream
392
- - **Pro** ($19/wk, **most popular**): 75K req/day · 50 WS · all endpoints · 5 AI caption streams · priority routing · chat support
393
- - **Ultra** ($58/wk): 300K req/day · 250 WS · 20 AI caption streams · **League Rankings API** (Ultra only) · 99.5% uptime SLA · priority chat support
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.
390
+ - **Pro** (monthly): 75K req/day · 50 WS · unmasked leaderboards · CAPTCHA Solver · Feed Discovery · 5 AI caption streams · priority routing · chat support
391
+ - **Ultra** (monthly): 300K req/day · 250 WS · 20 AI caption streams · **League Rankings API** unmasked · 99.5% uptime SLA · priority chat support
392
+ - **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)
393
+
394
+ ### Live Gifter Firehose — Global Agency
395
+
396
+ Real-time gift event stream from our Dragonfly fan-out. Filter by region, league, or globally; cap by minimum diamond threshold. Mid-stream filter updates supported via `update_filter` frame, no reconnect needed.
397
+
398
+ ```js
399
+ const ws = new WebSocket(
400
+ `wss://api.tik.tools/firehose/gifters?apiKey=${KEY}&mode=region&region=US%2B&min_diamonds=1000`
401
+ )
402
+ ws.on('message', (raw) => {
403
+ const evt = JSON.parse(raw)
404
+ // evt: { type:'gifter_alert', ts, gifter:{username,displayName,isAnonymous},
405
+ // creator:{uniqueId}, gift:{name,totalDiamonds}, region }
406
+ })
407
+ // Update filter without reconnect
408
+ ws.send(JSON.stringify({ type: 'update_filter', mode: 'global', min_diamonds: 5000 }))
409
+ ```
410
+
411
+ Modes: `global` (all regions), `region` (single region code), `league` (region + league class, e.g. `B2`).
394
412
 
395
413
  ## Also Available
396
414
 
package/package.json CHANGED
@@ -1,84 +1,84 @@
1
- {
2
- "name": "tiktok-live-api",
3
- "version": "1.3.1",
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
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.js"
13
- }
14
- },
15
- "files": [
16
- "dist",
17
- "README.md",
18
- "LICENSE"
19
- ],
20
- "scripts": {
21
- "build": "tsup src/index.ts --format cjs,esm --dts --clean",
22
- "prepublishOnly": "npm run build"
23
- },
24
- "keywords": [
25
- "tiktok",
26
- "tiktok-live",
27
- "tiktok-api",
28
- "tiktok-live-api",
29
- "tiktok-live-connector",
30
- "tiktok-live-sdk",
31
- "tiktok-websocket",
32
- "tiktok-chat",
33
- "tiktok-gifts",
34
- "tiktok-bot",
35
- "tiktok-data",
36
- "tiktok-stream",
37
- "tiktok-events",
38
- "tiktok-viewer",
39
- "live-streaming",
40
- "live-chat",
41
- "webcast",
42
- "websocket",
43
- "real-time",
44
- "speech-to-text",
45
- "captions",
46
- "transcription",
47
- "translation",
48
- "tiktok-live-python",
49
- "tiktok-tools",
50
- "euler-stream",
51
- "tiktoklive",
52
- "tiktok-connector",
53
- "tiktok-live-node",
54
- "tiktok-live-js",
55
- "tiktok-scraper",
56
- "tiktok-monitoring",
57
- "livestream-api"
58
- ],
59
- "author": {
60
- "name": "TikTool",
61
- "email": "support@tik.tools",
62
- "url": "https://tik.tools"
63
- },
64
- "license": "MIT",
65
- "repository": {
66
- "type": "git",
67
- "url": "https://github.com/tiktool/tiktok-live-api"
68
- },
69
- "bugs": {
70
- "url": "https://github.com/tiktool/tiktok-live-api/issues"
71
- },
72
- "homepage": "https://tik.tools",
73
- "dependencies": {
74
- "ws": "^8.16.0"
75
- },
76
- "devDependencies": {
77
- "@types/ws": "^8.5.10",
78
- "tsup": "^8.0.0",
79
- "typescript": "^5.3.0"
80
- },
81
- "engines": {
82
- "node": ">=16.0.0"
83
- }
84
- }
1
+ {
2
+ "name": "tiktok-live-api",
3
+ "version": "1.4.0",
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
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsup src/index.ts --format cjs,esm --dts --clean",
22
+ "prepublishOnly": "npm run build"
23
+ },
24
+ "keywords": [
25
+ "tiktok",
26
+ "tiktok-live",
27
+ "tiktok-api",
28
+ "tiktok-live-api",
29
+ "tiktok-live-connector",
30
+ "tiktok-live-sdk",
31
+ "tiktok-websocket",
32
+ "tiktok-chat",
33
+ "tiktok-gifts",
34
+ "tiktok-bot",
35
+ "tiktok-data",
36
+ "tiktok-stream",
37
+ "tiktok-events",
38
+ "tiktok-viewer",
39
+ "live-streaming",
40
+ "live-chat",
41
+ "webcast",
42
+ "websocket",
43
+ "real-time",
44
+ "speech-to-text",
45
+ "captions",
46
+ "transcription",
47
+ "translation",
48
+ "tiktok-live-python",
49
+ "tiktok-tools",
50
+ "euler-stream",
51
+ "tiktoklive",
52
+ "tiktok-connector",
53
+ "tiktok-live-node",
54
+ "tiktok-live-js",
55
+ "tiktok-scraper",
56
+ "tiktok-monitoring",
57
+ "livestream-api"
58
+ ],
59
+ "author": {
60
+ "name": "TikTool",
61
+ "email": "support@tik.tools",
62
+ "url": "https://tik.tools"
63
+ },
64
+ "license": "MIT",
65
+ "repository": {
66
+ "type": "git",
67
+ "url": "https://github.com/tiktool/tiktok-live-api"
68
+ },
69
+ "bugs": {
70
+ "url": "https://github.com/tiktool/tiktok-live-api/issues"
71
+ },
72
+ "homepage": "https://tik.tools",
73
+ "dependencies": {
74
+ "ws": "^8.16.0"
75
+ },
76
+ "devDependencies": {
77
+ "@types/ws": "^8.5.10",
78
+ "tsup": "^8.0.0",
79
+ "typescript": "^5.3.0"
80
+ },
81
+ "engines": {
82
+ "node": ">=16.0.0"
83
+ }
84
+ }