Reddit Comment Permalink API - Get a Comment
FetchLayer fetchlayer.dev Sign in

Single comment with parent context and replies

Retrieve a specific comment by its full Reddit permalink, including parent post context, ancestors, and nested replies.

POST /comment-permalink Content
https://api.fetchlayer.dev/reddit/comment-permalink
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

url string required

Full Reddit comment permalink URL.

pages number optional

Number of comment pages to expand. (default: 1)

Response Fields

comment-permalink

Single comment with parent context and replies

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.

listingType string

Always comment-permalink for a successful response.

commentId string

Requested comment ID without the t1_ prefix.

postId string | null

Parent post ID.

subreddit string | null

Parent subreddit name.

subredditPrefixed string | null

Parent subreddit name with r/ prefix.

postTitle string | null

Parent post title.

postAuthor string | null

Parent post author.

postPermalink string | null

Absolute parent post permalink.

postUrl string | null

Parent post content URL.

focalCommentFound boolean

Whether the requested comment was found in the expanded tree.

focalComment object | null

Requested comment with nested children, or null when not found.

focalComment.id string | null

Focal comment ID.

focalComment.fullname string | null

Focal comment fullname.

focalComment.parentFullname string | null

Parent Reddit fullname.

focalComment.author string | null

Focal comment author.

focalComment.score number | null

Focal comment score.

focalComment.scoreText string | null

Focal comment score text.

focalComment.createdAt string | null

ISO 8601 comment creation timestamp.

focalComment.bodyText string

Plain-text focal comment body.

focalComment.bodyHtml string | null

HTML focal comment body.

focalComment.permalink string | null

Absolute focal comment permalink.

focalComment.depth number

Comment nesting depth.

focalComment.collapsed boolean

Whether the focal comment is collapsed.

focalComment.stickied boolean

Whether the focal comment is stickied.

focalComment.distinguished string | null

Moderator/admin distinction, or null.

focalComment.children array

Nested child comment objects.

ancestorComments[].id string | null

Ancestor comment ID.

ancestorComments[].fullname string | null

Ancestor comment fullname.

ancestorComments[].parentFullname string | null

Ancestor parent fullname.

ancestorComments[].author string | null

Ancestor comment author.

ancestorComments[].score number | null

Ancestor comment score.

ancestorComments[].scoreText string | null

Ancestor score text.

ancestorComments[].createdAt string | null

ISO 8601 ancestor creation timestamp.

ancestorComments[].bodyText string

Plain-text ancestor comment body.

ancestorComments[].bodyHtml string | null

HTML ancestor comment body.

ancestorComments[].permalink string | null

Absolute ancestor comment permalink.

ancestorComments[].depth number

Ancestor nesting depth.

ancestorComments[].collapsed boolean

Whether the ancestor is collapsed.

ancestorComments[].stickied boolean

Whether the ancestor is stickied.

ancestorComments[].distinguished string | null

Moderator/admin distinction, or null.

replyCount number

Number of descendants under the focal comment.

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/comment-permalink" \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.reddit.com/r/programming/comments/abc123/example/xyz123/","pages":1}'

Response

{
  "blocked": false,
  "listingType": "comment-permalink",
  "commentId": "xyz123",
  "postId": "abc123",
  "postTitle": "Example post",
  "focalCommentFound": true,
  "focalComment": {
    "id": "xyz123",
    "author": "user1",
    "bodyText": "This is a comment.",
    "score": 100,
    "createdAt": "2026-08-13T03:00:00.000Z",
    "depth": 0,
    "collapsed": false,
    "stickied": false,
    "children": []
  },
  "ancestorComments": [],
  "replyCount": 0,
  "commentPagesRequested": 1,
  "commentPagesScraped": 1,
  "transport": "old-reddit-html"
}