tiktok-private-api
Unofficial TikTok Private API SDK for Python. Scrape, automate, and interact — full mobile signing, 50+ endpoints, Android + iOS.
pip install tiktok-private-api
from tiktokflow import TikTokAPI
api = TikTokAPI() # trial: 10 requests/day, no key needed
feed = api.feed.for_you(count=5)
for video in feed["aweme_list"]:
print(video["desc"], video["statistics"]["digg_count"], "likes")
Real output:
Got 8 videos:
[1] @Nancy Ryan🥀: Welcome to Chicago, the dream city 🤍 (2,021,357 likes)
[2] @Khabane lame: I had the whole day to charge it… 😭 (5,655,444 likes)
[3] @marry_cutie: #OOTD #ootdfashion #views (78,053 likes)
[4] @HSSTECH: Stop Charging Your Samsung Phone Everyday! (61,644 likes)
Why This SDK
| tiktok-private-api | Official TikTok API | Web scrapers | |
|---|---|---|---|
| Endpoints | 50+ (feed, user, video, search, comment, social, DM, music, live) | ~10 (Display + Content Posting) | 5-10 |
| Write actions | Like, follow, comment, block, delete | Post only | None |
| Auth required | No OAuth app needed | OAuth app + review | No |
| Rate limits | Mobile-grade (high) | Strict quotas | IP-based bans |
| TLS fingerprint | Real device (curl_cffi) | N/A | Browser detected |
| Signing | Full stack (Gorgon + Argus + Ladon + Guard) | N/A | None |
How It Works
flowchart LR
A["Your Code"] -->|"api.feed.for_you()"| B["tiktok-private-api\n(SDK)"]
B -->|"POST /v1/sign"| C["Signing Server\n(cloud)"]
C -->|"signed headers"| B
B -->|"GET /aweme/v1/feed/"| D["TikTok\nServers"]
D -->|"JSON response"| B
B -->|"parsed data"| A
style C fill:#1a1a2e,stroke:#e94560,color:#fff
style D fill:#1a1a2e,stroke:#00d2ff,color:#fff
- Your IP → TikTok directly. The signing server only computes cryptographic headers.
- It never sees TikTok's responses or your data.
- Full signing stack: X-Gorgon, X-Argus, X-Ladon, ECDSA Device Guard, Ticket Guard.
Endpoints
Feed
| Method | Description |
|---|---|
api.feed.for_you() |
For You page |
api.feed.following() |
Following feed |
api.feed.user_posts(sec_user_id) |
User's videos |
api.feed.hashtag(ch_id) |
Hashtag feed |
api.feed.music(music_id) |
Music/sound feed |
User
| Method | Description |
|---|---|
api.user.info(sec_user_id) |
User profile |
api.user.profile_self() |
Own profile |
api.user.followers(sec_user_id) |
Follower list |
api.user.following(sec_user_id) |
Following list |
api.user.search(keyword) |
Search users |
api.user.block_list() |
Blocked users |
Video
| Method | Description |
|---|---|
api.video.detail(aweme_id) |
Video info + stats |
api.video.multi_detail(ids) |
Batch video info |
api.video.my_posts() |
Own posted videos |
api.video.favorites() |
Liked videos |
api.video.delete(aweme_id) |
Delete own video |
Social Actions
| Method | Description |
|---|---|
api.social.like(aweme_id) |
Like a video |
api.social.unlike(aweme_id) |
Unlike |
api.social.follow(user_id) |
Follow a user |
api.social.unfollow(user_id) |
Unfollow |
api.social.block(user_id) |
Block a user |
api.social.unblock(user_id) |
Unblock |
Comments
| Method | Description |
|---|---|
api.comment.list(aweme_id) |
Get comments |
api.comment.replies(comment_id) |
Get replies |
api.comment.publish(aweme_id, text) |
Post comment |
api.comment.delete(comment_id) |
Delete comment |
api.comment.like(comment_id) |
Like comment |
Search
| Method | Description |
|---|---|
api.search.general(keyword) |
General search |
api.search.users(keyword) |
Search users |
api.search.videos(keyword) |
Search videos |
api.search.music(keyword) |
Search music |
api.search.hashtags(keyword) |
Search hashtags |
api.search.live(keyword) |
Search lives |
Music
| Method | Description |
|---|---|
api.music.detail(music_id) |
Music/sound info |
api.music.videos(music_id) |
Videos using sound |
Direct Messages
| Method | Description |
|---|---|
api.dm.conversations() |
Conversation list |
api.dm.messages(conversation_id) |
Read messages |
api.dm.unread_count() |
Unread count |
Live
| Method | Description |
|---|---|
api.live.search(keyword) |
Search live streams |
api.live.enter(room_id) |
Enter live room |
Account
| Method | Description |
|---|---|
api.passport.email_login(email, pw) |
Email login |
api.passport.sms_login(phone, code) |
SMS login |
api.passport.register(email, pw) |
Register account |
api.passport.logout() |
Logout |
Setup
1. Install
pip install tiktok-private-api
2. Try it (no key needed)
from tiktokflow import TikTokAPI
api = TikTokAPI() # trial: 10 requests/day
feed = api.feed.for_you(count=5)
print(f"Got {len(feed['aweme_list'])} videos")
3. Get a full API key (unlimited)
Write me on Telegram — @mxmtkchk.
api = TikTokAPI(api_key="sk_your_key_here") # unlimited
Advanced Usage
Proxy rotation
api = TikTokAPI(
api_key="sk_...",
proxies=["socks5://user:pass@proxy1:1080", "socks5://user:pass@proxy2:1080"],
proxy_rotate="round_robin", # or "random"
)
iOS device fingerprint
api = TikTokAPI(api_key="sk_...", platform="ios")
Rate limiting
api = TikTokAPI(api_key="sk_...", rate_limit=2.0) # max 2 req/sec
Session persistence
# Auto-register device + save to file on first run, reload on next runs
api = TikTokAPI(api_key="sk_...", device_file="my_device.json")
Async
from tiktokflow.android import AsyncAndroidClient, Device, RemoteSigner
signer = RemoteSigner("http://...", "sk_...")
async with AsyncAndroidClient(Device(), signer=signer) as api:
feed = await api.feed.for_you(count=10)
Examples
See examples/:
quickstart.py— Feed + user lookup + likebulk_scraper.py— Scrape videos with paginationsearch.py— Search videos, users, hashtagsdm_reader.py— Read DM conversationsasync_usage.py— Async concurrent requests
SDK vs Competitors
| Feature | tiktok-private-api | TikTok-Api (davidteather) | tiktok-scraper |
|---|---|---|---|
| Write endpoints | Yes (like, follow, comment) | No | No |
| Mobile signing | Full (Gorgon+Argus+Ladon+Guard) | Partial (browser) | None |
| Android + iOS | Yes | No | No |
| Proxy rotation | Built-in | Manual | Manual |
| DM access | Yes | No | No |
| Account login | Yes | No | No |
| Maintained | Yes (2026) | Sporadic | Archived |
| Anti-detection | TLS impersonation | Browser automation | HTTP only |
Contributing
Contributions welcome! Open an issue first to discuss.
Contact
Telegram: @mxmtkchk — support, API keys, feature requests
License
MIT. See LICENSE.
This project is not affiliated with TikTok or ByteDance. Use responsibly.
Release files for tiktok-private-api 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tiktok_private_api-0.3.0.tar.gz | 58.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tiktok_private_api-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 123.8 kB
Release files / tiktok_private_api-0.3.0.tar.gz
| Download URL | tiktok_private_api-0.3.0.tar.gz |
|---|---|
| Size | 58.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d99ef5b4273fb6cdee36a6411297d0fa1329ec4b13829da62643153f11a6200
|
|
BLAKE2b-256 checksum How to use checksums |
fda809be50c6c1e838c46a55651a7cf50fc1d95751f3c771bef12ff628f62214
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / tiktok_private_api-0.3.0-py3-none-any.whl
| Download URL | tiktok_private_api-0.3.0-py3-none-any.whl |
|---|---|
| Size | 65.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4460942ed93811b0b50703da009adef7fd188438674e400ceb74f3168bf7ce05
|
|
BLAKE2b-256 checksum How to use checksums |
c084c9e7d99c4a86e261204705d0b32fe89c76289ea67232e6d16bf7925f77f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|