TikTok LIVE API SDK for Python
TikTokLiveApiSdk is the official Python client for the EulerStream TikTok LIVE API. Connect to any TikTok LIVE stream by @username and receive real-time chat messages, gifts, likes, follows, shares, viewer counts, room stats and PK battles over a managed WebSocket, plus fully typed sync and async clients for LIVE rooms, creators, gifts, rankings, LIVE alerts, moderation and agencies.
EulerStream is the managed TikTok LIVE backend behind TikTokLive, the most popular Python library for TikTok LIVE. The connection layer is hosted and maintained for you, so your integration keeps working when TikTok changes its webcast protocol.
Unofficial: this project is not affiliated with, endorsed by, or connected to TikTok or ByteDance.
This package covers TikTok LIVE only. If you also need TikTok user profiles, videos, OAuth, request signing or captcha solving, install TikTokApiSdk instead: it is the same client with everything in this package plus those.
Installation
pip install TikTokLiveApiSdk
Requires Python 3.11+. Built on httpx and attrs; every endpoint has sync, sync_detailed, asyncio and asyncio_detailed variants and ships with full type hints (py.typed).
TikTok LIVE API quick start
- Create a free EulerStream account (no credit card required)
- Copy your API key from the dashboard
- Make your first calls:
from TikTokLiveApiSdk import AuthenticatedClient
from TikTokLiveApiSdk.api.tik_tok_live import retrieve_hashtag_list
from TikTokLiveApiSdk.api.tik_tok_live_gifts import retrieve_webcast_gifts
from TikTokLiveApiSdk.api.tik_tok_live_rooms import fetch_webcast_url
client = AuthenticatedClient(base_url="https://api.eulerstream.com", token="YOUR_API_KEY")
with client as c:
# List the hashtags TikTok LIVE streams are grouped under
hashtags = retrieve_hashtag_list.sync(client=c)
print(hashtags.message)
# Get the TikTok LIVE gift list (names, diamond values, images) as a JSON file to download
gifts = retrieve_webcast_gifts.sync(client=c)
print(gifts.url)
# Fetch the TikTok LIVE WebSocket URL + first payload for a LIVE room (protobuf)
webcast = fetch_webcast_url.sync_detailed(room_id="7318296342189919018", client=c)
print(webcast.status_code)
The same calls with asyncio:
import asyncio
from TikTokLiveApiSdk import AuthenticatedClient
from TikTokLiveApiSdk.api.tik_tok_live import retrieve_hashtag_list
async def main():
async with AuthenticatedClient(base_url="https://api.eulerstream.com", token="YOUR_API_KEY") as c:
hashtags = await retrieve_hashtag_list.asyncio(client=c)
print(hashtags.message)
asyncio.run(main())
Business plans can resolve a LIVE room straight from the creator's @username with TikTokLiveApiSdk.api.tik_tok_live_anchors.fetch_webcast_url_by_unique_id. AuthenticatedClient sends your key in the X-Api-Key header; use TikTokLiveApiSdk.Client for the handful of routes that allow anonymous access.
What you can build with the TikTok LIVE API
- Live stream overlays for OBS and browser sources showing TikTok LIVE chat, gifts and top gifters
- Gift and follow alerts that trigger sounds, animations or webhooks in real time
- TikTok LIVE games controlled by chat commands or gifts
- Chatbots and moderation tools that respond to and moderate TikTok LIVE chat
- Analytics dashboards tracking diamonds, viewer retention and top supporters
- LIVE monitoring: bulk "is this creator live?" checks and LIVE start/end alerts for thousands of accounts
TikTok LIVE API coverage
Every TikTok LIVE path/method in the EulerStream OpenAPI spec becomes a module under TikTokLiveApiSdk.api.<group>, so the SDK always matches the live API.
| Module | TikTok LIVE API group |
|---|---|
api.tik_tok_live |
Core TikTok LIVE: bulk live checks, webcast feed, hashtag lists, rankings |
api.tik_tok_live_anchors |
Creators: webcast URL by @username, room info / ID / cover, gift gallery, earnings, moderators, LIVE analytics |
api.tik_tok_live_rooms |
LIVE rooms: webcast URL by room ID, room info, room gifts, send chat |
api.tik_tok_live_events |
TikTok LIVE event history for a creator |
api.tik_tok_live_gifts |
TikTok LIVE gifts: the gift list, search and single-gift lookup |
api.tik_tok_live_rankings |
Creator leaderboards, rankings and ranking history |
api.tik_tok_live_agencies |
TikTok LIVE agency catalog |
api.tik_tok_live_alerts / api.tik_tok_live_alert_targets |
TikTok LIVE start/end alerts and webhook targets |
api.tik_tok_live_moderation |
Kicks, bans, mutes, sensitive words and comment toggles |
api.tik_tok_web_socket_api |
Your cloud WebSocket connections and their state |
api.accounts / api.authentication |
Your EulerStream account, rate limits, API keys and JWTs |
Moderation and sending chat act as a TikTok account, so those calls take either an OAuth access token or a cookie header. OAuth tokens are issued by the TikTok OAuth routes, which are part of TikTokApiSdk.
Per-endpoint Python examples for every operation are in the EulerStream API docs.
Advanced usage
Customize the underlying httpx.Client / httpx.AsyncClient (timeouts, proxies, event hooks) through httpx_args, or replace it entirely:
import httpx
from TikTokLiveApiSdk import AuthenticatedClient
client = AuthenticatedClient(
base_url="https://api.eulerstream.com",
token="YOUR_API_KEY",
timeout=httpx.Timeout(30),
httpx_args={"proxy": "http://localhost:8030"},
)
See the docstrings on Client and AuthenticatedClient for every option, including verify_ssl, raise_on_unexpected_status and follow_redirects.
Migrating from EulerApiSdk
TikTokLiveApiSdk is the TikTok LIVE part of what used to be published as EulerApiSdk. Install it:
pip install TikTokLiveApiSdk
- Imports. Change
EulerApiSdktoTikTokLiveApiSdkin your imports. The modules inside keep the names they had inEulerApiSdk0.6. - The old package can stay installed while you switch. The two share no files. Remove it with
pip uninstall EulerApiSdkonce nothing imports it. - The non-LIVE modules moved out. User profiles, videos, OAuth, request signing, captcha solving and usage analytics are not in this package. They are in
TikTokApiSdk, which has everythingEulerApiSdkhad. If you use any of them, install that instead; nothing else in your code has to change.
Other languages
The TikTok LIVE API SDK is also available for Node.js / TypeScript, C# / .NET, Java and Go, and anything else can use the language-agnostic WebSocket directly.
Links
- Website: eulerstream.com
- Documentation: eulerstream.com/docs
- OpenAPI reference: eulerstream.com/docs/openapi
- Pricing (free tier available): eulerstream.com/pricing
- Community: Discord
- Source and issues: github.com/EulerStream/TikTok-Api-Sdk
License
MIT © EulerStream
Metadata
Release files for TikTokLiveApiSdk 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tiktokliveapisdk-0.1.1.tar.gz | 152.2 kB | With provenance | Details for tiktokliveapisdk-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tiktokliveapisdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for tiktokliveapisdk-0.1.1-py3-none-any.whl |
Total release size: 781.7 kB
Release files / tiktokliveapisdk-0.1.1.tar.gz
| Download URL | tiktokliveapisdk-0.1.1.tar.gz |
|---|---|
| Size | 152.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
801a10563ac152a5e56632e65acfd93d91173c64908799f2d050a62b14d41a07
|
|
BLAKE2b-256 checksum How to use checksums |
98b054c25ffbd5b199ef44dc63a0f962bc2d47e8b1d77faf8d5f2f78e04ffda1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logRelease files / tiktokliveapisdk-0.1.1-py3-none-any.whl
| Download URL | tiktokliveapisdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 629.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fad990ec41891b1da0dd555b7aa946d34ca06e22c4ebb42414a66767835e3905
|
|
BLAKE2b-256 checksum How to use checksums |
a289e058aa364ff501cb5b20171c951f0541a154ed01b647e5dd732290ee89f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logSecurity for TikTokLiveApiSdk 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tiktokliveapisdk-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.