API Description

Reddit Post API — Collect Reddit post details and available author, media and comment data.

Authenticate with your Pangolinfo API Key to receive structured JSON data.

Request URL

POST https://scrapeapi.pangolinfo.com/api/v1/social/reddit-post

Request Headers

ParametersParameter valueTypeDescription
Content-Typeapplication/jsonstringData format
AuthorizationBearer xxxstringAuthorization Token

Collection takes up to approximately 75 seconds. Set your client timeout to 90 seconds.

Request Parameters

ParameterRequiredTypeDescription
targetYesstringTarget URL, supported ID or search keyword for this operation.
optionsNoobjectOptional collection settings, described below.

options Parameters

ParameterRequiredTypeDescription
includeCommunityNobooleanInclude the subreddit card. Default: true.

Only the request parameters listed on this page are used; other fields are ignored. Pass pagination cursors back unchanged, without encoding, decoding or conversion.

Included comments are limited to one page. Use the corresponding comments operation for more.

Normal mode includes at most one reply level without expanding additional collapsed threads. Explicit reply mode uses the reply endpoint defaults.

Response Fields

FieldTypeDescription
codeintegerStatus code; 0 indicates success.
messagestringResponse message; ok on success.
pointCostnumberPoints charged for this request.
dataobjectCollected data, with fields described below.
metaobjectRequest identifier and duration in milliseconds.
billingobjectCharged units, unit price and billing rule version.

data Fields

FieldTypeDescription
typestringResult type.
posterobjectPoster
communityobject | nullCommunity
postobject | nullPost, video or business details.
commentsobject[]Root comments in comment mode.
othersany[]Others
paginationobjectContinuation cursor and whether more results are available.

data.poster Fields

FieldTypeDescription
nicknamestring | nullAuthor display name.
avatarnullAvatar URL.
profileUrlstring | nullAuthor profile URL.
idstring | nullRecord identifier.

data.community Fields

FieldTypeDescription
urlstringContent URL.
namestringName
descstring | nullDesc
weeklyVisitorsnumber | nullWeekly visitors
weeklyContributionsnumber | nullWeekly contributions
subredditIdstring | nullSubreddit id

data.post Fields

FieldTypeDescription
titlestring | nullTitle
captionTextstringCaption text
publishedAtobject | nullPublication time.
likesnumber | nullLike count.
commentsCountnumber | nullPlatform-reported comment total; not the number billed.
videoobject | nullVideo
redditPostIdstringReddit post id
id36string | nullId36
urlstring | nullContent URL.
linkUrlstring | nullLink url
domainstring | nullDomain
subredditstring | nullSubreddit name without r/.
flairstring | nullFlair
upsnumber | nullUps
upvoteRationumber | nullUpvote ratio
numCrosspostsnumber | nullNum crossposts
editedAtobject | nullEdited at
isSelfbooleanIs self
isVideobooleanIs video
over18booleanOver18
spoilerbooleanSpoiler
stickiedbooleanStickied
lockedbooleanLocked
archivedbooleanArchived
distinguishedstring | nullDistinguished
postHintstring | nullPost hint
thumbnailstring | nullThumbnail
previewImagestring | nullPreview image
redditVideoobject | nullReddit video
galleryobject[]Gallery

data.post.publishedAt Fields

FieldTypeDescription
textstring | nullText value.
valuenumber | nullParsed value.

data.post.video Fields

FieldTypeDescription
srcstring | nullSrc
previewstring | nullPreview
posterstring | nullPoster

data.post.editedAt Fields

FieldTypeDescription
textstring | nullText value.
valuenumber | nullParsed value.

data.post.redditVideo Fields

FieldTypeDescription
hlsUrlstringHls url
fallbackUrlstringFallback url
dashUrlstringDash url
widthnumberWidth
heightnumberHeight
durationnumberDuration

data.post.gallery[] Fields

FieldTypeDescription
urlstringContent URL.
widthnumber | nullWidth
heightnumber | nullHeight
captionstring | nullCaption

data.comments[] Fields

FieldTypeDescription
timeobject | nullPublication time.
contentstring | nullContent text; may be null for records without text.
scorenumber | nullComment or post score.
avatarnullAvatar URL.
nicknamestring | nullAuthor display name.
profileUrlstring | nullAuthor profile URL.
idstringRecord identifier.
parentIdstring | nullParent post or comment identifier.
depthnumberComment nesting depth; 0 is a root comment.
replyCountnumberPlatform-reported reply count.
urlstring | nullContent URL.
replysobject[]Nested replies.

data.comments[].time Fields

FieldTypeDescription
textstring | nullText value.
valuenumber | nullParsed value.

data.comments[].replys[] Fields

FieldTypeDescription
timeobject | nullPublication time.
contentstring | nullContent text; may be null for records without text.
scorenumber | nullComment or post score.
avatarnullAvatar URL.
nicknamestring | nullAuthor display name.
profileUrlstring | nullAuthor profile URL.
idstringRecord identifier.
parentIdstring | nullParent post or comment identifier.
depthnumberComment nesting depth; 0 is a root comment.
replyCountnumberPlatform-reported reply count.
urlstring | nullContent URL.
replysobject[]Nested replies.

data.pagination Fields

FieldTypeDescription
commentsobjectRoot comments in comment mode.

data.pagination.comments Fields

FieldTypeDescription
cursorstring | nullContinuation cursor from the previous response. Pass the value unchanged.
hasMorebooleanWhether more results are available.

Request Example

curl --request POST \
  --url https://scrapeapi.pangolinfo.com/api/v1/social/reddit-post \
  --header 'Authorization: Bearer YOUR_PANGOLINFO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "target": "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/"
}'

Response Example

This excerpt shows the first item of each list. Long text and URLs are shortened; pointCost is the charge for the complete response. The playground contains the full schema.

{
  "code": 0,
  "message": "ok",
  "pointCost": 0.8,
  "data": {
    "type": "post",
    "poster": {
      "nickname": "PresidentObama",
      "avatar": null,
      "profileUrl": "https://www.reddit.com/user/PresidentObama/",
      "id": "t2_8t1cq"
    },
    "community": {
      "url": "https://www.reddit.com/r/IAmA/",
      "name": "IAmA",
      "desc": "I Am A, where the mundane becomes fascinating and the outrageous suddenly seems normal.",
      "weeklyVisitors": 436390,
      "weeklyContributions": 997,
      "subredditId": "t5_2qzb6"
    },
    "post": {
      "title": "I am Barack Obama, President of the United States -- AMA",
      "captionText": "Hi, I’m Barack Obama, President of the United States. Ask me anything. I’ll be taking your questions for half an hour starting at about 4:30 ET.\n\nProof it's ...",
      "publishedAt": {
        "text": "2012-08-29T20:01:36.000Z",
        "value": 1346270496000
      },
      "likes": 216184,
      "commentsCount": 22716,
      "video": null,
      "redditPostId": "t3_z1c9z",
      "id36": "z1c9z",
      "url": "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/",
      "linkUrl": "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/",
      "domain": "self.IAmA",
      "subreddit": "IAmA",
      "flair": "",
      "ups": 216184,
      "upvoteRatio": 0.68,
      "numCrossposts": 20,
      "editedAt": {
        "text": "2012-08-29T21:41:43.000Z",
        "value": 1346276503000
      },
      "isSelf": true,
      "isVideo": false,
      "over18": false,
      "spoiler": false,
      "stickied": false,
      "locked": false,
      "archived": true,
      "distinguished": null,
      "postHint": "self",
      "thumbnail": null,
      "previewImage": "https://external-preview.redd.it/KftOKw5o_G5ug7ENkLFbplFDpcApH0MvkQoOQD4nKng.jpg?auto=webp&s=8bb3639e7098b7400dffa84ddcff088561f7c082",
      "redditVideo": null,
      "gallery": []
    },
    "comments": [
      {
        "time": {
          "text": "2012-08-29T20:05:19.000Z",
          "value": 1346270719000
        },
        "content": "How do you balance family life and hobbies with, well, being the POTUS?",
        "score": 1556,
        "avatar": null,
        "nickname": "gobearss",
        "profileUrl": "https://www.reddit.com/user/gobearss/",
        "replys": [
          {
            "time": {
              "text": "2012-08-29T21:04:58.000Z",
              "value": 1346274298000
            },
            "content": "It's hard - truthfully the main thing other than work is just making sure that I'm spending enough time with michelle and the girls. The big advantage I have...",
            "score": 2951,
            "avatar": null,
            "nickname": "PresidentObama",
            "profileUrl": "https://www.reddit.com/user/PresidentObama/",
            "replys": [],
            "id": "t1_c60nmtc",
            "parentId": "t1_c60mmaf",
            "depth": 1,
            "replyCount": 319,
            "url": "https://www.reddit.com/r/IAmA/comments/z1c9z/comment/c60nmtc/"
          }
        ],
        "id": "t1_c60mmaf",
        "parentId": "t3_z1c9z",
        "depth": 0,
        "replyCount": 328,
        "url": "https://www.reddit.com/r/IAmA/comments/z1c9z/comment/c60mmaf/"
      }
    ],
    "others": [],
    "pagination": {
      "comments": {
        "cursor": null,
        "hasMore": true
      }
    }
  },
  "meta": {
    "requestId": "pg-audit-r1-reddit-post-1793954285969851600",
    "durationMs": 8698
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 1,
    "pointCost": 0.8
  }
}

Points Usage

0.8 points per post, video or business. Included comments, replies and author details are free.

Empty results and failed requests are not charged. Duplicate IDs are counted once within a response. Separate calls and pages are billed separately. See Social Media Reviews API billing.

Try it