Posts from any subreddit — hot, new, top, rising
Retrieve the current post feed for a subreddit, or for several at once (python+rust). Several communities are billed per community: 1 credit per community per page of 25 posts, so python+rust+golang is 3 credits a page; a request the balance cannot cover is refused with a 402 before any work. Supports sorting by hot, new, top, rising, and controversial. With createdAfter and/or createdBefore, returns only the posts created in that window (sort new only); a window not fully walked in one request comes back with a nextCursor to continue, and Reddit lists only about the newest 1,000 posts of a community, so older posts in the window may not be available (notes says so).
/community-posts Community https://api.fetchlayer.dev/reddit/community-posts Headers
Authorization string required Bearer token — your FetchLayer API key.
Parameters
subreddit string required Subreddit name (without r/), or several joined with + for one combined feed, such as python+rust. The posts come back mixed, in the order the sort gives. Each distinct community is billed: 1 credit per community per page.
sort string optional Feed sort order: hot, new, top, rising, or controversial. With createdAfter or createdBefore it defaults to new, and only new is accepted. (default: hot)
limit integer optional Maximum number of posts to return. (default: 25)
time string | null optional Time filter for top and controversial sorts: hour, day, week, month, year, or all.
pages integer optional How many pages of results to return, at most. Each page holds 25 results. If omitted, results continue until `limit` is reached (or the 45s time budget ends, returning partial results with `incompleteReason: "scrape_timeout"`), billed as `ceil(items returned / 25)`. If passed, results are capped at that many pages and billed per page actually returned (see `pagesScraped` in the response).
after string optional Continue after this post: pass nextCursor from a previous response (a post fullname such as t3_abc123, or a bare id). Use the same sort and time.
include string[] optional Extra fields per post: ["body"] adds the full post body as bodyText, bodyHtml and bodyMarkdown. Off by default, as it makes responses about three times larger. ["media"] adds media[] to each post, in display order: images, gallery slides with captions, videos with a still (poster), link preview images, with sizes, plus blurredUrl for NSFW or spoiler media. Same price as without it.
createdAfter string optional Only posts created at or after this time (ISO 8601: a date such as `2026-10-01`, or a date-time with an offset such as `2026-10-01T12:00:00Z`). Works with sort `new` only (the default when a date is given); any other sort is a 400. limit counts posts inside the window, and pinned posts outside it are dropped. If the window is not fully walked within the time limit, pass nextCursor as after with the same createdAfter/createdBefore to continue; nextCursor is null once the window’s start is reached.
createdBefore string optional Only posts created before this time (ISO 8601, as `createdAfter`). Works with sort `new` only. It must be later than createdAfter, or the request is a 400.
Response Fields
community-posts
Posts from any subreddit — hot, new, top, rising
listingType string Always community-posts for a successful response.
requestedUrl string The Reddit URL the request was for.
finalUrl string Final URL after redirects.
subreddit string | null Subreddit name without the r/ prefix.
subredditPrefixed string | null Subreddit name with the r/ prefix.
sort string Applied feed sort order.
time string | null Applied time filter, or null when none was supplied.
listingTitle string | null Display title of the subreddit listing.
items[].id string | null Reddit post ID without the t3_ prefix.
items[].fullname string | null Reddit post fullname, including the t3_ prefix.
items[].subreddit string | null Subreddit name without the r/ prefix.
items[].subredditPrefixed string | null Subreddit name with the r/ prefix.
items[].author string | null Author username.
items[].title string | null Post title.
items[].permalink string | null Absolute URL of the Reddit comments page.
items[].shortlink string | null Short redd.it URL for the post.
items[].url string | null Absolute post content URL.
items[].domain string | null Hostname or Reddit domain associated with the post.
items[].createdAt string | null ISO 8601 creation timestamp.
items[].flair string | null Post flair text, or null when the post has no flair.
items[].score number | null Post score.
items[].scoreText string | null Score text as displayed by Reddit.
items[].commentCount number | null Comment count.
items[].commentCountText string | null Comment count text as displayed by Reddit.
items[].previewText string | null Text preview for self posts, or null when unavailable.
items[].thumbnailUrl string | null Post thumbnail URL, or null when unavailable.
items[].nsfw boolean Whether the post is marked NSFW.
items[].spoiler boolean Whether the post is marked as a spoiler.
items[].locked boolean Whether the post is locked.
items[].stickied boolean Whether the post is stickied.
items[].removed boolean | null true when the post has been removed or deleted, false when it is live, null when its status could not be read for this response (notes says how many). Reddit leaves removed posts out of this listing, so a listed post is false; null appears only when its status could not be read.
items[].removedByCategory string | null Almost always null: Reddit leaves removed posts out of this listing. When removed is true (rare), the same values as the post route.
itemCount number Number of posts returned in items.
nextPageUrl string | null The next page’s address, or null at the end. On endpoints that take `after` it is an api.fetchlayer.dev address: POST it with your key to get the next page (a body is optional; fields you send override the address), or pass its `after` parameter as `after`.
prevPageUrl string | null The previous page’s address (its `before` parameter is the cursor), or null.
pagesRequested number Number of pages requested.
pagesScraped number Pages of results returned. This is what the request is billed at: 1 credit per page actually returned, never per page requested.
scrapedAt string ISO 8601 time the result was produced.
transport string The data source: always the platform id, "reddit".
notes string[] Caveats about this result, for example how many posts had a removal status that could not be checked.
items[].authorId string | null The author’s account id (t2_…), which stays the same if the username changes.
items[].subredditId string | null The subreddit’s id (t5_…).
items[].numCrossposts integer | null Exact number of crossposts; null when it could not be checked.
items[].postType string | null What kind of post it is: text, link, image, video or gallery; null when not known. Only text posts have a body.
items[].media object[] | null Only with include ["media"]. The post's media, in display order. null for a text post, a removed post, or a post whose media could not be read on that request; notes says how many. Image and gallery originals (i.redd.it) are stable addresses. Preview and poster addresses (preview.redd.it, external-preview.redd.it) can expire or change, so **download them rather than linking to them long-term.**
items[].media[].kind string image, gallery_item (one slide of a gallery, in Reddit's order), video, or link_preview (a link post's preview image).
items[].media[].url string The real, unblurred media. Reddit-hosted video has no single MP4 with audio: url is the video's HLS streaming playlist (.m3u8, audio and video together, playable by HLS players such as ffmpeg, VLC or hls.js). Embedded videos (for example Streamable or YouTube) point to the provider's page.
items[].media[].width number | null Width in pixels; null when not known.
items[].media[].height number | null Height in pixels; null when not known.
items[].media[].caption string | null gallery_item only: the slide's caption, null when it has none.
items[].media[].poster object | null video only: a still image of the video, { url, width, height }.
items[].media[].blurredUrl string | null Reddit's blurred version of an NSFW or spoiler post's media, when Reddit provides one; otherwise null. The post keeps its nsfw and spoiler flags; url is always the real media.
items[].linkUrl string | null What a non-text post points to: the external site, the image, video or gallery, or a crosspost’s original. Null for a text post. url is unchanged.
items[].bodyText string | null Only with include ["body"]: the full post body as plain text. Null when postType is not text. For a text post, null means a title-only post with no body text, or — when a note says so — a body that could not be returned this time.
items[].bodyHtml string | null Only with include ["body"]: the full post body as HTML.
items[].bodyMarkdown string | null Only with include ["body"]: the full post body as Markdown, converted from the HTML — it renders the same, but is not byte-identical to what the author typed.
nextCursor string | null Pass as after to continue exactly where this response stopped, even partway through a page; null at the end.
Request
curl -X POST "https://api.fetchlayer.dev/reddit/community-posts" \
-H "Authorization: Bearer ss-your-key" \
-H "Content-Type: application/json" \
-d '{"subreddit":"programming","sort":"top","limit":10,"time":"week"}'Response
{
"listingType": "community-posts",
"requestedUrl": "https://www.reddit.com/r/programming/top/?t=week",
"finalUrl": "https://www.reddit.com/r/programming/top/?t=week",
"subreddit": "programming",
"subredditPrefixed": "r/programming",
"sort": "top",
"time": "week",
"listingTitle": "Programming",
"items": [
{
"id": "xyz",
"fullname": "t3_xyz",
"subreddit": "programming",
"subredditPrefixed": "r/programming",
"title": "Example programming post",
"author": "coder123",
"score": 2500,
"scoreText": "2.5K",
"commentCount": 320,
"commentCountText": "320",
"permalink": "https://www.reddit.com/r/programming/comments/xyz/example_programming_post/",
"shortlink": "https://redd.it/xyz",
"url": "https://example.com/article",
"domain": "example.com",
"createdAt": "2026-08-13T03:00:00.000Z",
"flair": "Discussion",
"previewText": null,
"thumbnailUrl": null,
"nsfw": false,
"spoiler": false,
"locked": false,
"stickied": false
}
],
"itemCount": 1,
"nextPageUrl": null,
"prevPageUrl": null,
"pagesRequested": 1,
"pagesScraped": 1,
"scrapedAt": "2026-08-13T03:00:01.000Z",
"transport": "reddit"
}