These sponsors paid to be here, and Douyin_TikTok_Download_API stays free and open because of it. To sponsor the project, see my GitHub Sponsors page.
Your Ultimate Social Media Data & API Marketplace
Professional data solutions for Douyin, Xiaohongshu, TikTok, Instagram, YouTube,
Twitter, and more.
Real-time Data | Flexible APIs | Seamless Integration | Competitive Pricing with Discounts
Buy and sell custom APIs, services, and social media solutions on the
TikHub.io Marketplace, alongside developers, businesses and content creators.
Trusted by leading global influencer marketing and social media intelligence platforms
Somewhere to put what you work out. This project exists because people wrote down how a signature was built; the forum is for the next round of that — signatures, protocols, packers, anything taken apart.
Free, no advertising, and close to no rules beyond the obvious. Bilingual, English and Chinese. Register and post; nothing is gated.
One real call: paste a link, send it, get the normalised result back. The identity pool, the scheduler and the API reference it passed through on the way are all in the same console. The interface follows the browser's language, and both are written by hand rather than machine-translated. 中文界面
https://demo.douyin.wtf is a live instance, open to everyone. Sign in — the login page fills the demo account in for you — and use the console: the playground, the scheduler, the library, the API reference. The same account comes with an API key you can call the scraping endpoints with, shown in plaintext on the API keys page.
It is read-only. Demo requests are not written to the request log or the archive, so the database of a public instance cannot be filled by strangers, and switching demo mode off ends every demo session and kills the key immediately.
Rate limit: 30 requests per 10 seconds. Go over it and you are cooled down for 10 seconds, during which every request is refused. It is a shared instance, and the identity pool behind it is the ceiling for everybody using it at once.
What the demo is for is deciding whether to run your own. It is not a service to build on — it can go down, be reset, or be switched off, and none of that will be announced.
v5 is a rewrite. It started from an empty branch and inherits no v4 code.
v4's real problem was never a shortage of features — it was that the API would die quietly and nobody would know. A cookie expires, a signature algorithm changes, an endpoint gets rate-limited, and you find out when someone files an issue. v5 puts "you can see it" and "it heals itself" ahead of features.
| v4 | v5 | |
|---|---|---|
| Where identities come from | You copy cookies out of a browser into config.yaml |
A headless browser mints guest identities, and the pool tops itself up when usable ones run low |
| How requests go out | Straight out, as they arrive | Health tiers, quantised LRU rotation, one in-flight lock per identity, a token bucket per (identity, endpoint), a circuit breaker per endpoint |
| When something breaks | You wait for a bug report | One structured record per request, live health for every identity and endpoint, visible in the console |
| Call style | Synchronous — send and wait | Asynchronous by default (202 + task_id); add ?wait= to go back to synchronous |
| What is kept | Nothing; parsed and discarded | PostgreSQL + Redis. Everything parsed is archived, so a post deleted upstream is still here |
| Access control | None; anyone can call it | API keys with scopes and roles, managed in the console |
| Interface | A single PyWebIO page | A React console: identity pool, scheduler, library, downloads, logs, diagnostics |
| Ways in | REST | REST, MCP and a CLI, all over the same service layer |
| Signing | X-Bogus, A_Bogus | a_bogus, X-Bogus, X-Gnarly, X-Dynosaur and Bilibili's WBI in pure Python, with a browser fallback |
| Deployment | pip install -r requirements.txt + python start.py |
docker compose up, three images |
| Platforms | Douyin, TikTok, Bilibili | Douyin, TikTok, Bilibili |
Bilibili was the one thing that went backwards in 5.0, because it shares neither the signing nor the identity machinery with Douyin and TikTok. It is back in 5.1.6, with the two pieces of its own that needed writing: its WBI signature in pure Python, and guest identities minted over plain HTTP, so a Bilibili pool needs no browser container.
v4's code stays on the v4 branch,
the image is still published, and one command brings it up:
docker run -d --name dtk-v4 --restart unless-stopped \
-p 8080:80 evil0ctal/douyin_tiktok_download_api:V4.1.2
Then open http://localhost:8080; the API reference is at /docs. Port 8080 is
deliberate — v5 binds 8000, so the two versions can run side by side on one machine.
Replace the Douyin cookie before you use it. v4 has no identity pool, and the cookie
baked into the image expired long ago, so Douyin endpoints answer 400 until you put
your own in:
```bash docker cp dtk-v4:/app/crawlers/douyin/web/
| 日期 | 榜单 | 排名 | 周期新增 | 总 STAR |
|---|