{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Post Comments Scraper",
    "description": "Scrape every comment and nested reply from any Reddit post or subreddit, no API key or login needed. Get a transparent coverage report showing exactly how complete each thread scrape is, plus filters by score, date, and keyword.",
    "version": "1.2",
    "x-build-id": "YHbWnDEjtwQKtWgCJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data_minds~reddit-post-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data_minds-reddit-post-comments-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/data_minds~reddit-post-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-data_minds-reddit-post-comments-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/data_minds~reddit-post-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-data_minds-reddit-post-comments-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": {
          "urls": {
            "title": "🔗 Post links",
            "type": "array",
            "description": "Reddit post links, one per line (also redd.it and share links). Each post is read in full, up to the comment limit below. Leave empty if you use subreddits, searches or usernames.",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "🔎 Subreddits",
            "type": "array",
            "description": "Subreddit names or links, for example python, r/python or https://www.reddit.com/r/python/. The posts are picked with the post sort below, then their comments are collected.",
            "items": {
              "type": "string"
            }
          },
          "queries": {
            "title": "🔎 Search queries",
            "type": "array",
            "description": "Keywords to search on Reddit, one per line. Each query picks its own posts, then their comments are collected.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "👤 Usernames",
            "type": "array",
            "description": "Reddit usernames (with or without u/). The posts these users commented in are read, with every comment on them.",
            "items": {
              "type": "string"
            }
          },
          "maxCommentsPerPost": {
            "title": "🔢 Max comments per post",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum comments saved for each post. Ten posts with a limit of 50 give up to 500 comments. Use 0 to collect every comment.",
            "default": 20
          },
          "maxPostsPerSource": {
            "title": "🔢 Max posts per subreddit, search or user",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many posts to read for each subreddit, search query and username. Post links always read the exact post.",
            "default": 10
          },
          "commentSort": {
            "title": "🔃 Sort comments by",
            "enum": [
              "top",
              "best",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Order of the comments inside each post, as Reddit shows them.",
            "default": "top"
          },
          "minScore": {
            "title": "🎯 Minimum comment score",
            "type": "integer",
            "description": "Keep only comments with at least this score. Leave empty for no limit."
          },
          "commentFilter": {
            "title": "🎯 Answered by the post author",
            "enum": [
              "all",
              "answered",
              "unanswered"
            ],
            "type": "string",
            "description": "Keep every comment, only threads where the post author replied, or only threads they never replied to.",
            "default": "all"
          },
          "keywords": {
            "title": "🎯 Comment must contain",
            "type": "array",
            "description": "Keep only comments whose text contains these words (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "keywordsMatchAll": {
            "title": "✅ Require all words",
            "type": "boolean",
            "description": "On: a comment needs every word above. Off: any one word is enough.",
            "default": false
          },
          "authors": {
            "title": "👤 Only these authors",
            "type": "array",
            "description": "Keep only comments written by these usernames.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "📅 Comments written from",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Keep comments written on or after this date. Use an exact date such as 2026-01-31, or a relative value such as 30 days (that long ago). Leave empty for no limit."
          },
          "dateTo": {
            "title": "📅 Comments written until",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Keep comments written on or before this date. Use an exact date such as 2026-12-31, or a relative value such as 1 week (that long ago). Leave empty for no limit."
          },
          "maxCommentAgeHours": {
            "title": "📅 Comments from the last N hours",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only comments written within this many hours. Leave empty for no limit."
          },
          "maxDepth": {
            "title": "🎯 Max reply depth",
            "minimum": 0,
            "type": "integer",
            "description": "How deep replies go. 1 = top-level comments only, 2 = plus direct replies. 0 = every depth.",
            "default": 0
          },
          "includeReplies": {
            "title": "✅ Include replies",
            "type": "boolean",
            "description": "Off: only top-level comments are saved.",
            "default": true
          },
          "skipDeleted": {
            "title": "✅ Skip deleted and removed comments",
            "type": "boolean",
            "description": "Off: deleted and removed comments are saved too, marked in the is_deleted and is_removed columns.",
            "default": true
          },
          "postsOnly": {
            "title": "✅ Posts only (no comments)",
            "type": "boolean",
            "description": "On: save one row per post with its details and comment counts, without saving comments.",
            "default": false
          },
          "subredditSort": {
            "title": "🔃 Sort posts of a subreddit by",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "How the posts of each subreddit are picked.",
            "default": "hot"
          },
          "subredditTimeFilter": {
            "title": "📅 Time range for top, controversial and search",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "The period used when sorting posts by top or controversial, and for search queries.",
            "default": "week"
          },
          "searchSort": {
            "title": "🔃 Sort search results by",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "How the posts found by a search query are ranked.",
            "default": "relevance"
          },
          "searchInSubreddit": {
            "title": "🔎 Search only inside subreddit",
            "type": "string",
            "description": "Limit search queries to one subreddit, for example python. Leave empty to search all of Reddit."
          },
          "requireQueryTerms": {
            "title": "✅ Post must contain every query word",
            "type": "boolean",
            "description": "On: only posts whose title or text contains all words of the query are kept.",
            "default": false
          },
          "postedAfter": {
            "title": "📅 Posts published from",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Pick only posts published on or after this date. Applies to subreddits, searches and users. Use an exact date such as 2026-01-31, or a relative value such as 30 days (that long ago). Leave empty for no limit."
          },
          "postedBefore": {
            "title": "📅 Posts published until",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Pick only posts published on or before this date. Use an exact date such as 2026-12-31, or a relative value such as 1 week (that long ago). Leave empty for no limit."
          },
          "maxPostAgeHours": {
            "title": "📅 Posts from the last N hours",
            "minimum": 0,
            "type": "integer",
            "description": "Pick only posts published within this many hours."
          },
          "includePostInfo": {
            "title": "📦 Add post details to every comment",
            "type": "boolean",
            "description": "On: every comment row also carries its post title, score, author, flair and counts (columns starting with post_).",
            "default": true
          },
          "includePostRecord": {
            "title": "📦 Also save one row per post",
            "type": "boolean",
            "description": "On: each post is saved as its own row (record_type post) next to its comments, with coverage details.",
            "default": false
          },
          "includeThreadPath": {
            "title": "📦 Add the reply chain",
            "type": "boolean",
            "description": "On: every reply carries the list of comments above it (thread_path).",
            "default": false
          },
          "includeBodyHtml": {
            "title": "📦 Add comment HTML",
            "type": "boolean",
            "description": "On: the formatted HTML of each comment is saved in body_html.",
            "default": false
          },
          "authorKarma": {
            "title": "📦 Add author karma and account age",
            "type": "boolean",
            "description": "On: adds karma, account creation date and cake-day flag for every comment author. Makes the run slower on large posts.",
            "default": false
          },
          "expandAll": {
            "title": "🔧 Load hidden replies",
            "type": "boolean",
            "description": "On: loads every reply so the comment tree is complete. Makes the run slower.",
            "default": true
          },
          "completenessPass": {
            "title": "🔧 Check for missing replies",
            "type": "boolean",
            "description": "On: adds a final check for missing replies. Makes the run slower but more complete.",
            "default": true
          },
          "concurrency": {
            "title": "⚡ Posts read at the same time",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many posts are read in parallel.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Optional network settings for the run. The default works for most inputs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}