Unofficial TikTok Private API SDK for Python. Scrape, automate, and interact — full mobile signing, 50+ endpoints.
from tiktokflow import TikTokAPI # Trial mode — no key needed, 10 requests/day api = TikTokAPI() # Get trending videos feed = api.feed.for_you(count=5) for video in feed["aweme_list"]: print(video["desc"], video["statistics"]["digg_count"], "likes") # Like a video api.social.like(aweme_id=feed["aweme_list"][0]["aweme_id"]) # Search results = api.search.videos("python", count=10)
# With full API key — unlimited requests api = TikTokAPI(api_key="sk_your_key")
Your IP connects to TikTok directly. The signing server only computes cryptographic headers — it never sees TikTok's responses or your data.
| tiktok-private-api | Official API | Web scrapers | |
|---|---|---|---|
| Endpoints | 50+ | ~10 | 5-10 |
| Write actions | Like, follow, comment, DM | Post only | None |
| Auth required | No OAuth needed | OAuth app + review | No |
| Rate limits | Mobile-grade (high) | Strict quotas | IP bans |
| Signing | Full (Gorgon+Argus+Ladon+Guard) | N/A | None |
| Platforms | Android + iOS | N/A | Browser |
| Anti-detection | TLS impersonation | N/A | HTTP only |
api = TikTokAPI( api_key="sk_...", # optional for trial platform="ios", # or "android" (default) proxy="socks5://user:pass@host:1080", proxies=["socks5://..."], # list for rotation proxy_rotate="round_robin", # or "random" rate_limit=2.0, # max req/sec ) # Session persistence api.device.save("session.json") from tiktokflow.android import Device device = Device.load("session.json") api = TikTokAPI(api_key="sk_...", device=device)
Trial mode works instantly. Full API keys for production use.