A powerful Python tool for downloading TikTok videos efficiently and safely.
Quick Start • Features • Installation • Usage • Contributing
TikTock is a robust Python-based command-line tool designed to download TikTok videos efficiently and safely. Whether you want to save a single video or bulk download from your TikTok data export, TikTock provides an intuitive interface with powerful features.
Multiple Download Methods
- Single or multiple TikTok URLs
- Bulk download from JSON/text files
- Direct TikTok data export processing
Advanced Functionality
- Real-time progress tracking with visual feedback
- Watermark-free video downloads
- Customizable output directories
- Configurable download delays
- Adjustable chunk sizes for optimal performance
- Custom filename templates with dynamic placeholders
Robust & Reliable
- Comprehensive error handling
- Detailed download reports and logging
- URL validation before processing
User Experience
- Clean CLI with rich formatting
- Progress bars and status indicators
- Organized file management
- Detailed logging capabilities
# Download a single video
python main.py https://www.tiktok.com/@username/video/1234567890
# Download multiple videos
python main.py url1 url2 url3 -o ./downloads
# Process from your TikTok data export
python main.py -r liked_videos.json --log download_log.json
- Python 3.8 or higher
- pip (Python package installer)
-
Clone the repository
git clone https://github.com/izaan17/TikTock.git cd TikTock
-
Install dependencies
pip install -r requirements.txt
-
Verify installation
python main.py --help
Download a single video:
python main.py https://www.tiktok.com/@username/video/1234567890
Download multiple videos:
python main.py url1 url2 url3
Specify output directory:
python main.py https://www.tiktok.com/@username/video/1234567890 -o ./my_videos
Note: The output directory must exist before running the command.
From a text file:
python main.py -r urls.txt
From TikTok data export:
python main.py -r user_data.json
Option | Short | Description | Example |
---|---|---|---|
--output |
-o |
Output directory | -o ./downloads |
--recursive |
-r |
Process URLs from file | -r urls.txt |
--delay |
-d |
Delay between downloads (seconds) | -d 2 |
--chunk-size |
-c |
Download chunk size (bytes) | -c 2048 |
--log |
Save download log | --log my_log.json |
|
--activity |
Pre-select activity type | --activity liked saved |
|
--name-template |
Customize output filename using placeholders | --name-template "{author}_{index}_{cdate}" |
TikTock allows you to customize your downloaded filenames using placeholders:
Template | Example Output | Description |
---|---|---|
{index} |
1.mp4 |
Index of the video in the current download session |
{video_id} |
7554364340145523999.mp4 |
TikTok video ID extracted from the URL |
{author} |
izaannyc.mp4 |
TikTok username of the video's author |
{cdate} |
2025-09-27_14-30-05.mp4 |
Current timestamp in default format %Y-%m-%d_%H-%M-%S |
{author}_{index} |
izaannyc_1.mp4 |
Combines author and index |
{author}_{video_id}_{cdate} |
izaannyc_7554364340145523999_2025-09-27_14-30-05.mp4 |
Combines multiple placeholders |
{cdate:%Y%m%d-%H%M} |
20250927-1430.mp4 |
Custom strftime formatting for timestamp |
{author}_{video_id}_{cdate:%Y-%m-%d_%H-%M-%S} |
izaannyc_7554364340145523999_2025-09-27_14-30-05.mp4 |
Full example with formatted date |
Tip: You can mix and match placeholders in any order.
{cdate}
supports Python strftime formatting, allowing you to change the date format to your preference.
# Download with 2-second delay and custom chunk size
python main.py https://tiktok.com/@user/video/123 -d 2 -c 4096
# Process TikTok export with logging
python main.py -r tiktok_data.json --log download_session.json
# Download to specific folder with delay
python main.py url1 url2 -o ./TikTok_Videos -d 1
# Download with custom filename template
python main.py https://tiktok.com/@user/video/123 --name-template "{author}_{index}_{cdate}"
Simple text files with one TikTok URL per line:
https://www.tiktok.com/@user1/video/1234567890
https://www.tiktok.com/@user2/video/0987654321
https://www.tiktok.com/@user3/video/1122334455
{
"Activity": {
"Like List": {
"ItemFavoriteList": [
{
"date": "2025-01-01",
"link": "https://www.tiktok.com/@username/video/1234567890"
}
]
}
}
}
{
"Activity": {
"Favorite Videos": {
"FavoriteVideoList": [
{
"Date": "2025-01-01",
"Link": "https://www.tiktok.com/@username/video/1234567890"
}
]
}
}
}
{
"urls": [
"https://www.tiktok.com/@username/video/1234567890",
"https://www.tiktok.com/@username/video/0987654321"
]
}
To download your personal TikTok data for bulk processing:
- Request your data: Visit TikTok's data download page
- Choose JSON format: Select JSON format (TXT format is not currently supported)
- Wait for email: TikTok will email you when your data is ready
- Download & extract: Download the zip file and extract it
- Use with TikTock: Use the JSON files with the
-r
option
- Operating System: Windows, macOS, or Linux
- Python Version: 3.8 or higher
- Internet: Stable connection required for downloads
Simple text files with one TikTok URL per line:
https://www.tiktok.com/@user1/video/1234567890
https://www.tiktok.com/@user2/video/0987654321
https://www.tiktok.com/@user3/video/1122334455
{
"Activity": {
"Like List": {
"ItemFavoriteList": [
{
"date": "2025-01-01",
"link": "https://www.tiktok.com/@username/video/1234567890"
}
]
}
}
}
{
"Activity": {
"Favorite Videos": {
"FavoriteVideoList": [
{
"Date": "2025-01-01",
"Link": "https://www.tiktok.com/@username/video/1234567890"
}
]
}
}
}
{
"urls": [
"https://www.tiktok.com/@username/video/1234567890",
"https://www.tiktok.com/@username/video/0987654321"
]
}
To download your personal TikTok data for bulk processing:
- Request your data: Visit TikTok's data download page
- Choose JSON format: Select JSON format (TXT format is not currently supported)
- Wait for email: TikTok will email you when your data is ready
- Download & extract: Download the zip file and extract it
- Use with TikTock: Use the JSON files with the
-r
option
- Operating System: Windows, macOS, or Linux
- Python Version: 3.8 or higher
- Internet: Stable connection required for downloads
- Ensure the URL follows the correct TikTok format
- Check that the video is publicly accessible
- Verify the URL is not broken or expired
- Create the output directory before running the command
- Use absolute paths when possible
- Check directory permissions
- Check your internet connection
- Try reducing chunk size:
-c 512
- Add delay between downloads:
-d 3
Hatch canon |
Contributions are welcome!
Found a bug? Please create an issue with:
- Detailed description of the problem
- Steps to reproduce
- Expected vs actual behavior
- System information (OS, Python version)
- Error messages or logs
Important: This tool is intended for educational and personal use only.
- Respect Copyright: Only download content you have permission to download
- Follow Terms of Service: Respect TikTok's Terms of Service
- Privacy: Be mindful of privacy when downloading content
- No Liability: The developers are not responsible for any misuse of this tool
By using TikTock, you agree to use it responsibly and in accordance with all applicable laws and regulations.
Made by Izaan Noman
If you find this project helpful, please consider giving it a star!