About this project

Douyin_TikTok_Download_API (DTK) is an open-source, self-hostable data API for Douyin and TikTok. It allows users to fetch posts, author profiles, author posts and liked posts, mixes/playlists, comments, and comment replies. For TikTok, it can also fetch followers and following lists. The system downloads video and image albums without watermarks by selecting the clean stream published by the platform. Key capabilities include: - A self-healing identity pool that uses a headless browser to mint guest identities and tops up when usable ones run low. - Health monitoring with structured records per request, live health for identities and endpoints, and circuit breakers. - Asynchronous calls by default (202 + task_id), with an option for synchronous calls. - Archiving of all parsed data in PostgreSQL + TimescaleDB, ensuring content deleted upstream remains accessible. - Access via REST API (93 operations), MCP server (streamable-http), CLI, and a React web console. - API keys with scopes and roles for access control. - Support for parsing various link types, including short links, post URLs, and clipboard captions. - Media downloads to local disk, with bulk download by author, duplicate skipping, and cleanup. - A watchlist feature to re-collect author or post data on a timer. The project is built with Python 3.12, FastAPI, SQLAlchemy 2.0, React 19, and Go 1.23 for the downloader sidecar. It requires only PostgreSQL and Redis as external dependencies. Deployment is handled via Docker Compose, with images available for linux/amd64 and linux/arm64. An interactive installation script is also provided for setup and management.