RedditapisRedditapis
Search by Type

Search Reddit Image, Video, and Gallery Posts

Search Reddit posts that carry an image, video, or gallery, with a kind filter and direct media URLs. Includes the pre-filter count so you can page accurately.

GET/api/reddit/search/media$0.002 / call

Search posts that carry media, and get the media URL back with each result.

Reach for this instead of Search Posts when you only want posts with an image, video, or gallery attached, and you want the direct media_url without re-deriving it per post. It is the same underlying Reddit search, narrowed to media and reshaped for it.

Query Parameters

ParameterTypeRequiredDescription
qstringYesSearch query
kindstringNoimage | video | gallery | all (default all)
sortstringNorelevance | new | hot | top | comments (default relevance)
tstringNohour | day | week | month | year | all
nsfwbooleanNotrue to include NSFW (Safe Search off)
limitnumberNoPosts to fetch before the media filter, 1-100 (default 25)
afterstringNoPagination cursor (a t3_ post fullname)

kind is the parameter that distinguishes this endpoint from its siblings. It maps to Reddit's own post classification: image is post_hint=image, video covers both Reddit-hosted and embedded third-party video, and gallery is a multi-image album post.

limit applies before the filter

Read this before you build pagination on top of the endpoint.

limit bounds how many posts we ask Reddit for. The media filter runs after that, on our side, so a request for 25 returns 25 or fewer, and the shortfall is the non-media posts that were dropped. filtered_from reports the pre-filter count so you can tell the two apart.

Measured on q=golden retriever, limit=25:

kindposts returnedfiltered_from
image425
video1725
gallery325
all2425

A short page is normal and does not mean the results are exhausted. Keep paging on after until it comes back null, and count what you have kept rather than counting pages.

Example

curl -H "Authorization: Bearer $TOKEN" \
  "https://api.redditapis.com/api/reddit/search/media?q=golden+retriever&kind=image"
const response = await fetch(
  "https://api.redditapis.com/api/reddit/search/media?q=golden+retriever&kind=image",
  { headers: { Authorization: "Bearer TOKEN" } }
);
import requests

response = requests.get(
    "https://api.redditapis.com/api/reddit/search/media",
    params={"q": "golden retriever", "kind": "image"},
    headers={"Authorization": "Bearer TOKEN"},
)

Response Shape

{
  "posts": [
    {
      "id": "1nv8cae",
      "title": "Some advice and cautions for those thinking about getting a golden retriever.",
      "author": "rowsdowers_mustache",
      "subreddit": "goldenretrievers",
      "upvotes": 6064,
      "comments": 305,
      "url": "https://reddit.com/r/goldenretrievers/comments/1nv8cae/some_advice_and_cautions_for_those_thinking_about/",
      "kind": "gallery",
      "media_url": "https://www.reddit.com/gallery/1nv8cae",
      "thumbnail": "https://b.thumbs.redditmedia.com/ElL5U5oScVGf0WgCWhPEgqf8H-e9sUzgaA3ayyXPIrY.jpg",
      "is_video": false,
      "is_gallery": true,
      "created": "2025-10-01T13:33:40.000Z"
    }
  ],
  "after": "t3_1idundv",
  "filtered_from": 25
}

Response Fields

FieldTypeNotes
idstringPost id without the t3_ prefix
titlestringPost title
authorstringUsername, no u/ prefix
subredditstringSubreddit name, no r/ prefix
upvotesnumberPost score
commentsnumberComment count
urlstringPermalink on reddit.com
kindstring"image", "video", or "gallery". Resolved per post, so it is set even when you queried kind=all.
media_urlstringDirect media URL. For a gallery this is the album page, not a single image.
thumbnailstring | nullThumbnail URL. null when Reddit returns a placeholder such as self or nsfw rather than a real URL.
is_videobooleanReddit-hosted or embedded video
is_gallerybooleanMulti-image album post
createdstringISO-8601 post creation time
afterstring | nullPagination cursor for the next page
filtered_fromnumberHow many posts came back from Reddit before the media filter

Reaching media past the listing cap

A subreddit listing stops at roughly 1000 posts, which is the cap described in Pagination depth. Search is a separate listing with its own budget, so a media search reaches media posts that paging /api/reddit/posts will not. Narrowing with t splits the range further, since each timeframe is its own listing.

This endpoint has no subreddit parameter, so it always searches site-wide. To confine it to one subreddit, put Reddit's subreddit: operator in the query:

q=subreddit:goldenretrievers puppy

That returns media posts from r/goldenretrievers only. If you want a subreddit-restricted search over all posts rather than media, use /api/reddit/search, which does take a subreddit parameter.

Independent third-party API for developers and researchers. Not affiliated with, endorsed by, or sponsored by Reddit, Inc.

On this page