Reddit Post API - Get Post Body and Comments

Full post body + depth-limited comment tree

Retrieve a single post by its full Reddit URL. Returns post metadata, body content, media, outbound links, and top-level comments with descendants through the requested depth. A post that doesn't exist (or is no longer on Reddit at all) returns 404, and so does one in a community that doesn't exist or is banned; a post in a private, quarantined or premium-only community returns 403. Both carry error and code (not_found or forbidden), and neither costs a credit. A post that was removed or deleted still returns 200, with removed: true. A post whose comments Reddit counts but shows none of, because they were removed or deleted, also returns 200, with comments empty and a note saying so. Only a 503 is worth retrying.

POST /post Content
https://api.fetchlayer.dev/reddit/post
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

url string required

Full Reddit post URL.

pages integer optional

Number of top-level comment pages to expand. Billing: 1 credit per 2 comment pages actually read, rounded up (1–2 pages = 1 credit, 3–4 = 2, 5 = 3), never per page requested; commentPagesScraped in the response is the count billed. A post with few comments fits on one page. (default: 5)

depth integer optional

How deep to follow each thread: replies are returned down to this nesting depth (0 is top-level comments only). Deeper trees take longer: depth 10 takes about 40 seconds. Replies below the depth, or that Reddit did not show, are listed in moreComments with a token to load them. (default: 5)

commentDepth integer optional

Another name for depth: threads are followed to this nesting depth (0 returns top-level comments only). Ignored when depth is also given.

commentLimit integer optional

Maximum number of top-level comments. Replies to the comments kept are returned through the requested depth.

totalCommentLimit integer optional

Most comments to return in total, counted in tree order (1 or more). What is left out comes back as moreComments entries that load it.

sort string optional

Order of the comments, as on Reddit: best, top, new, controversial, old or qa. Omit it for Reddit’s default (best). Replies loaded through moreComments keep the same order.

include string[] optional

Extra fields per comment: ["bodyMarkdown"] adds each comment’s body as Markdown (links, lists, quotes and code), converted from bodyHtml. Off by default to keep responses small. On this route ["media"] replaces the post's media field with the richer media[] below (the post itself, not its comments), 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.

Response Fields

post

Full post body + depth-limited comment tree

requestedUrl string

The Reddit URL the request was for.

finalUrl string

Final URL after redirects.

id string | null

Reddit post ID without the t3_ prefix.

fullname string | null

Reddit post fullname, including the t3_ prefix.

subreddit string | null

Subreddit name without the r/ prefix.

subredditPrefixed string | null

Subreddit name with the r/ prefix.

author string | null

Author username.

title string | null

Post title.

permalink string | null

Absolute URL of the Reddit comments page.

shortlink string | null

Short redd.it URL for the post.

url string | null

Absolute post content URL.

domain string | null

Hostname or Reddit domain associated with the post.

createdAt string | null

ISO 8601 creation timestamp.

flair string | null

Post flair text, or null when absent.

score number | null

Post score.

scoreText string | null

Score text as displayed by Reddit.

commentCount number | null

Comment count.

commentCountText string | null

Comment count text as displayed by Reddit.

nsfw boolean

Whether the post is marked NSFW.

spoiler boolean

Whether the post is marked as a spoiler.

locked boolean

Whether the post is locked.

stickied boolean

Whether the post is stickied.

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).

removedByCategory string | null

Who removed it, as Reddit reports it: moderator, reddit (spam filters), automod_filtered, deleted (by its author), anti_evil_ops, content_takedown, copyright_takedown. null when not removed or unknown.

editedAt string | null

ISO 8601 edit timestamp, or null.

bodyText string

Plain-text post body.

bodyHtml string | null

HTML post body when available.

archived boolean

Whether the post is archived.

authorId string | null

The author’s account id (t2_…), which stays the same if the username changes; null for a deleted account.

subredditId string | null

The subreddit’s id (t5_…).

numCrossposts integer | null

How many times the post has been crossposted; null when it could not be checked.

postType string | null

text, link, image, video or gallery; null when it could not be checked. Only text posts have a body.

linkUrl string | null

What a non-text post points to; null for a text post or when it could not be checked.

bodyMarkdown string | null

The body as Markdown, converted from bodyHtml; null when the post has no body.

upvoteRatio number | null

Share of votes that are upvotes, from 0 to 1.

awardCount integer | null

Awards on the post, as Reddit counts them.

distinguished string | null

moderator or admin when the post is distinguished; null otherwise.

media[].kind string

Without include ["media"]: image, video, embed, or link. With include ["media"] the whole media field is replaced by the shape below (kind image, gallery_item, video or link_preview).

media[].url string

Absolute media URL.

media[].label string | null

Without include ["media"]: the media label when available. Not present with include ["media"].

media object[] | null

With include ["media"]: 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.**

media[].width number | null

Width in pixels; null when not known.

media[].height number | null

Height in pixels; null when not known.

media[].caption string | null

gallery_item only: the slide's caption, null when it has none.

media[].poster object | null

video only: a still image of the video, { url, width, height }.

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.

outboundLinks[] string

Absolute outbound links found in the post.

comments[].id string | null

Comment ID without the t1_ prefix.

comments[].fullname string | null

Reddit comment fullname.

comments[].parentFullname string | null

Parent Reddit fullname.

comments[].author string | null

Comment author.

comments[].score number | null

Comment score.

comments[].scoreText string | null

Score text as displayed by Reddit.

comments[].createdAt string | null

ISO 8601 creation timestamp.

comments[].bodyText string

Plain-text comment body.

comments[].bodyHtml string | null

HTML comment body when available.

comments[].bodyMarkdown string | null

Only with include ["bodyMarkdown"]: the body as Markdown, converted from bodyHtml.

comments[].permalink string | null

Absolute comment permalink.

comments[].depth number

Comment nesting depth.

comments[].collapsed boolean

Whether the comment is collapsed.

comments[].stickied boolean

Whether the comment is stickied.

comments[].distinguished string | null

Moderator/admin distinction, or null.

comments[].removed boolean | null

Whether Reddit has taken the comment down: true when it shows the comment as removed or deleted, false when it shows it normally. Reddit leaves out removed comments that have no replies, so only removed comments that still have replies appear.

comments[].removedBy string | null

Who took it down: moderator_or_filter (the community moderators or an automatic filter, which Reddit shows the same way), reddit (removed by Reddit itself, when Reddit shows the comment that way) or author (deleted by its author). null when the comment is not removed. A comment shown by [deleted] with its text intact belongs to a deleted account and is not removed.

comments[].children array

Nested child comment objects with the same comment shape.

comments[].authorId string | null

The author’s account id (t2_…); null for a deleted account or when Reddit does not show it.

comments[].postFullname string | null

The post the comment is on (t3_…).

comments[].parentId string | null

What the comment replies to: another comment (t1_…), or the post (t3_…) for a top-level comment.

comments[].isSubmitter boolean

Whether the comment’s author is the post’s author.

comments[].editedAt string | null

ISO 8601 time the comment was last edited; null when it was not edited or Reddit does not show it.

comments[].awardCount integer | null

Awards on the comment, as Reddit counts them.

comments[].authorFlair string | null

The commenter’s flair in that community, as text (emoji as :code:). null means the commenter wears no flair; it means unknown only when the lookup failed, and notes then says so.

comments[].authorFlairRichtext object[] | null

The same flair as parts: text parts ({ type, text }) and emoji parts ({ type, code, imageUrl }). null when authorFlair is null.

comments[].authorBadges string[] | null

Reddit achievement badges shown beside the commenter’s name, for example Top 1% Commenter. Not flair. [] means read and none; null means not read.

commentCountFromTree number

Number of comments extracted into the tree.

commentPagesRequested number

Number of comment pages requested.

commentPagesScraped number

Pages of comments read. The call is billed 1 credit per 2 of them, rounded up (minimum 1), never by the pages requested.

remainingMoreCommentsCount number

Unexpanded more-comments placeholders remaining.

moreComments object[]

Replies this response did not load: one entry per parent comment. Pass an entry’s expandToken to more-comments to load them. Empty when nothing is hidden.

moreComments[].parentId string

The comment (t1_…) whose replies these are.

moreComments[].depth integer

The depth the hidden replies sit at in the thread (the parent’s depth plus one).

moreComments[].count integer | null

How many replies Reddit says are hidden; null when it does not say.

moreComments[].expandToken string

Pass to more-comments to load these replies. It belongs to this post; a token from anywhere else is a 400.

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. When author flair could not be looked up for some commenters, it says so: those comments have authorFlair: null (unknown), not no flair. When Reddit counts comments on the post but shows none, comments is empty and notes says "Reddit counts N comments on this post but shows none, usually because they were removed."

Request

curl -X POST "https://api.fetchlayer.dev/reddit/post" \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.reddit.com/r/programming/comments/173viwj/meta_the_future_of_rprogramming/","pages":5,"depth":5,"commentLimit":10}'

Response

{
  "id": "173viwj",
  "title": "Example post",
  "author": "reddituser",
  "score": 1500,
  "commentCount": 87,
  "bodyText": "This is the post body...",
  "permalink": "https://www.reddit.com/r/programming/comments/173viwj/example_post/",
  "createdAt": "2026-08-13T03:00:00.000Z",
  "comments": [
    {
      "id": "c1",
      "author": "user1",
      "bodyText": "Great post!",
      "score": 42,
      "depth": 0,
      "parentId": "t3_173viwj",
      "isSubmitter": false,
      "children": []
    }
  ],
  "moreComments": [
    {
      "parentId": "t1_c1",
      "depth": 1,
      "count": 12,
      "expandToken": "m2.…"
    }
  ],
  "commentCountFromTree": 1,
  "commentPagesRequested": 1,
  "commentPagesScraped": 1,
  "transport": "reddit"
}
Product overview Reddit API: what it returns, pricing and use cases