Reddit Post API - Get Post Body and Comments
FetchLayer fetchlayer.dev Sign in

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.

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 number optional

Number of top-level comment pages to expand. (default: 5)

depth number optional

Maximum comment nesting depth to expand in the comment tree. (default: 5)

Response Fields

post

Full post body + depth-limited comment tree

blocked boolean

Whether Reddit returned a block or verification page.

blockReason string | null

Machine-readable block reason when blocked is true; otherwise omitted.

blockedBodyText string | null

Diagnostic block-page text when blocked is true; otherwise omitted.

pageTitle string

Title of the scraped Reddit page.

requestedUrl string

Reddit URL requested by the scraper.

fetchUrl string

Normalized Reddit URL fetched by the scraper.

finalUrl string

Final URL after redirects.

responseStatus number | null

HTTP status returned by Reddit, or null when unavailable.

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.

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.

media[].kind string

Media type: image, video, embed, or link.

media[].url string

Absolute media URL.

media[].label string | null

Media label when available.

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[].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[].children array

Nested child comment objects with the same comment shape.

commentCountFromTree number

Number of comments extracted into the tree.

commentPagesRequested number

Number of comment pages requested.

commentPagesScraped number

Number of comment pages scraped.

remainingMoreCommentsCount number

Unexpanded more-comments placeholders remaining.

scrapedAt string

ISO 8601 timestamp for the scrape.

transport string

Reddit page transport used for extraction.

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

{
  "blocked": false,
  "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,
      "children": []
    }
  ],
  "commentCountFromTree": 1,
  "commentPagesRequested": 1,
  "commentPagesScraped": 1,
  "transport": "new-reddit-html"
}