GAPI

Reddit Downloader API

Posts from Reddit, resolved into direct links. Videos come back with every rendition Reddit encoded, and the audio track alongside them.

GEThttps://api.gapi.dev/reddit

Requires the X-API-Key header · responds in JSON

Parameters

urlrequiredstring

Public Reddit post: reddit.com/r/…/comments/… works, as do redd.it short links.

e.g. https://www.reddit.com/r/IndieDev/comments/10hgvjq/vr_has_been_punishing_for_particles

Responses

{
  "platform": "reddit",
  "type": "video",
  "title": "VR has been punishing for particles performance-wise…",
  "author": "peterfrance",
  "thumbnail": "https://external-preview.redd.it/…",
  "duration": 24,
  "media": [
    { "type": "video", "url": "https://v.redd.it/…/DASH_1080.mp4", "quality": "1080p", "ext": "mp4" },
    { "type": "video", "url": "https://v.redd.it/…/DASH_720.mp4", "quality": "720p AVC", "ext": "mp4" },
    { "type": "audio", "url": "https://v.redd.it/…/DASH_audio.mp4", "quality": "126kbps", "ext": "mp4" }
  ]
}

Try it

GEThttps://api.gapi.dev/reddit
Try
No key yet? Create one free
curl -G 'https://api.gapi.dev/reddit' \
  --data-urlencode 'url=https://www.reddit.com/r/IndieDev/comments/10hgvjq/vr_has_been_punishing_for_particles' \
  -H 'X-API-Key: YOUR_KEY'

What each link gives you

You sendtypemedia contains
a post with a videovideoevery rendition, plus the audio as a separate item
a post with an imageimagethe image at full resolution
a gallery postalbumevery image in it

What it does not do

Subreddit listings, comment threads, user pages and anything on a private or quarantined subreddit. This endpoint takes a link to one post.

Field-by-field detail is on the response shape page.

Picking a height and its sound

Reddit returns every height it holds as a separate silent mp4, and the sound as one audio entry. Take the tallest video and the audio, then join the two. The quality value is a label such as 720p AVC rather than a number, so read the digits before the p.

data = response.json()

video = max(
    (m for m in data["media"] if m["type"] == "video" and m["quality"][0].isdigit()),
    key=lambda m: int(m["quality"].split("p")[0]),
)
audio = next((m for m in data["media"] if m["type"] == "audio"), None)

# Reddit keeps them apart; ffmpeg joins them without re-encoding.
# ffmpeg -i video.mp4 -i audio.mp4 -c copy out.mp4

Code examples

The same request in four languages. Swap in the key from your dashboard and it runs as it is.

curl -G 'https://api.gapi.dev/reddit' \
  --data-urlencode 'url=https://www.reddit.com/r/IndieDev/comments/10hgvjq/vr_has_been_punishing_for_particles' \
  -H 'X-API-Key: gapi_live_your_key_here'

One call, one request

A carousel with ten slides costs the same as a single photo: one charge against your balance. You pay for calls, not for files.

Other platforms