Download videos from TikTok, Instagram, Facebook, YouTube, X and 8 more platforms — a lightweight Java client library.
This is the Java port of the Python reference implementation, built only on
java.net.http.HttpClient (Java 11+) plus the tiny org.json:json library.
Add the Maven dependency:
<dependency>
<groupId>com.mrrahad</groupId>
<artifactId>rahad-all-downloader</artifactId>
<version>1.0.0</version>
</dependency>import com.mrrahad.downloader.DownloadResult;
import com.mrrahad.downloader.Downloader;
// Resolve metadata + direct media URL
DownloadResult info = Downloader.info("https://www.tiktok.com/@user/video/1234567890");
System.out.println(info.title); // video caption
System.out.println(info.videoUrl); // direct no-watermark video URL
System.out.println(info.thumbnail); // cover/thumbnail URL
System.out.println(info.author); // author name
// Download straight to a file
String file = Downloader.downloadToFile("https://www.youtube.com/watch?v=dQw4w9WgXcQ", "video.mp4");
// Alias — download() behaves like info()
DownloadResult result = Downloader.download(url);DownloadResult fields:
| Field | Type | Description |
|---|---|---|
success |
boolean |
whether the request succeeded |
source |
String |
source adapter used (e.g. tikwm, vxtwitter) |
platform |
String |
detected platform (e.g. tiktok) |
videoUrl |
String |
direct no-watermark video URL |
title |
String |
video title/caption |
thumbnail |
String |
cover/thumbnail URL |
author |
String |
author name |
download |
Map<String,String> |
detail map with url, platform, extras |
Each platform is retried up to 2 times on failure, and most platforms have a fallback source — the first successful source wins.
| Platform | Sources |
|---|---|
| TikTok | tikwm → tiktok-downbloder → HTML scrape |
| fdown (best quality) | |
| snapinsta → embed page scrape | |
| YouTube | invidious (best muxed stream) |
| X / Twitter | vxtwitter → savetwitter |
| CapCut | page HTML scrape |
| Kwai | page HTML scrape |
| Snapchat | page HTML scrape |
| Threads | page HTML scrape |
| Likee | page HTML scrape |
| embed resource API | |
| Dailymotion | oEmbed |
| Vimeo | oEmbed |
Unsupported URLs throw IllegalArgumentException("unsupported platform").
mvn packageMohammad Rahad — github.com/MR-RAHAD
MIT — see LICENSE.