Reddit Scraper

ENDPOINTS
GET/posts/details

Post Details

Fetch everything about one post: title, body, author, flair, score, upvote ratio, media, poll and crosspost.

QUERY PARAMS

Reddit post ID, t3_ fullname or any reddit.com post link (incl. redd.it short links and /s/ share links).

If Reddit won't serve the post, the 404 body carries a machine-readable reason next to error: post_not_found, subreddit_banned, subreddit_not_found, subreddit_private, subreddit_gold_only, subreddit_quarantined, subreddit_gated, user_suspended or user_not_found (a post on a user profile), or post_unavailable. Reddit names the reason only on the post's subreddit or author profile, so pass the full link (reddit.com/r/<subreddit>/comments/<id>/): a bare ID of an unavailable post can only return post_unavailable. A removed post that still loads has flags.is_removed = true and removed_by (e.g. moderator, reddit, deleted, copyright_takedown).

Images, GIFs and videos pasted into a text post's body are returned in media with type = inline (same item shape as a gallery; a video item has link = HLS playlist and dash_link = DASH playlist). A plain text post keeps media = null.

Examples:

  • ID: z1c9z
  • URL: https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/

Skip the cache and read the post live from Reddit. Without it the response can be up to 5 minutes old.

Default: false

Allowed values: true, false

{
  "post": {
    "id": "z1c9z",
    "title": "I am Barack Obama, President of the United States -- AMA",
    "link": "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/",
    "type": "text",
    "text": "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 me: https://twitter.com/BarackObama/status/240903767350968320\n\nWe're running early and will get started soon.\n\nUPDATE: Hey everybody - this is barack. Just finished a great rally in Charlottesville, and am looking forward to your questions. At the top, I do want to say that our thoughts and prayers are with folks who are dealing with Hurricane Isaac in the Gulf, and to let them know that we are going to be coordinating with state and local officials to make sure that we give families everything they need to recover.\n\nVerification photo: http://i.imgur.com/oz0a7.jpg\n\nLAST UPDATE: I need to get going so I'm back in DC in time for dinner. But I want to thank everybody at reddit for participating - this is an example of how technology and the internet can empower the sorts of conversations that strengthen our democracy over the long run. AND REMEMBER TO VOTE IN NOVEMBER - if you need to know how to register, go to http://gottaregister.com. By the way, if you want to know what I think about this whole reddit experience - NOT BAD!\n\nhttp://www.barackobama.com/reddit\n[edit: link fixed by staff]",
    "text_html": "<!-- SC_OFF --><div class=\"md\"><p>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.</p>\n\n<p>Proof it&#39;s me: <a href=\"https://twitter.com/BarackObama/status/240903767350968320\">https://twitter.com/BarackObama/status/240903767350968320</a></p>\n\n<p>We&#39;re running early and will get started soon.</p>\n\n<p>UPDATE: Hey everybody - this is barack. Just finished a great rally in Charlottesville, and am looking forward to your questions. At the top, I do want to say that our thoughts and prayers are with folks who are dealing with Hurricane Isaac in the Gulf, and to let them know that we are going to be coordinating with state and local officials to make sure that we give families everything they need to recover.</p>\n\n<p>Verification photo: <a href=\"http://i.imgur.com/oz0a7.jpg\">http://i.imgur.com/oz0a7.jpg</a></p>\n\n<p>LAST UPDATE: I need to get going so I&#39;m back in DC in time for dinner. But I want to thank everybody at reddit for participating - this is an example of how technology and the internet can empower the sorts of conversations that strengthen our democracy over the long run. AND REMEMBER TO VOTE IN NOVEMBER - if you need to know how to register, go to <a href=\"http://gottaregister.com\">http://gottaregister.com</a>. By the way, if you want to know what I think about this whole reddit experience - NOT BAD!</p>\n\n<p><a href=\"http://www.barackobama.com/reddit\">http://www.barackobama.com/reddit</a>\n[edit: link fixed by staff]</p>\n</div><!-- SC_ON -->",
    "external_link": null,
    "domain": "self.IAmA",
    "created_at": "2012-08-29T20:01:36Z",
    "edited_at": "2012-08-29T21:41:43Z",
    "subreddit": {
      "name": "IAmA",
      "id": "2qzb6",
      "link": "https://www.reddit.com/r/IAmA/",
      "subscriber_count": 22481839,
      "type": "restricted"
    },
    "author": {
      "username": "PresidentObama",
      "id": "8t1cq",
      "link": "https://www.reddit.com/user/PresidentObama/",
      "flair": {
        "text": "Obama",
        "type": "richtext",
        "css_class": "obama",
        "template_id": null,
        "background_color": null,
        "text_color": "dark",
        "emojis": []
      },
      "is_premium": false,
      "has_patreon_flair": false
    },
    "flair": {
      "text": null,
      "type": "text",
      "css_class": "politics",
      "template_id": null,
      "background_color": null,
      "text_color": null,
      "emojis": []
    },
    "stats": {
      "score": 216188,
      "upvote_ratio": 0.68,
      "comment_count": 22716,
      "crosspost_count": 20,
      "view_count": null
    },
    "flags": {
      "is_self": true,
      "is_nsfw": false,
      "is_spoiler": false,
      "is_stickied": false,
      "is_pinned": false,
      "is_locked": false,
      "is_archived": true,
      "is_edited": true,
      "is_original_content": false,
      "is_contest_mode": false,
      "is_crosspost": false,
      "is_crosspostable": false,
      "is_meta": false,
      "is_media_only": false,
      "is_reddit_media": false,
      "is_robot_indexable": true,
      "is_score_hidden": false,
      "is_quarantined": false,
      "is_removed": false,
      "is_created_from_ads_ui": false,
      "allows_live_comments": true
    },
    "media": null,
    "poll": null,
    "crosspost_parent": null,
    "crosspost_parent_id": null,
    "thumbnail": null,
    "distinguished": null,
    "suggested_sort": "qa",
    "removed_by": null,
    "category": null,
    "content_categories": [],
    "discussion_type": null,
    "treatment_tags": []
  }
}