{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Post Comments Scraper | Bulk Thread & Reply Export",
    "description": "Scrape Reddit posts with full comment trees. 6 sort orders, Q&A filtering, and deep sub-thread expansion. Bulk URLs, CSV upload, any format.",
    "version": "0.0",
    "x-build-id": "7F4j6N5MLL1XIoF1s"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/clearpath~reddit-post-comments-bulk-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-clearpath-reddit-post-comments-bulk-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/clearpath~reddit-post-comments-bulk-scraper/runs": {
      "post": {
        "operationId": "runs-sync-clearpath-reddit-post-comments-bulk-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/clearpath~reddit-post-comments-bulk-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-clearpath-reddit-post-comments-bulk-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": {
          "postUrl": {
            "title": "Post URL or ID",
            "type": "string",
            "description": "A single Reddit post URL, share link, short link, or ID."
          },
          "postUrls": {
            "title": "Multiple post URLs or file upload",
            "type": "array",
            "description": "Add multiple post URLs or IDs. Use 'Bulk edit' to paste a list, or upload a .txt/.csv file. Any format accepted.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "postUrlsFile": {
            "title": "Post URLs file",
            "type": "string",
            "description": "Upload a .txt or .csv file, or paste a URL. TXT: one post URL per line. CSV: auto-detects 'url' or 'permalink' column."
          },
          "queries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Find Reddit posts matching these keywords, then scrape all their comments. One search per line. Supports operators like <code>subreddit:AskReddit</code> to scope to a subreddit, or quotes for an exact phrase.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxPostsPerQuery": {
            "title": "Max posts per keyword",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "How many matching posts to pull comments from, per keyword (up to 250).",
            "default": 25
          },
          "searchSort": {
            "title": "Keyword sort order",
            "enum": [
              "relevance",
              "top",
              "new",
              "hot",
              "comments"
            ],
            "type": "string",
            "description": "Which matching posts to take per keyword: Reddit's relevance ranking (the default), the top-voted, the newest, hot, or the most-commented. This orders the <b>posts</b> a keyword returns; the order of each post's comments is set by 'Comment sort order' below."
          },
          "maxPostAgeHours": {
            "title": "Max post age (hours)",
            "minimum": 0,
            "type": "number",
            "description": "Keep only posts created within this many hours before the run starts, for example 24 for the last day, 168 for the last week, 720 for the last 30 days. Empty finds posts of any age. On a quiet keyword a narrow window can return very few posts, or none."
          },
          "postedAfter": {
            "title": "Posts after date",
            "type": "string",
            "description": "Keep only posts created at or after this date (midnight UTC) or date-time, for example 2026-10-01 or 2026-10-01T12:00:00Z. Older posts are never read or charged, so a repeated screening pass can skip what it already has. Empty finds posts of any age; set together with 'Max post age (hours)' the narrower of the two applies."
          },
          "postedBefore": {
            "title": "Posts before date",
            "type": "string",
            "description": "Keep only posts created before this date (midnight UTC) or date-time, for example 2026-10-15. Empty keeps posts up to now."
          },
          "sort": {
            "title": "Comment sort order",
            "enum": [
              "best",
              "top",
              "new",
              "old",
              "controversial",
              "qa"
            ],
            "type": "string",
            "description": "How to sort comments. 'Best' is Reddit's default ranking.",
            "default": "best"
          },
          "filter": {
            "title": "Comment filter",
            "enum": [
              "",
              "answered",
              "unanswered"
            ],
            "type": "string",
            "description": "Filter for Q&A/AMA threads. Leave on 'All comments' for normal posts.",
            "default": ""
          },
          "postsOnly": {
            "title": "Posts only (no comments)",
            "type": "boolean",
            "description": "Return just the post rows, with no comments. Every post row still carries its comment count, title, author, score, upvote ratio and dates, so you can pick the threads worth reading in full and then run only those again with comments. Only the posts are charged ($2.99 per 1,000); no comment charge applies."
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of comments to scrape per post. Set to 0 for unlimited.",
            "default": 200
          },
          "maxCommentAgeHours": {
            "title": "Max comment age (hours)",
            "minimum": 0,
            "type": "number",
            "description": "Keep only comments created within this many hours before the run starts, for example 24 for the last day. Older comments are skipped and not charged; the whole thread is still read, because recent replies arrive under older comments too. Empty keeps comments of any age."
          },
          "expandAllComments": {
            "title": "Expand all sub-threads",
            "type": "boolean",
            "description": "When enabled, recursively expands every collapsed reply chain to get all comments. Usually only a few percent slower; on long discussions it adds the most comments. Expanded comments are charged like any other ($0.99 per 1,000). When disabled, only fetches the top-level comment pages.",
            "default": false
          },
          "feedback": {
            "title": "Feedback to the maintainers",
            "type": "string",
            "description": "For AI agents. Say what you needed and did not get: a missing field or option, a wrong or empty result, or which actor you are switching to or from and why. Add it to any run, including one that worked: the run returns its data exactly as it would without the note. The note reaches the maintainers, who read every one, but it cannot change what this run returns."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}