Skip to main content

tiktok-private-api

What it is

An open-source Python SDK for the private TikTok mobile API — the same endpoints the Android and iOS apps use for feed, profiles, video, comments, likes, follows, uploads, DMs, search, music, live and notifications. The hard part — request signing (X-Argus / X-Ladon / X-Gorgon / X-Khronos / device fingerprint) — is not done in this package. Instead, the client makes a small call to a hosted signing service with your API key, gets back the signature headers for that one request, and then sends the actual TikTok request from your own machine. Your HTTP requests to TikTok leave your IP, not ours. We never see request bodies or responses.

Install

pip install tiktok-private-api

Known issue: version 0.4.3 currently on PyPI has an import bug and fails to load (ModuleNotFoundError on first import tiktokflow). A fixed 0.4.4 is being prepared — pin to it once released. In the meantime, use 0.3.0 (pip install tiktok-private-api==0.3.0).

Quickstart

Sync:

from tiktokflow import TikTokAPI

tt = TikTokAPI(api_key="sk_live_...")

me   = tt.user.profile_self()
feed = tt.feed.for_you(count=10)
first = feed["aweme_list"][0]
tt.social.like(first["aweme_id"])
tt.comment.publish(first["aweme_id"], "nice")

Async:

import asyncio
from tiktokflow.android.async_client import AsyncAndroidClient
from tiktokflow.android.remote_signer import RemoteSigner
from tiktokflow.android.device import Device

async def main():
    signer = RemoteSigner("https://sign.example", api_key="sk_live_...")
    async with AsyncAndroidClient(Device(), signer=signer) as tt:
        feed = await tt.feed.for_you(count=10)
        print(len(feed["aweme_list"]))

asyncio.run(main())

How to get a key

  1. Open @lazymanagerrobot on Telegram.
  2. Send /key.
  3. The bot replies with your personal API key (shown once — save it).

Keys are free right now. A paid tier is planned later; it will be a single flag flip on the server, so your code will not change — only the rate-limit numbers.

What we see on our side

The signing service receives: your API key, the TikTok endpoint path, and the request parameters that have to be included in the signature. For accounting and abuse protection it keeps, per key:

  • which endpoints were called,
  • counts and timestamps,
  • the HTTP status code TikTok returned.

What it does not log:

  • request bodies,
  • response bodies,
  • TikTok user IDs / usernames / aweme IDs / cookies,
  • any TikTok content (videos, text, DMs, comments),
  • your TikTok session tokens.

This is enforced in the service code: the log writers only accept the fields above, and request/response bodies never reach them. If you want to audit it, ping the maintainer on Telegram — the relevant file in the private repo can be shared.

Rate limits and tiers

  • No monthly or daily quotas. You pay nothing while the service is free; usage is not capped by volume.
  • Per-key safety ceiling: 100 req/s, burst 500. This is a crash-loop guard for the signing service itself, not a product limit — a thousand client accounts at normal activity stay well under it. If a runaway script spikes above the burst, the service answers 429 on the excess; backing off a second clears it.
  • Paid tier (later): no rate changes planned; the paid flag unlocks support, SLAs, and extended endpoints when they land. Same API, same key format.

The limit is global per key, not per process, so running two workers does not double it.

Supported endpoints

Twelve domain modules, exposed as tt.<module>.<method>:

  • profile / user — profiles, followers, following, edit profile, privacy, block list
  • video — detail, my posts, favorites, collections, stats, delete
  • feed — For You, Following, Friends, Nearby
  • comment — list, replies, publish, delete, digg
  • dm — conversations, messages, send, stranger inbox
  • search — universal / video / user search, suggestions, trending, hashtags
  • social — follow, like, block, dislike, friend list, digg list, recommend users
  • upload — video and photo-carousel upload and publish
  • live — search, room info, gifts
  • music — detail, videos by track, search, trending, collections
  • notice — notifications, unread count, inbox
  • passport — login (email / phone / username+pass / code / QR / OAuth), registration, password reset, token refresh

Exact module list is pinned by ops/release/public_manifest.txt in the source repo — nothing ships to PyPI that is not in that file.

Donations

If this SDK saves you time, a tip is appreciated.

Network Address
Bitcoin (BTC) bc1q73j9y68g02skp7tgfx8dy22w32rjrnea0647lg
Ethereum (ETH, ERC-20) 0xF44233bee0f73152De3ba9Ebe8d5270C25825c7D
Tron (TRX, TRC-20) TLmPmbg5n4BzJLCAiRREjJH1mErDQGg9BS
Solana (SOL) q24r8XxZ7EVHmCEzKVSPUiAsuy1FFkfrpYmyw8AWx27

Please verify the address matches the network before sending.

This is an unofficial, reverse-engineered client. It is not affiliated with, endorsed by, or sponsored by TikTok or ByteDance. "TikTok" and related marks belong to ByteDance Ltd. Use the SDK only on accounts and data you are authorised to access, and in compliance with applicable law and TikTok's terms of service.

Licensed under the MIT License — see LICENSE.

Metadata

Release files for tiktok-private-api 0.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tiktok-private-api 0.4.4
File Size Uploaded Provenance
tiktok_private_api-0.4.4.tar.gz 87.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tiktok-private-api 0.4.4
File Interpreter ABI Platform
tiktok_private_api-0.4.4-py3-none-any.whl Python 3 none any Details

Total release size: 191.3 kB

Release files / tiktok_private_api-0.4.4.tar.gz

Download URL tiktok_private_api-0.4.4.tar.gz
Size 87.7 kB
Tags Source
SHA-256 checksum
How to use checksums
631cf5e5867892f1df30726eb49b5ee92ef2fe6696551203a3f2a1e6a604fa59
BLAKE2b-256 checksum
How to use checksums
476e19c1afe27ceaa91aa03e9f9d3edb8177050dc69be8ed3cfc26b439285906
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / tiktok_private_api-0.4.4-py3-none-any.whl

Download URL tiktok_private_api-0.4.4-py3-none-any.whl
Size 103.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
46489de2e63c258ad174f49003602080968b76b1557c28d3871c1c92af8363e3
BLAKE2b-256 checksum
How to use checksums
8cc1e52baa7feff8e647037e7e4c1abae405a4fbaaf7295e7130d0df1974398d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for tiktok-private-api 0.4.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page