The most upvoted videos, images, GIFs and galleries of time from the communities in subreddits (or a list of viral-media communities); text posts, links and embedded players never qualify. Each post adds a ready-to-use media block: video files in several sizes with duration and poster, image preview, GIF or gallery images; video links expire within about a day. One list ordered by score (upvotes); continue with next_page_token. Billed 1 request per 5 communities read, on every page (minimum 1).
HTTP Request
GET /content/viral-media
Cost (in requests): 1 per 5 communities read. Every successful answer reports its cost in data.billed_requests.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
subreddits | string | No | - | Comma-separated subreddit names, r/name, or t5_ ids, 1–25 (case-insensitive). Omit to use the viral-media communities nextfuckinglevel, oddlysatisfying, interestingasfuck, funny, BeAmazed, Damnthatsinteresting, aww, MadeMeSmile, Unexpected, PublicFreakout (echoed in default_subreddits). |
page_token | string | No | - | Opaque page token from a previous response’s next_page_token. Omit for the first page. |
per_page | integer | No | 25 | Results per page, 1–25 (default 25). One page is billed 1 request. |
time | string | No | day | Window of the top listing: day (default), week, month, year, all. |
media_type | string | No | all | video, image, gif or gallery. Embedded players such as YouTube links are never returned. all (default) = no filter, every kind. |
include_nsfw | boolean | No | true | Default true: adult content included (posts from, or communities marked, NSFW); pass false to exclude it. |
include_html | boolean | No | false | Adds body_html (the rendered HTML body) to every post and comment. Default: left out; body_text carries the same text. |
translate_to | string | No | none | Reddit’s own machine translation of post titles and bodies (stories: the story text) into this language (default none: original language). Availability varies by post and page: check is_translated on each row. See the allowed values in the API overview
. |
Response
Real response to GET /content/viral-media (arrays trimmed to 2 items, long texts cut with …).
| |
Response Fields
| Field | Type | Description |
|---|---|---|
status | boolean | true when the request succeeded |
request_id | string | Unique request identifier |
data | object | Viral media page; null on an input answer. |
data.items | array of objects | Media posts ordered by score across the requested communities. |
data.items[].post_id | string | Post fullname, e.g. t3_z1c9z. |
data.items[].title | string | Post title; null when Reddit shows only its removal placeholder ([ Removed by moderator ]…). |
data.items[].type | string | text, link, image, gif, gallery, video, poll, crosspost, embed, game. A text post with inline images is text (its images in body_media). Only with with_details=true on /post/batch and /answers. |
data.items[].permalink | string | Reddit path, e.g. /r/IAmA/comments/z1c9z/i_am_barack_obama/ (Reddit’s relative value; post_url is the same thread as a full link). Either form can be passed back as url. |
data.items[].post_url | string | Absolute link of the post’s Reddit thread (https://www.reddit.com + permalink), ready to open. |
data.items[].url | string | Where the post points (Reddit’s own url): the outside page for link posts, the image or video file for media posts (https://i.redd.it/…, https://v.redd.it/…), the original post for crossposts, the thread itself for text posts. The post’s own thread is post_url. |
data.items[].domain | string | Link domain (arstechnica.com). For a text post Reddit fills the placeholder self.{subreddit}, which is not a link domain: /domain/posts refuses it; list text posts with /subreddit/posts?post_type=text. |
data.items[].subreddit | string | Subreddit name without r/. |
data.items[].subreddit_id | string | Subreddit id (t5_…). |
data.items[].is_subreddit_nsfw | boolean | The community is 18+ (a post can be safe for work in an 18+ community); null when this endpoint does not carry it. Only with with_details=true on /post/batch, /domain/posts and /answers. Left out on /subreddit/multi-posts. |
data.items[].author | string | Author username; [deleted] is reported as null with is_author_deleted true. Only with with_details=true on /post/batch and /answers. |
data.items[].is_author_deleted | boolean | The author’s account is deleted (the post may remain). |
data.items[].author_id | string | Author account id (t2_…). Only with with_details=true on /post/batch and /answers. |
data.items[].author_avatar_url | string | Author avatar URL. Only with with_details=true on the routes that have it; left out on /media/search and /subreddit/multi-posts. |
data.items[].flair | object | Post flair. Only with with_details=true on /post/batch and /answers (always on /post/search). On the listing-card routes (/subreddit/posts, the feeds, /content/*, /user/activity and /user/insights posts) it holds text and background_color only. |
data.items[].flair.text | string | Flair text (emoji shortcodes kept, e.g. :phx-2: Suns). |
data.items[].flair.background_color | string | Hex background colour (#0079D3) or null when the flair has no colour. |
data.items[].language | string | Post language code (listings only). Left out on the routes without a translate_to parameter. |
data.items[].is_translated | boolean | Reddit machine-translated the title and body (asked with translate_to); null when this endpoint does not report it. Left out on the routes without a translate_to parameter. |
data.items[].translated_to | string / null | Language code of the translation when is_translated; else null. language stays the original language. Left out on the routes without a translate_to parameter. |
data.items[].score | integer | Net upvotes at fetch time. |
data.items[].upvote_ratio | float | Upvote share 0–1, 4 decimals (e.g. 0.8218). Only with with_details=true on the routes that have it. Left out on /subreddit/multi-posts. Left out on /media/search. |
data.items[].comments_count | integer | Comment count reported by Reddit. |
data.items[].awards_count | integer | Number of awards; present only when the post has awards. |
data.items[].top_award_id | string | Id of the top award, e.g. award_sad_2; present only when the post has awards. For reference; not an input of this API. |
data.items[].top_award_icon_url | string | Icon URL of the top award; present only when the post has awards. |
data.items[].created_at | string | ISO-8601 UTC creation time, microsecond precision. Left out on /media/search and on /answers without with_details. |
data.items[].edited_at | string / null | ISO-8601 UTC last edit; null when never edited. Filled on /post/details; never on /post/batch; the post embedded in /post/comments, /post/export, /post/summary and the other single-post routes leaves it out (read it on /post/details). |
data.items[].is_nsfw | boolean | Marked NSFW. |
data.items[].is_spoiler | boolean | Marked spoiler. Only with with_details=true on /post/batch and /answers. |
data.items[].is_stickied | boolean | Pinned in the feed (feeds and listings only). Only with with_details=true on /post/batch and /answers (always on /post/search). Left out on /media/search. |
data.items[].is_locked | boolean | Comments locked. Only with with_details=true on /post/batch and /answers (always on /post/search). Left out on /media/search. |
data.items[].is_archived | boolean | Archived (no new votes or comments). Only with with_details=true on the routes that have it (always on /post/search). Left out on /media/search. |
data.items[].is_crosspost | boolean | The post is a crosspost. Only with with_details=true on the routes that have it. Left out on /media/search. |
data.items[].crosspost_parent_id | string / null | Id of the original post (t3_…) this crosspost shares; null unless is_crosspost and the endpoint carries it. Pass it to /post/details. Only with with_details=true on /post/batch and /answers (always on /post/search). |
data.items[].crosspost_parent_subreddit | string / null | Subreddit of the original post, without r/; null unless is_crosspost. Only with with_details=true on /post/batch and /answers (always on /post/search). |
data.items[].is_highlighted | boolean | Highlighted by the moderators. Served on the listing routes and on /post/details; the post embedded in /post/comments, /post/export, /post/summary and the other single-post routes leaves it out (read it on /post/details), as do the routes that do not have it. |
data.items[].is_ama | boolean | AMA post. Served on the listing routes (subreddit posts, feeds, user activity, content); left out on other routes, such as /post/details, /post/comments, /post/search and /post/batch. |
data.items[].ama_state | string / null | State of a scheduled AMA as Reddit reports it; null when the post is not a scheduled AMA. Served on the listing routes (subreddit posts, feeds, user activity, content); left out on other routes, such as /post/details, /post/comments, /post/search and /post/batch. |
data.items[].ama_starts_at | string / null | ISO-8601 UTC start of a scheduled AMA; else null. Served on the listing routes (subreddit posts, feeds, user activity, content); left out on other routes, such as /post/details, /post/comments, /post/search and /post/batch. |
data.items[].ama_ends_at | string / null | ISO-8601 UTC end of a scheduled AMA; else null. Served on the listing routes (subreddit posts, feeds, user activity, content); left out on other routes, such as /post/details, /post/comments, /post/search and /post/batch. |
data.items[].distinguished | string / null | moderator or admin when the post is distinguished; else null. Only with with_details=true on the routes that have it. |
data.items[].removed_by | string / null | Who removed the post: moderator, author, automod, spam, reddit or other; null when live or when this endpoint does not carry it. Only with with_details=true on the routes that have it. |
data.items[].removal_category | string / null | Reddit’s removal reason as sent, e.g. moderator or automod_filtered; null when live. Only with with_details=true on the routes that have it. |
data.items[].position | integer | 1-based rank across all pages of this result. |
data.items[].thumbnail_url | string / null | Thumbnail URL. |
data.items[].thumbnail_width | integer / null | Thumbnail pixel width; null when this endpoint does not carry it. Only with with_details=true on the routes that have it. |
data.items[].thumbnail_height | integer / null | Thumbnail pixel height; null when this endpoint does not carry it. Only with with_details=true on the routes that have it. |
data.items[].body_text | string / null | Self text as plain text. Only with with_details=true on the routes that have it. Left out on /post/crossposts, /post/by-url and /subreddit/multi-posts. Left out on /media/search. |
data.items[].body_media | array | Images and videos embedded in the text body, in order; empty when none or when this endpoint does not carry them. Only with with_details=true on the routes that have it. |
data.items[].word_count | integer | Words in the post body (0 without a body). Present only on the community listings, the Reddit-wide feeds and the content endpoints. |
data.items[].read_time_seconds | integer | Reading time of the body at 230 words per minute. Present with word_count. |
data.items[].poll | object / null | Poll options and totals (poll posts only). Only with with_details=true on the routes that have it. |
data.items[].media | object | Media renditions and URLs. Hosted-video URLs are signed and expire within about a day: download promptly. |
data.items[].media.type | string | Media kind: image, video, gif, gallery, embed or null. |
data.items[].media.preview_url | string | Largest still preview URL. |
data.items[].media.preview_width | integer / null | Preview pixel width. |
data.items[].media.preview_height | integer / null | Preview pixel height. |
data.items[].media.preview_variants | array | Every size Reddit renders of the preview image, smallest first; empty when this endpoint does not carry them. |
data.items[].media.alt_text | string / null | Image description the author set for screen readers; null when none. |
data.items[].media.hls_url | string | HLS playlist (.m3u8) for hosted video. |
data.items[].media.video_url | string / null | Player URL of a third-party embed (YouTube, Streamable…), or the downloadable MP4 of a Reddit-hosted video (signed, expires within about a day). Null when the source of the route does not carry it (a hosted video on a listing card: use renditions). |
data.items[].media.poster_url | string | Video poster image. |
data.items[].media.captions_url | string | WebVTT captions URL when available. |
data.items[].media.duration_seconds | integer | Video duration in seconds. |
data.items[].media.width | integer | Video pixel width (a hosted video’s full size, or the embed player’s size). |
data.items[].media.height | integer | Video pixel height (a hosted video’s full size, or the embed player’s size). |
data.items[].media.renditions | array of objects | MP4 renditions with bitrate and size (hosted video only). |
data.items[].media.renditions[].url | string | Signed MP4 URL (expires in about a day — never cache). |
data.items[].media.renditions[].width | integer | Pixel width. |
data.items[].media.renditions[].height | integer | Pixel height. |
data.items[].media.renditions[].bitrate_bps | integer | Bitrate in bits per second. |
data.items[].media.renditions[].codec | string | Video codec (e.g. h264). |
data.items[].media.embed_html | string / null | oEmbed iframe HTML for third-party embeds (YouTube, Streamable…). |
data.items[].media.embed_provider | string / null | Embed provider name, e.g. YouTube or Streamable; null on Reddit-hosted media. |
data.items[].media.gallery | array | Gallery images in page order. |
data.has_next_page | boolean | More posts available. |
data.next_page_token | string | Token for the next page; null at the end. |
data.resolved_filters | object | Filters as applied. |
data.resolved_filters.subreddits | array of objects | One entry per requested community, in the order given; source is param, default (maintained list) or not_found/the community state when skipped. resolved: null with source param/default means the community was skipped this time. |
data.resolved_filters.subreddits[].input | string / null | What the caller sent. |
data.resolved_filters.subreddits[].resolved | string | What was applied on Reddit (null when not applied). |
data.resolved_filters.subreddits[].source | string | param (applied as given), default, not_found (the value does not exist on Reddit), private / banned / quarantined (a community in the scope that cannot be read: skipped), or not_available (translate_to only: Reddit had no translated listing, the rows are served in their original language). |
data.resolved_filters.time | string | Window applied. |
data.resolved_filters.include_nsfw | boolean | Whether NSFW posts were kept. |
data.default_subreddits | array of string | The maintained default list, present only when subreddits was omitted. |
data.computed_at | string | When this answer was computed (RFC 3339, UTC). Older than the request when it was served from the cache. |
data.billed_requests | integer | Requests billed for this call (also sent as Requests in the X-RapidAPI-Billing header when it is not RapidAPI’s default of 1). |
request_params | object | Echo of the parameters you sent |
Error Responses
Invalid input returns HTTP 400, not billed. error is a plain string that names the parameter:
| |
| Status Code | Cause | Description |
|---|---|---|
| 400 | Invalid or missing parameter | Plain-English message per field. Not billed |
| 503 | Reddit temporarily unreachable | "error": "Service temporarily unavailable". Not billed, retry later |
200 with status: false | Bad page token | error.code is invalid_page_token: pass next_page_token from the previous answer unchanged |
Code Examples
| |
| |
| |
Related Endpoints
- Stories : Long-form text stories from story communities, ready to narrate