social-media-downloader
Skill7 starsChanged 5 months agoMITView on GitHub
Download video, audio, or images (no-watermark where available) from a social-media URL or list of URLs. Use when the user pastes a TikTok/Douyin/Instagram/YouTube/Twitter/Xiaohongshu link and wants the media file, or says "download this video", "save without watermark", "grab the audio". Dispatches to the right per-platform TikHub endpoint.
- Reads credentials
In this repository18 other files it gives its agents.
- bulk-data-exportSkill
- comments-analysisSkill
- competitor-analysisSkill
- creator-analyticsSkill
- douyinSkill
- hashtag-researchSkill
- instagramSkill
- social-listeningSkill
- tikhub-endpoint-discoverySkill
- tikhub-mcpSkill
- tikhub-onboardingSkill
- tikhub-python-sdkSkill
- tikhub-rest-apiSkill
- tiktokSkill
- trend-researchSkill
- twitter-threadsSkill
- xiaohongshuSkill
- youtubeSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 65
Not an auth/credit error.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Social Media Downloader
Turn a post URL into a saved media file by routing it to the correct platform endpoint, extracting the media URL from the response, and downloading it.
Setup gate
[ -z "${TIKHUB_API_KEY:-}" ] && echo "Set TIKHUB_API_KEY first (see tikhub-onboarding)."Step 1 — Detect the platform from the URL and pick the endpoint
| Platform | Endpoint | Input | Media field |
| TikTok | GET /api/v1/tiktok/app/v3/fetch_one_video_by_share_url | share_url | no-watermark play_addr / download_addr url_list |
| TikTok (by id) | GET /api/v1/tiktok/app/v3/fetch_one_video | aweme_id | url_list |
| Douyin | GET /api/v1/douyin/app/v3/fetch_one_video_by_share_url | share_url | video url_list |
| Douyin (by id) | GET /api/v1/douyin/app/v3/fetch_one_video_v2 | aweme_id | video url_list |
| YouTube | GET /api/v1/youtube/web_v2/get_video_streams_v2 | video_id | video_url | stream URLs (pick resolution) |
GET /api/v1/instagram/v2/fetch_post_info | code_or_url | media URL(s) | |
| Xiaohongshu | GET /api/v1/xiaohongshu/app_v2/get_video_note_detail (video) / get_image_note_detail (images) | note_id | video / image URLs |
| Twitter/X | GET /api/v1/twitter/web/fetch_tweet_detail | tweet_id | media url_list |
For TikTok/Douyin, the *_by_share_url endpoints take the raw URL directly — no need to extract an
id. For the others, pull the id/code from the URL (or resolve it via the platform skill).
Step 2 — Call the endpoint
# TikTok by share URL (simplest — pass the URL straight through)
URL="https://www.tiktok.com/@nasa/video/7650608519288245534"
curl -s "https://api.tikhub.io/api/v1/tiktok/app/v3/fetch_one_video_by_share_url?share_url=$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$URL")" \
-H "Authorization: Bearer $TIKHUB_API_KEY" -o /tmp/media.json
# YouTube streams
curl -s "https://api.tikhub.io/api/v1/youtube/web_v2/get_video_streams_v2?video_id=dQw4w9WgXcQ" \
-H "Authorization: Bearer $TIKHUB_API_KEY" -o /tmp/media.jsonStep 3 — Extract the media URL, then download
Parse the response for the highest-quality (no-watermark, for TikTok/Douyin) media URL — usually a
url_list array or a stream URL — then save it:
curl -L "<media_url_from_response>" -o video.mp4
file video.mp4 # confirm it's a real media containerBatch downloads
Loop over a URL list, one at a time with a small delay (respect QPS 10/sec). Each parse is one
billed call — warn the user for large batches and hand off to bulk-data-export for big jobs.
Verification gate
- Response is
code: 200and contains a non-empty media URL. - Downloaded file is non-empty and the expected type (
file video.mp4shows a video container). - Not an auth/credit error.
Red flags
- Claiming a download succeeded without checking the file is non-empty/valid.
- Using the wrong platform endpoint for a URL — detect the platform first.
- Unbounded batch loops (credit burn + rate limits).
- Re-hosting/redistributing copyrighted media — respect platform ToS and the user's rights.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

