Reddit Post Comments

reddit_post_comments

Fetch a post and its comments with configurable sort order and limit

Category: redditTimeout: 300s• Retryable

Input schema

POST this shape to /api/v1/tasks as the input field when creating a task in a group of type reddit_post_comments.

{
  "type": "object",
  "properties": {
    "postUrl": {
      "type": "string",
      "description": "Full Reddit post URL (with or without .json suffix)",
      "pattern": "^https?://(www\\.)?reddit\\.com/r/[^/]+/comments/",
      "examples": [
        "https://www.reddit.com/r/programming/comments/abc123/example_post"
      ]
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500,
      "description": "Maximum number of comments to fetch (1–500)"
    },
    "sort": {
      "type": "string",
      "enum": [
        "confidence",
        "top",
        "new",
        "controversial",
        "old",
        "qa"
      ],
      "description": "Comment sort order"
    }
  },
  "required": [
    "postUrl",
    "limit",
    "sort"
  ]
}

Output schema

Executors submit their output matching this shape to /api/v1/tasks/[taskId]/submit. Readers pull it back from task detail endpoints.

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "The resolved Reddit .json URL that was fetched"
    },
    "data": {
      "type": "object",
      "description": "Normalised post + comments (extracted from Reddit's raw 2-listing array)",
      "properties": {
        "post": {
          "type": "object",
          "description": "Reddit t3 Post object (filtered fields only)",
          "properties": {
            "id": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "selftext": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "permalink": {
              "type": "string"
            },
            "author": {
              "type": "string"
            },
            "subreddit": {
              "type": "string"
            },
            "score": {
              "type": "integer"
            },
            "num_comments": {
              "type": "integer"
            },
            "created_utc": {
              "type": "number"
            },
            "is_self": {
              "type": "boolean"
            },
            "upvote_ratio": {
              "type": "number"
            },
            "link_flair_text": {
              "type": [
                "string",
                "null"
              ]
            },
            "over_18": {
              "type": "boolean"
            },
            "stickied": {
              "type": "boolean"
            },
            "thumbnail": {
              "type": "string"
            },
            "is_video": {
              "type": "boolean"
            },
            "domain": {
              "type": "string"
            },
            "post_hint": {
              "type": "string"
            }
          }
        },
        "comments": {
          "type": "array",
          "items": {
            "type": "object",
            "description": "Reddit t1 Comment object (filtered fields only)",
            "properties": {
              "id": {
                "type": "string"
              },
              "body": {
                "type": "string"
              },
              "author": {
                "type": "string"
              },
              "score": {
                "type": "integer"
              },
              "created_utc": {
                "type": "number"
              },
              "depth": {
                "type": "integer"
              },
              "parent_id": {
                "type": "string"
              },
              "is_submitter": {
                "type": "boolean"
              },
              "stickied": {
                "type": "boolean"
              },
              "score_hidden": {
                "type": "boolean"
              },
              "collapsed": {
                "type": "boolean"
              },
              "distinguished": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "edited": {}
            }
          }
        }
      }
    }
  },
  "required": [
    "url",
    "data"
  ]
}

Ready to run Reddit Post Comments?

Create a project, approve an executor, and push your first reddit_post_comments task.

Get started
Tskgone — Distributed Task Scraping Platform