# Douyin_TikTok_Download_API > A self-hosted data API for Douyin (抖音) and TikTok. One `docker compose up` > gives you a REST API, an MCP server and a web console, backed by an identity > pool (cookies + proxies + fingerprints) that mints, tests, cools and retires > its own identities. Open source (Apache-2.0), free, and it runs entirely on > your own machine - there is no hosted tier and nothing is proxied through a > third party. Built with Python 3.12, FastAPI, PostgreSQL + TimescaleDB and Redis; the console is React. It fetches posts, authors, comments, mixes and search from both platforms, downloads video and image albums using the watermark-free stream the platform already publishes (it selects that stream, it does not strip a watermark), and archives what it collects so a post deleted upstream is still readable locally. Signing is native Python - `a_bogus`, `X-Bogus` and the TikTok signatures are implemented in-process rather than driven through a browser - with a headless browser kept as a fallback and as a drift detector. Source: Live demo: (30 requests per 10 seconds, then a 10-second cooldown) Every page below exists in English and Simplified Chinese and the two say the same thing. ## Documentation (English) - [Quick start](https://douyin.wtf/quickstart/): By the end of this page you will have the stack running on one host, an administrator account, and one link parsed successfully — first from the web console, then from curl with an API key. - [Installation and deployment](https://douyin.wtf/installation/): This page takes you from an empty host to a running instance you can leave alone, and explains enough of the compose file that you can change it without breaking it. - [Configuration reference](https://douyin.wtf/configuration/): After reading this you will know which settings need a restart and which do not, how to read and change the ones that do not from the console, the CLI or the API, and what every one of the 54 runtime settings does. - [Concepts](https://douyin.wtf/concepts/): This page is the mental model behind the whole system. - [Console overview](https://douyin.wtf/console-overview/): After reading this you will be able to get into the console for the first time, find your way around its sidebar, and read the four pages that tell you whether the instance is healthy — Overview, System, Logs and Diagnose — including what every panel on them means and what you should do about wha... - [Identities and proxies](https://douyin.wtf/identities-and-proxies/): The pool is the part of this system that decides whether it works at all. - [Playground and tools](https://douyin.wtf/playground-and-tools/): Three console pages let you learn this system by using it: /playground drives any read endpoint from the browser and tells you whose fault a failure was, /tools exposes the primitives the service uses on every request, and /docs is the API reference generated by the instance you are actually runn... - [Downloads, library and watchlist](https://douyin.wtf/downloads-and-library/): This page is about keeping things rather than just reading them: putting video and images on your own disk, finding them again months later, and collecting the same target on a timer. - [Users and API keys](https://douyin.wtf/users-and-api-keys/): This page is about who can do what on your instance. - [Operations](https://douyin.wtf/operations/): This page is about day two and everything after it: keeping an instance healthy for months without babysitting it. - [REST API guide](https://douyin.wtf/api/): This page explains how to call the HTTP API from a program: how to authenticate, how the uniform envelope is shaped, how the asynchronous task model works, how to page, and which errors your code has to handle. - [MCP and AI agents](https://douyin.wtf/mcp/): This page shows you how to point an AI client — Claude Code, Claude Desktop, Codex CLI, Cherry Studio, or anything else that speaks MCP — at your own instance, what the eight tools do, and how to read what comes back. - [CLI reference](https://douyin.wtf/cli/): dtk is the operations and rescue command line that ships inside the application image. - [Troubleshooting](https://douyin.wtf/troubleshooting/): Find your symptom, confirm the cause with one command or one console page, and apply the fix. - [Security](https://douyin.wtf/security/): This page is the division of labour between you and the software. - [Contributing](https://douyin.wtf/contributing/): This page is for someone who wants to change the code. - [FAQ and glossary](https://douyin.wtf/faq/): This page answers the questions people ask before and just after they deploy this project, and then defines every term the rest of the documentation uses. ## 文档(简体中文) - [快速开始](https://douyin.wtf/zh/quickstart/): 读完这一页,你会在一台主机上跑起整套服务、创建好管理员账号,并成功解析第一条链接—— 先在 Web 控制台里解析一次,再用 curl 加 API Key 解析一次。大约需要十分钟, 外加第一次构建镜像的时间。 - [安装与部署](https://douyin.wtf/zh/installation/): 这篇文档带你从一台空机器走到一个可以放着不管的实例,并把 compose 文件讲清楚到你敢改它的程度。读完之后, 你应该能够:估算机器规格、决定那两个可选容器到底要不要、在 API 前面挂上 TLS、在不丢数据的前提下升级, 以及在你更喜欢的情况下完全不用 Docker 跑起来。 - [配置参考](https://douyin.wtf/zh/configuration/): 读完本文,你会知道哪些配置需要重启、哪些不需要,如何从控制台、命令行或 API 三个入口读取和修改不需要重启的那些,以及全部 54 个运行时配置项各自的作用。 - [核心概念](https://douyin.wtf/zh/concepts/): 本页讲的是整套系统背后的心智模型。读完之后,你应该能在发出请求之前就预判实例会怎么处理它,并且能区分三种从外部看起来完全一样的失败:真正的 bug、平台改动,以及系统完全按设计工作。 - [控制台总览](https://douyin.wtf/zh/console-overview/): 读完这篇,你就能完成首次进入控制台的全过程、看懂侧边栏的组织方式,并读懂四个用来判断实例是否健康的页面——总览、系统信息、日志、诊断——包括每个面板的含义,以及看到某个结果之后该做什么。 - [身份与代理](https://douyin.wtf/zh/identities-and-proxies/): 身份池是决定这套系统能不能跑起来的关键部分。读完本文,你将能够读懂身份列表和它的状态机、铸造或导入身份、把身份绑到代理上、理解消耗它们的调度器、按自己的流量规模估算池子大小,并且在「什么都不响应了」时分清三种完全不同的故障。 - [调试台与工具](https://douyin.wtf/zh/playground-and-tools/): 控制台里有三个页面,可以让你在使用中把这套系统摸清楚:/playground 用表单驱动任意读取接口,并在失败时告诉你问题出在谁身上;/tools 把服务每次请求都要用到的几块能力直接暴露出来;/docs 则是由你正在运行的这个实例自己生成的 API 参考。读完这一页,你应当能发起一次调用、在失败时读懂失败、把那次上游请求原样在本实例之外复现出来,并把一个签名拆开来看。 - [下载、资料库与关注列表](https://douyin.wtf/zh/downloads-and-library/): 这一篇讲的是「留下来」而不只是「看一眼」:把视频和图片存到你自己的磁盘上、几个月后还能找回来、以及按定时反复采集同一个目标。读完之后你会清楚这三个页面各自的代价、字节到底落在哪里、容量上限会拿走什么,以及怎样保住那个你真正舍不得丢的作品。 - [用户与 API 密钥](https://douyin.wtf/zh/users-and-api-keys/): 这一篇讲的是"谁能在你的实例上做什么"。读完之后,你会知道该给同事开哪种控制台账号、怎么签发一把只能读抖音、别的什么都干不了的密钥、怎么让泄露的凭据立刻失效,以及如果你真的决定把某个端点开放给不带凭据的调用方,会发生什么。 - [运维](https://douyin.wtf/zh/operations/): 这一页讲的是上线之后的日子:怎样让一个实例在几个月里不用人盯着也保持健康。读完之后你会知道后台循环在做什么、改一个设置多久才会生效、怎么做备份和恢复(以及怎么证明恢复真的有效)、告警是怎么接的、哪些数据会在什么时候被清理、该盯哪些指标,以及怎样升级才不会丢东西。 - [REST API 指南](https://douyin.wtf/zh/api/): 本文讲的是如何从程序里调用 HTTP API:怎么认证、统一信封长什么样、异步任务模型怎么工作、怎么翻页、以及你的代码必须处理哪些错误。读完之后,你应该能写出一个客户端:提交任务、取回结果,并在实例开始拒绝你时正确地退避。 - [MCP 与 AI 客户端](https://douyin.wtf/zh/mcp/): 这一页讲怎么把 AI 客户端——Claude Code、Claude Desktop、Codex CLI、Cherry Studio,或者任何支持 MCP 的工具——接到你自己的实例上,八个工具各自做什么,以及返回的东西该怎么读。读完你应该能配好一个客户端、用 curl 验证连通性,并且认得出导致大部分连接失败的那两个错误。 - [命令行参考](https://douyin.wtf/zh/cli/): dtk 是随应用镜像一起发布的运维与救援命令行工具。读完本文你会知道如何在运行中的部署里调用它、每条命令和每个选项的作用,以及哪些命令可以随手对线上实例执行、哪些只有在出事时才该动。 - [故障排查](https://douyin.wtf/zh/troubleshooting/): 按症状定位,用一条命令或一个控制台页面确认原因,然后修好它。这篇同时收录了本实例可能返回的全部错误码,写明每个码是什么意思、以及重试是否有可能起作用。 - [安全](https://douyin.wtf/zh/security/): 这一篇讲的是你和这套软件之间的分工。读完之后,你会知道实例自己已经保护了什么、它刻意不替你做什么、哪些调用会把一份可用的凭据交到你手上,以及在端口能被你自己的笔记本以外的东西访问到之前,你该检查些什么。 - [参与开发](https://douyin.wtf/zh/contributing/): 这一页写给想改代码的人。读完你应该能搭好开发环境、认得清目录结构、在本地跑起 API、worker 和控制台,跑通测试套件的每一层,并让一次改动通过 CI 的全部门禁。 - [常见问题与术语表](https://douyin.wtf/zh/faq/): 这一页回答的是人们在部署前后真正会问的问题,然后把本套文档用到的每个术语解释 一遍。读完之后,你应该能判断这套软件是否适合你的场景,也能在读其它页面时不必 停下来查名词。 ## Optional - [Full text of every page](https://douyin.wtf/llms-full.txt): All thirty-four pages concatenated, for a model that would rather read once than crawl. - [Releases](https://github.com/Evil0ctal/Douyin_TikTok_Download_API/releases): Bilingual release notes, with the git tag and the image tag listed side by side. - [Docker images](https://hub.docker.com/r/evil0ctal/douyin_tiktok_download_api): A release tag has no leading `v`: the git tag `v5.0.1` publishes the image `5.0.1`.