This is a server-side API for downloading TikTok videos. It allows users to download videos from TikTok by providing the URL of the video.
- Clone the repository:
git clone https://github.com/BOTCAHX/tiktokdl-api
- Navigate into the project directory:
cd tiktokdl-api
- Install dependencies:
npm install
- Install CoffeeScript globally (if not already installed):
npm install -g coffeescript
- Compile the CoffeeScript file:
coffee -c index.coffee
-
Start the server using one of the following commands, depending on your setup:
- If using JavaScript:
node index.js
- If using CoffeeScript:
coffee app.coffee
- If using JavaScript:
-
Access the API endpoint with the following format:
GET /tiktok/api.php?url=[URL_TIKTOK]
Replace
[URL_TIKTOK]
with the actual URL of the TikTok video you want to download.
The API will respond with a JSON object containing the download URL and other relevant information about the video.
Example response:
{
"audio": [
"https://www.tikwm.com/video/music/6990916139345808666.mp3"
],
"video": [
"https://www.tikwm.com/video/media/play/6990916139345808666.mp4"
]
}
If there is an error with the URL or if the video is not available for download, the API will respond with a server error.
This project is licensed under the MIT License.