English | Simplified Chinese
"Douyin_TikTok_Download_API" is an out-of-the-box high-performance asynchronous Douyin|TikTok|Bilibili data crawling tool that supports API calls, online batch parsing and downloading.
These sponsors have paid to be placed here, and the Douyin_TikTok_Download_API project will always be free and open source. If you would like to become a sponsor of this project, please check out my GitHub sponsors page.
If you want to use a private server to run this project, please refer to: Deployment preparations, Docker deployment, one-click deployment
This project is based on PyWebIO, FastAPI, HTTPX, a fast asynchronous Douyin/TikTok data crawling tool, and implements online batch parsing and downloading of watermark-free videos or photo albums through the Web, data crawling API, iOS shortcut instructions for watermark-free downloading and other functions. You can deploy or modify this project yourself to achieve more functions, or you can directly call scraper.py in your project or install the existing pip package as a parsing library to easily crawl data, etc.....
Some simple usage scenarios:
Download videos that are prohibited from downloading, perform data analysis, and download without watermark on iOS (with the shortcut command APP that comes with iOS and the API of this project to achieve in-app downloading or downloading by reading the clipboard), etc.....
Evil0ctal
and comment on the github project reconstruction. Everyone can communicate and learn from each other in the group. Advertising and illegal things are not allowed. It is purely for making friends and technical exchanges.X-Bogus
algorithm and the A_Bogus
algorithm to request the Web API of Douyin and TikTok.TikHub.io is an API platform that provides various public data interfaces including Douyin and TikTok. If you want to support the development of the Douyin_TikTok_Download_API project, we strongly recommend that you choose TikHub.io.
? Ready to use right out of the box
Simplify the use process and use the packaged SDK to quickly carry out development work. All API interfaces are designed based on RESTful architecture and are described and documented using OpenAPI specifications, with sample parameters included to ensure easier calling.
? Cost advantage
There are no preset package restrictions and no monthly usage thresholds. All consumption is billed immediately based on actual usage, and tiered billing is performed based on the user's daily requests. At the same time, free quota can be obtained through daily sign-in in the user backend. , and these free credits will not expire.
⚡️ Fast support
We have a large Discord community server, where administrators and other users will quickly reply to you and help you quickly solve current problems.
? Embrace open source
Part of TikHub's source code will be open sourced on Github, and it will sponsor authors of some open source projects.
?The online download function of the demo site has been turned off, and due to cookie reasons, the availability of Douyin's parsing and API services cannot be guaranteed on the Demo site.
?Web APP: https://douyin.wtf/
?API Document: https://douyin.wtf/docs
?TikHub API Document: https://api.tikhub.io/docs
?iOS Shortcut (shortcut command): Shortcut release
?️Desktop downloader (recommended by warehouse):
/crawlers
/app/api
Crawlers
related classes to process the data and return it in JSON form. Video downloading can be implemented quickly with iOS shortcut instructions and supports asynchronous./app/web
PyWebIO
processes the values input from the web page and then uses Crawlers
related class processing interface to output relevant data on the web page. Most of the parameters of the above files can be modified in the corresponding config.yaml
./Douyin_TikTok_Download_API
├─app
│ ├─api
│ │ ├─endpoints
│ │ └─models
│ ├─download
│ └─web
│ └─views
└─crawlers
├─bilibili
│ └─web
├─douyin
│ └─web
├─hybrid
├─tiktok
│ ├─app
│ └─web
└─utils
Douyin web version API
TikTok web version API
Bilibili web version API
PyPi: https://pypi.org/project/douyin-tiktok-scraper/
Install the parsing library: pip install douyin-tiktok-scraper
import asyncio
from douyin_tiktok_scraper . scraper import Scraper
api = Scraper ()
async def hybrid_parsing ( url : str ) -> dict :
# Hybrid parsing(Douyin/TikTok URL)
result = await api . hybrid_parsing ( url )
print ( f"The hybrid parsing result: n { result } " )
return result
asyncio . run ( hybrid_parsing ( url = input ( "Paste Douyin/TikTok/Bilibili share URL here: " )))
Tip: Including but not limited to the following examples, if you encounter link parsing failure, please open a new issue
7.43 pda:/ 让你在几秒钟之内记住我 https://v.douyin.com/L5pbfdP/ 复制此链接,打开Dou音搜索,直接观看视频!
https://v.douyin.com/L4FJNR3/
https://www.douyin.com/video/6914948781100338440
https://www.douyin.com/discover?modal_id=7069543727328398622
https://www.tiktok.com/t/ZTR9nDNWq/
https://www.tiktok.com/@evil0ctal/video/7156033831819037994
https://v.douyin.com/L4NpDJ6/
https://www.douyin.com/video/7126745726494821640
2.84 nqe:/ 骑白马的也可以是公主%%百万转场变身https://v.douyin.com/L4FJNR3/ 复制此链接,打开Dou音搜索,直接观看视频!
https://www.tiktok.com/t/ZTR9nkkmL/
https://www.tiktok.com/t/ZTR9nDNWq/
https://www.tiktok.com/@evil0ctal/video/7156033831819037994
API documentation:
Local: http://localhost/docs
Online: https://api.douyin.wtf/docs
API demo:
https://api.douyin.wtf/api/hybrid/video_data?url=[视频链接/Video URL]&minimal=false
https://api.douyin.wtf/api/download?url=[视频链接/Video URL]&prefix=true&with_watermark=false
For more demonstrations, please see the documentation...
Douyin_TikTok_Download_API/crawlers/douyin/web/config.yaml
Line 7 in 30e56e5
Douyin_TikTok_Download_API/crawlers/tiktok/web/config.yaml
Line 6 in 30e56e5
/api/download
interface in the API of this project to download the TikTok video. This interface has been manually closed in the demo site and needs to be deployed by yourself. this project.Tip: It is best to deploy this project to a server in the United States, otherwise strange BUGs may occur.
It is recommended that you use Digitalocean's server because you can get free sex.
Use my invitation link to sign up and you can get a $200 credit, and when you spend $25 on it, I can also get a $25 reward.
My invitation link:
https://m.do.co/c/9f72a27dec35
Use script to deploy this project with one click
wget -O install.sh https://raw.githubusercontent.com/Evil0ctal/Douyin_TikTok_Download_API/main/bash/install.sh && sudo bash install.sh
Start/stop service
sudo systemctl start Douyin_TikTok_Download_API.service
sudo systemctl stop Douyin_TikTok_Download_API.service
Turn on/off automatic operation at startup
sudo systemctl enable Douyin_TikTok_Download_API.service
sudo systemctl disable Douyin_TikTok_Download_API.service
Update project
cd /www/wwwroot/Douyin_TikTok_Download_API/bash && sudo bash update.sh
Tip: Docker deployment is the simplest deployment method and is suitable for users who are not familiar with Linux. This method is suitable for ensuring environment consistency, isolation and quick setup. Please use a server that can normally access Douyin or TikTok, otherwise strange BUG may occur.
Before you begin, make sure Docker is installed on your system. If Docker is not installed yet, you can download and install it from the Docker official website.
First, pull the latest Douyin_TikTok_Download_API image from Docker Hub.
docker pull evil0ctal/douyin_tiktok_download_api:latest
If necessary, you can replace latest
with the specific version tag you need to deploy.
After pulling the image, you can start a container from this image. Here are the commands to run the container, including basic configuration:
docker run -d --name douyin_tiktok_api -p 80:80 evil0ctal/douyin_tiktok_download_api
Each part of this command does the following:
-d
: Run the container in the background (detached mode).--name douyin_tiktok_api
: Name the container douyin_tiktok_api
.-p 80:80
: Map port 80 on the host to port 80 of the container. Adjust the port number based on your configuration or port availability.evil0ctal/douyin_tiktok_download_api
: The name of the Docker image to use.Check if your container is running using the following command:
docker ps
This will list all active containers. Look for douyin_tiktok_api
to confirm it is functioning properly.
Once the container is running, you should be able to access Douyin_TikTok_Download_API via http://localhost
or the API client. Adjust the URL if a different port is configured or accessed from a remote location.
For more advanced deployments, you may wish to customize Docker commands to include environment variables, volume mounts for persistent data, or other Docker parameters. Here is an example:
docker run -d --name douyin_tiktok_api -p 80:80
-v /path/to/your/data:/data
-e MY_ENV_VAR=my_value
evil0ctal/douyin_tiktok_download_api
-v /path/to/your/data:/data
: Mount /path/to/your/data
directory on the host to the container's /data
directory for persistent or shared data.-e MY_ENV_VAR=my_value
: Set the environment variable MY_ENV_VAR
within the container, and its value is my_value
. Most of the project configuration can be modified in the config.yaml
files in the following directories:
/crawlers/douyin/web/config.yaml
/crawlers/tiktok/web/config.yaml
/crawlers/tiktok/app/config.yaml
When you need to stop and remove containers, use the following commands:
# Stop
docker stop douyin_tiktok_api
# Remove
docker rm douyin_tiktok_api
API speed test (compared to official API)
Douyin official API:
API of this project:
TikTok official API:
API of this project:
Project interface
Web main interface:
Web main interface:
Apache-2.0 license
Start: 2021/11/06
GitHub: @Evil0ctal