Shoti API is a lightweight API built with FastAPI to retrieve random TikTok shawty videos with metadata, including the uploader's name, video title, and a direct download link (without a watermark).
-
Random Video Selection:
- The API reads a list of TikTok video URLs from a JSON file (
shoti_videos.json). - A random URL is selected from the list.
- The API reads a list of TikTok video URLs from a JSON file (
-
Metadata Extraction:
- The API sends a request to
https://ssstik.ioto fetch metadata for the selected TikTok video. - Extracted metadata includes:
author: Uploader's name.title: Video title or caption.video_url: No-watermark direct download link.
- The API sends a request to
-
Response:
- The API returns the metadata in JSON format.
Here’s an example of the JSON response you’ll get when hitting the /shoti endpoint:
{
"author": "JohnDoe",
"title": "Check out this cool video!",
"video_url": "https://example.com/video.mp4"
}This file contains a list of TikTok video URLs for the API to choose from:
[
"https://www.tiktok.com/@user/video/123456",
"https://www.tiktok.com/@user/video/789012",
"https://www.tiktok.com/@user/video/345678"
]You can deploy the API on the following platforms:
-
Vercel:
Recommended- Vercel is a simple and scalable platform to deploy FastAPI apps.
- Follow their Python deployment guide.
-
- Render supports deploying FastAPI apps directly from your repository.
- Guide: Render FastAPI Docs.
-
- Railway provides an easy way to deploy FastAPI apps.
- Guide: Deploy on Railway.
-
Push your repository to GitHub:
- Make sure your
main.py,shoti_videos.json, andrequirements.txtare committed and pushed.
- Make sure your
-
Choose a Deployment Platform:
- Select one of the platforms above and follow their deployment steps.
-
Set Environment Variables (if needed):
- Some platforms may require setting environment variables for specific configurations.
-
Test the Deployment:
- Once deployed, visit the
/shotiendpoint to test the API.
- Once deployed, visit the
-
Clone the Repository:
git clone https://github.com/your-username/shoti-api.git cd shoti-api -
Set Up Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Application:
uvicorn main:app --reload
- The API will be available at
http://127.0.0.1:8000.
- The API will be available at
Kaizenega.
Feel free to reach out through the Contact Page for feedback or contributions! 🐸