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. Pass back the after value from the previous response exactly as issued; it is opaque and carries your paging depth. See Pagination depth.

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.

Be careful how you read that final null. It means there is no next page to ask for, not that you have seen every matching post. Check listing_status on that last response, as described below.

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 | nullCursor for the next page, or null when there is no next page to request. An empty cursor does not always mean you have every item, so read listing_status (below) to find out which. See Pagination depth.
filtered_fromnumberHow many posts came back from Reddit before the media filter

When after comes back empty

An empty cursor means there is no next page to ask for. It does not always mean you have every post: Reddit often stops serving a busy listing long before it runs out. Paging r/all on 2026-08-14 stopped after 400 posts covering about a minute of a feed that plainly holds more.

The response tells you which happened. When after is null it also carries listing_status, which reads complete, truncated or unknown. Only complete means you have everything; treat the other two as a partial answer and widen your search rather than stopping. The full field list and what to do about each answer is in Pagination depth.

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