Open Source

Douyin TikTok Download API: Open-Source Async Social Media Data Scraping Tool

Douyin TikTok Download API is an open-source high-performance async tool for scraping and downloading content from Douyin, TikTok, Kuaishou, and Bilibili.

Keeping this site alive takes effort — your support means everything.
無程式碼也能輕鬆打造專業LINE官方帳號!一鍵導入模板,讓AI助你行銷加分! 無程式碼也能輕鬆打造專業LINE官方帳號!一鍵導入模板,讓AI助你行銷加分!
Douyin TikTok Download API: Open-Source Async Social Media Data Scraping Tool

Douyin TikTok Download API is an open-source, high-performance asynchronous tool for scraping and downloading content from four major Chinese and international social media platforms: Douyin (抖音), TikTok, Kuaishou (快手), and Bilibili (哔哩哔哩). Created by developer Evil0ctal, the project has earned over 5,100 GitHub stars and serves as a goto solution for researchers, content creators, and developers who need programmatic access to short-form video platform data.

Unlike browser extensions or simple downloader scripts, this project provides a complete REST API backend with a web-based user interface, making it suitable for both automated pipelines and interactive use. It handles the increasingly sophisticated anti-crawling measures employed by these platforms, including the X-Bogus and A_Bogus signature algorithms that Douyin and TikTok use to protect their APIs.

What Is Douyin TikTok Download API?

At its core, this project is a data scraping middleware that translates complex, platform-specific API interactions into clean, developer-friendly REST endpoints. Instead of reverse-engineering each platform’s internal API, you simply send HTTP requests to the tool’s server, which handles authentication, signature generation, rate limiting, and response parsing.

The tool is particularly valuable because short-form video platforms do not offer official APIs for bulk data access. Researchers studying viral content trends, content creators managing cross-platform publishing, and developers building analytics dashboards all rely on tools like this to access the data they need.

Which Platforms Are Supported?

The project provides dedicated endpoints for each platform, with varying levels of feature coverage:

FeatureDouyinTikTokKuaishouBilibili
Video data & downloadYesYesYesYes
Photo album (no watermark)YesNoYesNo
User profile & postsYesYesYesYes
User likes & collectionsYesYesNoYes
CommentsYesYesNoYes
Live stream dataYesNoYesYes
Following / followersNoYesNoNo
Danmaku (弹幕)NoNoNoYes

This broad platform support makes the tool suitable for cross-platform content analysis and migration workflows.

Can I Download Videos Without Watermarks?

Yes, watermark-free video and photo album downloads are a primary feature. The tool achieves this by intercepting the platform’s internal video delivery URLs that serve the original high-quality content before the watermark overlay is applied.

For Douyin, both single video and photo album downloads are supported without watermarks. The API returns direct media URLs that can be passed to any download tool. For TikTok, single videos are supported. The tool also supports an iOS Shortcut integration for in-app watermark-free downloads on iPhone devices.

What Tech Stack Does It Use?

The project is built on a modern Python async stack:

ComponentTechnologyRole
Web FrameworkFastAPIREST API server with automatic OpenAPI docs
Web UIPyWebIOBrowser-based interactive interface
HTTP ClientHTTPXAsync HTTP requests with connection pooling
Anti-crawlerX-Bogus, A_BogusReverse-engineered signature algorithms
SerializationPydanticRequest/response validation
ContainerizationDockerEasy deployment with prebuilt images

The X-Bogus and A_Bogus algorithms deserve special mention. These are the signature generation mechanisms that Douyin and TikTok use to verify that API requests come from legitimate clients. The fact that this open-source project reverse-engineers and maintains them is a significant technical achievement, as these algorithms are updated periodically by the platforms.

How Do I Deploy It?

Deployment is straightforward with Docker:

docker pull evil0ctal/douyin_tiktok_download_api:latest
docker run -d -p 8080:8080 evil0ctal/douyin_tiktok_download_api

The API documentation is automatically generated at http://localhost:8080/docs (Swagger UI) or http://localhost:8080/redoc (ReDoc). A demo site is available at douyin.wtf with API docs at douyin.wtf/docs, though the demo has downloads disabled for policy compliance.

You can also install via pip:

pip install douyin-tiktok-scraper

Note that you will need valid Douyin cookies from your browser to use the API, as the platforms’ anti-bot protections require authenticated sessions for most endpoints.

FAQ

What is Douyin TikTok Download API? It is an open-source high-performance async scraping tool for Douyin, TikTok, Kuaishou, and Bilibili. It provides REST API endpoints, a web UI for batch parsing, and supports watermark-free video downloads.

Which platforms are supported? Douyin (抖音), TikTok, Kuaishou (快手), and Bilibili (哔哩哔哩). Each platform has dedicated API endpoints for videos, user profiles, comments, live streams, and more.

Can I download videos without watermarks? Yes, the tool supports downloading videos and photo albums without watermarks from Douyin and TikTok. Bilibili videos are also supported for download.

What tech stack does it use? Python with FastAPI for the REST API backend, PyWebIO for the web UI, and HTTPX for async HTTP requests. It implements anti-crawler algorithms including X-Bogus and A_Bogus for Douyin and TikTok.

How do I deploy it? Deploy with Docker using docker pull evil0ctal/douyin_tiktok_download_api:latest, or install via pip install douyin-tiktok-scraper. A demo site is available at douyin.wtf.

Further Reading

TAG
CATEGORIES