This repository is a demonstration of how to use the TikHub.io API interface for downloading videos from platforms such as Douyin. Below are the steps for setting up the environment, obtaining the API key, and running the demo scripts.
- Python 3.7+
- TikHub.io account (to obtain your API Key)
- TikHub Python SDK (included in the
requirements.txt
)
-
Clone this repository:
git clone https://github.com/your-repo/TikHub-API-Demo.git cd TikHub-API-Demo
-
Create and activate a virtual environmen:
python -m venv .venv source .venv/bin/activate # Linux/MacOS .venv\Scripts\activate # Windows
-
Install the required dependencies:
pip install -r requirements.txt
To interact with the TikHub API, you'll need an API Key. You can get it by signing up on TikHub.io and navigating to your API dashboard.
Once you have your API Key, create a .env
file in the root directory of the project and add your key as follows:
API_KEY=your_private_api_key
⚠️ Make sure not to commit your.env
file to version control. The.gitignore
file in this repository already contains an entry to exclude.env
files.
If the .env
file does not exist or the API_KEY
is not set properly, the program will create a default .env
file for you with a placeholder. You can then edit this file and replace your_private_api_key
with your actual API Key.
API_KEY=your_actual_api_key
This repository contains multiple example scripts
Douyin Single Video Downloader
Download a single video by providing its share URL. You can find the script in the following path: single_video_downloader.py
Douyin Profile Videos Downloader
Download multiple videos from a specific user profile. You can find the script in the following path: profile_videos_downloader.py
TikTok Single Video Downloader
Download a single video by providing its share URL. You can find the script in the following path: single_video_downloader.py
TikTok Profile Videos Downloader
Download multiple videos from a specific user profile. You can find the script in the following path: profile_videos_downloader.py
Instagram User Profile Data Online Viewer
View the user profile data by providing the username. You can find the script in the following path: instagram_user_info_app.py
This project is licensed under the Apache License - see the LICENSE file for details.