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

Quickstart

The default signing server is https://sign.54-38-243-162.nip.io. Override it with the environment variable TIKTOKFLOW_SIGNING_SERVER or by passing signing_server= to the client.

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.54-38-243-162.nip.io",
        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 @tiktok_private_api_bot on Telegram.
  2. Send /key.
  3. The bot replies with your personal API key (shown once — save it).

Keys are free. Any question that is not "/key /rotate /revoke /stats" — ping @mxmtkchk directly.

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

Default 1000 req/s with burst 5000 per key — this is a service safety ceiling, not a product cap. 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.

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

No monthly or daily quotas. You pay nothing; usage is not capped by volume.

Need more for a big farm (tens of thousands of accounts)? Ping @mxmtkchk — individual per-key limits can be raised on request.

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

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.5
File Size Uploaded Provenance
tiktok_private_api-0.4.5.tar.gz 87.9 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 191.7 kB

Release files / tiktok_private_api-0.4.5.tar.gz

Download URL tiktok_private_api-0.4.5.tar.gz
Size 87.9 kB
Tags Source
SHA-256 checksum
How to use checksums
991d171831c13a098d933bb40df9543a2bd1fb2a53a93c3c920f04a437e86236
BLAKE2b-256 checksum
How to use checksums
4401078c6740dec173323216fc6475ef0d6eadc50cfb17b0538d170af207b161
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL tiktok_private_api-0.4.5-py3-none-any.whl
Size 103.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74cb93225af15f24375d233ee0f07b2c714f27eed550c7c503f292b423e44ff7
BLAKE2b-256 checksum
How to use checksums
0cd005f793cf8cd71564533226f3976de702456821c5b9ba60a96cded5197a4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for tiktok-private-api 0.4.5

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