Skip to content

Post Comments (JSON body)

POST/v1/reddit/post/comments1 credit

The JSON-body form of GET `/v1/reddit/post/comments`: the same parameters sent as a JSON object, useful when a cursor is too long for a URL. The answer is identical.

01Query parameters

NameTypeDescription
urlrequiredstringThe post URL (`https://www.reddit.com/r/<subreddit>/comments/<id>/...`) or a share URL.
cursoroptionalstringA cursor from the previous answer: `more.cursor` for more top-level comments, or a comment's `replies.more.cursor` for more replies to it.
trimoptionalboolean`true` drops some fields from the post and the comments, as on the GET route.Default: false

02Request

curl -X POST "https://api.scrapesocial.ai/v1/reddit/post/comments" \
  -H "x-api-key: $SCRAPESOCIAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.reddit.com/r/AskReddit/comments/ablzuq/people_who_havent_pooped_in_2019_yet_why_are_you/"}'

03Responses

Real answers from the API. Lists are shortened to 2 items.

POST /v1/reddit/post/comments{"url":"https://www.reddit.com/r/AskReddit/comments/ablzuq/people_who_havent_pooped_in_2019_yet_why_are_you/"}

{
  "success": true,
  "credits_remaining": 4980,
  "credits_charged": 1,
  "post": {
    "id": "ablzuq",
    "author": "ShoddySubstance",
    "author_fullname": "t2_2uhed5z4",
    "subreddit": "AskReddit",
    "title": "People who haven't pooped in 2019 yet, why are you still holding on to last years shit?",
    "selftext": null,
    "selftext_html": null,
    "downs": 0,
    "name": "t3_ablzuq",
    "upvote_ratio": null,
    "ups": 221993,
    "total_awards_received": null,
    "score": 221993,
    "created": 1546376787,
    "created_utc": 1546376787,
    "created_at_iso": "2019-01-01T21:06:27.000Z",
    "num_comments": 7896,
    "url": "https://www.reddit.com/r/AskReddit/comments/ablzuq/people_who_havent_pooped_in_2019_yet_why_are_you/",
    "permalink": "/r/AskReddit/comments/ablzuq/people_who_havent_pooped_in_2019_yet_why_are_you/",
    "subreddit_subscribers": null,
    "is_video": false,
    "archived": true,
    "locked": null,
    "over_18": false,
    "spoiler": false
  },
  "comments": [
    {
      "url": "https://www.reddit.com/r/AskReddit/comments/ablzuq/comment/ed1emmi/",
      "created_utc": 1546379793,
      "created_at_iso": "2019-01-01T21:56:33.000Z",
      "id": "ed1emmi",
      "author": "abksploder",
      "author_fullname": "t2_1jqhk71",
      "body": "Bold of you to assume I'm going to take a shit this year.",
      "body_html": "\n      <p>\n      Bold of you to assume I'm going to take a shit this year.\n    </p>\n    ",
      "distinguished": null,
      "is_submitter": false,
      "stickied": false,
      "collapsed": false,
      "name": "t1_ed1emmi",
      "parent_id": "t3_ablzuq",
      "permalink": "/r/AskReddit/comments/ablzuq/comment/ed1emmi/",
      "ups": 34854,
      "downs": 0,
      "score": 34854,
      "replies": {
        "items": [
          {
            "url": "https://www.reddit.com/r/AskReddit/comments/ablzuq/comment/ed1erpi/",
            "created_utc": 1546379905,
            "created_at_iso": "2019-01-01T21:58:25.000Z",
            "id": "ed1erpi",
            "author": "ShoddySubstance",
            "author_fullname": "t2_2uhed5z4",
            "body": "bottling it up is not healthy!",
            "body_html": "\n      <p>\n      bottling it up is not healthy!\n    </p>\n    ",
            "distinguished": null,
            "is_submitter": true,
            "stickied": false,
            "collapsed": false,
            "name": "t1_ed1erpi",
            "parent_id": "t1_ed1emmi",
            "permalink": "/r/AskReddit/comments/ablzuq/comment/ed1erpi/",
            "ups": 7610,
            "downs": 0,
            "score": 7610,
            "replies": {
              "items": [],
              "more": {
                "has_more": true,
                "cursor": "eyJ0eXBlIjoic2hyZWRkaXRfbW9yZV9jb21tZW50cyIsInNyYyI6Ii9zdmMvc2hyZWRkaXQvbW9yZS1jb21tZW50cy9Bc2tSZWRkaXQvdDNfYWJsenVxP3NvcnQ9Q09ORklERU5DRSZzdGFydGluZ0RlcHRoPTImY29tbWVudFBhcmVudFBvc2l0aW9ucz0wLDAiLCJjdXJzb3IiOiJZMjl0YldWdWRIUnlaV1U2WVdFeU9UVTRaR1FzT2pveU9tUXhPblF4WDJWa01XVnljR2s9Iiwic3VicmVkZGl0IjoiQXNrUmVkZGl0IiwicG9zdElkIjoiYWJsenVxIiwicGFyZW50VGhpbmdJZCI6InQxX2VkMWVycGkifQ"
              }
            }
          }
        ],
        "more": {
          "has_more": true,
          "cursor": "eyJ0eXBlIjoic2hyZWRkaXRfbW9yZV9jb21tZW50cyIsInNyYyI6Ii9zdmMvc2hyZWRkaXQvbW9yZS1jb21tZW50cy9Bc2tSZWRkaXQvdDNfYWJsenVxP3NvcnQ9Q09ORklERU5DRSZzdGFydGluZ0RlcHRoPTEmY29tbWVudFBvc2l0aW9uT2Zmc2V0PTEmY29tbWVudFBhcmVudFBvc2l0aW9ucz0wIiwiY3Vyc29yIjoiWTI5dGJXVnVkSFJ5WldVNk5UY3hZMkUxTkdZc09qb3hPbVY0T2lWUGVGUmZYZz09Iiwic3VicmVkZGl0IjoiQXNrUmVkZGl0IiwicG9zdElkIjoiYWJsenVxIiwicGFyZW50VGhpbmdJZCI6InQxX2VkMWVtbWki…"
        }
      }
    },
    {
      "url": "https://www.reddit.com/r/AskReddit/comments/ablzuq/comment/ed1ap8n/",
      "created_utc": 1546376851,
      "created_at_iso": "2019-01-01T21:07:31.000Z",
      "id": "ed1ap8n",
      "author": "NaziGazpacho",
      "author_fullname": "t2_nuzmznc",
      "body": "It's all I have",
      "body_html": "\n      <p>\n      It's all I have\n    </p>\n    ",
      "distinguished": null,
      "is_submitter": false,
      "stickied": false,
      "collapsed": false,
      "name": "t1_ed1ap8n",
      "parent_id": "t3_ablzuq",
      "permalink": "/r/AskReddit/comments/ablzuq/comment/ed1ap8n/",
      "ups": 46488,
      "downs": 0,
      "score": 46488,
      "replies": {
        "items": [],
        "more": {
          "has_more": true,
          "cursor": "eyJ0eXBlIjoic2hyZWRkaXRfbW9yZV9jb21tZW50cyIsInNyYyI6Ii9zdmMvc2hyZWRkaXQvbW9yZS1jb21tZW50cy9Bc2tSZWRkaXQvdDNfYWJsenVxP3NvcnQ9Q09ORklERU5DRSZzdGFydGluZ0RlcHRoPTEmY29tbWVudFBhcmVudFBvc2l0aW9ucz0xIiwiY3Vyc29yIjoiWTI5dGJXVnVkSFJ5WldVNk5tUTRNelpoT1RZc09qb3hPbVF4T25ReFgyVmtNV0Z3T0c0PSIsInN1YnJlZGRpdCI6IkFza1JlZGRpdCIsInBvc3RJZCI6ImFibHp1cSIsInBhcmVudFRoaW5nSWQiOiJ0MV9lZDFhcDhuIn0"
        }
      }
    }
  ],
  "more": {
    "has_more": true,
    "cursor": "eyJ0eXBlIjoic2hyZWRkaXRfbW9yZV9jb21tZW50cyIsInNyYyI6Ii9zdmMvc2hyZWRkaXQvbW9yZS1jb21tZW50cy9Bc2tSZWRkaXQvdDNfYWJsenVxP3NlZWtlci1zZXNzaW9uPWZhbHNlJnJlbmRlci1tb2RlPXBhcnRpYWwmdG9wLWxldmVsPTEmY29tbWVudHMtcmVtYWluaW5nPTc1JmNvbW1lbnRQb3NpdGlvbk9mZnNldD0yMCIsImN1cnNvciI6IlkyOXRiV1Z1ZEhSeVpXVTZOVGc1TkRNeE0yWXNPam93T21WNE9pVlBlRDVrVkRvblIxOXZSMk1tVm1sUU9pTXZPeUpmSkNOeVZTSkNPMlpJSWxZd0kzSXpRbVp3SWpCa0ltMWFJ…"
  }
}

Common to every endpoint

Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.

GET /v1/cosmos/profile?handle=design

{
  "success": false,
  "message": "Invalid API key"
}

04Notes

Send `Content-Type: application/json`. Paging, limits and errors are those of the GET route. A body that is not valid JSON counts as no parameters, so it answers the free 400 for a missing `url`.

05Errors & credits

Every error has success: false, a real HTTP status and costs no credits.

  • 400missing_parameter

    A required parameter is missing or invalid.

  • 403private_account

    The account is private or age-restricted.

  • 404not_found

    No such account.

  • 503upstream_error

    The platform did not answer; retry shortly.