9GAG Downloader API
A 9GAG link resolves to the post's own CDN files — no login, no cookies. A photo post returns the 700px JPEG and an animated one an H.264 MP4; that is the largest size 9GAG publishes, so there is no HD original hiding behind it. Long posts carry several media blocks and come back as an album in the order the article uses them, with the written part in meta.text. A direct CDN link (img-9gag-fun.9cache.com/photo/…) is accepted too — the post behind it is looked up for you.
videoimageGET /v1/9gag1.5 credits
Links we accept
Any public post URL on these hosts. Short links and country mirrors are resolved for you.
https://9gag.com/gag/aD2B3LZhttps://m.9gag.com/gag/aD2B3LZhttps://img-9gag-fun.9cache.com/photo/aD2B3LZ_700b.jpg
Hosts
9gag.com · 9cache.com
Request
curl -s "https://api.saveapi.org/v1/9gag" \ -H "Authorization: Bearer sk_live_xxxx" \ -G --data-urlencode "url=https://9gag.com/gag/aD2B3LZ"
Response
{
"success": true,
"platform": "9gag",
"type": "video",
"medias": [
{ "type": "video", "url": "https://…", "ext": "mp4" },
{ "type": "image", "url": "https://…", "ext": "jpg" }
],
"meta": { "title": "…", "author": "…", "thumbnail": "https://…" },
"credits": { "spent": 1.5, "remaining": 99988.5 }
}Questions before you build
- Can I get a bigger file than 700px?
- No. 700px for photos and 460px for animated MP4s is everything 9GAG's CDN publishes — the larger variants were checked and they return 404. What you get back is the biggest file that exists.
- How does a long post come back?
- As an album: medias[] holds every media block in the order the article uses them, and meta.text carries the written part. A long post whose blocks are only quoted tweets or a YouTube embed has no file of its own and returns 404, which costs 0.1 credits.
- What about posts that are just a YouTube video?
- They return 404 with a message saying the video is hosted on YouTube. 9GAG stores no file for those posts; take the YouTube link from the message to /v1/youtube/info instead.