{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Comment Scraper",
    "description": "Reddit Comment Scraper — Extract Reddit comments with usernames, comment text, scores, timestamps, post details, subreddit information, and comment URLs. Useful for audience research, sentiment analysis, content insights, competitor analysis, and social listening.",
    "version": "0.1",
    "x-build-id": "nLeZlCOLawN6Rki5U"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/socialdataapi~reddit-comment-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-socialdataapi-reddit-comment-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/socialdataapi~reddit-comment-scraper/runs": {
      "post": {
        "operationId": "runs-sync-socialdataapi-reddit-comment-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/socialdataapi~reddit-comment-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-socialdataapi-reddit-comment-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "startUrls": {
            "title": "🔗 Reddit post URLs",
            "type": "array",
            "description": "Reddit posts to scrape, one per line. Accepts www, old, new and mobile reddit.com post links, redd.it short links or a bare post ID, for example https://www.reddit.com/r/subreddit/comments/post_id/title/. Optional when you fill in the post discovery section instead.",
            "items": {
              "type": "string"
            }
          },
          "maxComments": {
            "title": "🔢 Maximum comments per post",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of comments to save from each post, direct or discovered (1 to 10,000). Comments are taken in thread order: top-level comments with their kept replies. Free plan: up to 20 comments per run (all posts together) and 200 per month; paid plans have no limit.",
            "default": 10
          },
          "replyLimit": {
            "title": "🔢 Replies per comment",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "How many replies to keep under each comment, at every depth (0 to 100). Kept replies are saved as their own rows and also nested in the parent's replies field. Set 0 to keep all replies.",
            "default": 1
          },
          "sortOrder": {
            "title": "🔃 Sort order",
            "enum": [
              "hot",
              "new",
              "top",
              "controversial",
              "old"
            ],
            "type": "string",
            "description": "Order of the comments, which also decides which comments are kept when a post has more than the maximum. Hot uses Reddit's default (best) order. In post discovery it also orders plain subreddit links (for example https://www.reddit.com/r/ChatGPT/) and keyword searches; a link that names its own order, such as /top/ or ?sort=new, keeps it. Reddit has no oldest-first post list, so Old lists the newest posts first in discovery, and keyword searches use Top for Controversial. Top and Controversial lists cover the past day unless the link sets a time range such as ?t=week.",
            "default": "hot"
          },
          "sinceDate": {
            "title": "📅 Only comments since",
            "type": "string",
            "description": "Only save comments created on or after this date. Use a date (YYYY-MM-DD) or a relative value such as 3 days or 1 week."
          },
          "untilDate": {
            "title": "📅 Only comments until",
            "type": "string",
            "description": "Only save comments created on or before this date; the whole day counts. Use a date (YYYY-MM-DD) or a relative value such as 3 days or 1 week."
          },
          "searchUrls": {
            "title": "🔗 Subreddit or search URLs",
            "type": "array",
            "description": "Subreddit links (for example https://www.reddit.com/r/ChatGPT/ or https://www.reddit.com/r/ChatGPT/top/) or Reddit search links (for example https://www.reddit.com/r/ChatGPT/search/?q=gpt5) to find posts from. A time range in the link, such as ?t=week or ?t=all, is used. A post link pasted here is scraped as a post. A plain word instead of a link is searched as a keyword.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "🔎 Search keyword",
            "type": "string",
            "description": "A keyword or phrase to search all of Reddit for matching posts. Works together with or instead of the subreddit or search URLs."
          },
          "maxPostsToDiscover": {
            "title": "🔢 Maximum posts to discover",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of posts to find in total from the subreddit or search URLs and the search keyword combined (1 to 500). A post found twice, or already in your post URLs, is counted once. Not used when you only paste post URLs.",
            "default": 10
          },
          "safeSearch": {
            "title": "✅ Skip NSFW posts",
            "type": "boolean",
            "description": "Skip posts marked NSFW (over 18) that are found through discovery. Pasted post URLs are always scraped.",
            "default": false
          },
          "enrichAuthorProfile": {
            "title": "✅ Add author karma and account age",
            "type": "boolean",
            "description": "Adds an authorProfile object to every row: total, post and comment karma, account creation date and Reddit Gold status. Looked up once per unique author, for up to 300 authors per run; later authors and deleted accounts get an empty object.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Off by default: the Actor connects directly and moves to Apify's US residential proxy when Reddit slows the direct connection down. Switch it on to send every request through the proxy you choose here, with a fresh session on each retry."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}