{
  "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.0",
    "x-build-id": "vbe28L93VzFv9ZmBD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/citrine_venus~reddit-post-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-citrine_venus-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/citrine_venus~reddit-post-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-citrine_venus-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/citrine_venus~reddit-post-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-citrine_venus-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "🔗 Reddit post URLs",
            "type": "array",
            "description": "📎 Links to the Reddit posts/threads to scrape. Any format works — `reddit.com`, `www.`, `old.`, `new.`, `np.`, `m.`, short `redd.it` links, and share links are all accepted and de-duplicated automatically. Bulk input supported.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "📚 Subreddits (optional)",
            "type": "array",
            "description": "🗂️ Pull the top posts from these subreddits and scrape all of their comments — for example `Python`, `MachineLearning`. Combines with URLs, search and usernames in the same run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "🔎 Search query (optional)",
            "type": "string",
            "description": "🧭 Find posts matching this text across Reddit (or inside one subreddit below) and scrape their comments.",
            "default": ""
          },
          "searchInSubreddit": {
            "title": "🎯 Restrict search to one subreddit (optional)",
            "type": "string",
            "description": "📌 When set, the search query above only looks inside this subreddit.",
            "default": ""
          },
          "usernames": {
            "title": "👤 Usernames (optional)",
            "type": "array",
            "description": "🧑‍💻 Scrape the comments of posts these Reddit users have commented in — for example `spez`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "subredditSort": {
            "title": "📶 Subreddit sort order",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "📊 How to order posts when pulling from a subreddit.",
            "default": "hot"
          },
          "searchSort": {
            "title": "🔍 Search result sort order",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "📊 How to order results for the search query. `Most discussed` is usually the best pick for a comment scraper.",
            "default": "relevance"
          },
          "subredditTimeFilter": {
            "title": "🗓️ Time filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "⏳ Time window for `top` / `controversial` subreddit sort and for search results.",
            "default": "week"
          },
          "maxPostsPerSource": {
            "title": "📬 Max posts per source",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "🎁 How many posts to pull from each subreddit, search or username source. Direct URLs always scrape in full regardless of this value.",
            "default": 10
          },
          "commentSort": {
            "title": "🔃 Comment sort order",
            "enum": [
              "top",
              "best",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "📶 Order comments are collected in (mirrors Reddit's own sort options).",
            "default": "top"
          },
          "maxCommentsPerPost": {
            "title": "🔢 Max comments to save per post",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "📏 Caps how many comments are WRITTEN per post — collection still runs in full first so filters and the coverage report stay accurate. `0` = unlimited.",
            "default": 0
          },
          "maxDepth": {
            "title": "🌲 Max reply depth",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "📐 Only keep comments up to this nesting depth (`0` = top-level only would be `1`). `0` = unlimited depth.",
            "default": 0
          },
          "includeReplies": {
            "title": "↪️ Include replies",
            "type": "boolean",
            "description": "💬 Keep nested reply comments, not just top-level ones.",
            "default": true
          },
          "expandAll": {
            "title": "📂 Expand hidden comments",
            "type": "boolean",
            "description": "🧵 Automatically reveal every collapsed \"load more comments\" section so the thread is collected in full, not just the first page.",
            "default": true
          },
          "completenessPass": {
            "title": "✅ Run the completeness pass",
            "type": "boolean",
            "description": "🔬 An extra pass that double-checks the thread for anything still missing after the first expansion and fills it in. Recommended for big threads — leave this on.",
            "default": true
          },
          "maxMoreRequestsPerPost": {
            "title": "🛡️ Max expansion requests per post",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "🧯 Safety valve for huge threads — caps how many \"load more\" requests one post can use. `0` = unlimited.",
            "default": 0
          },
          "maxBackfillRequests": {
            "title": "🛡️ Max completeness-pass requests per post",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "🧯 Safety valve for the completeness pass. `0` = unlimited.",
            "default": 0
          },
          "maxBackfillRounds": {
            "title": "🔁 Completeness-pass rounds",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "🔂 How many rounds the completeness pass may run before it stops.",
            "default": 6
          },
          "backfillBatch": {
            "title": "📦 Completeness-pass batch size",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "📊 How many spots are rechecked per round during the completeness pass.",
            "default": 60
          },
          "minScore": {
            "title": "⭐ Minimum score",
            "type": "integer",
            "description": "📈 Only keep comments with at least this many upvotes. Leave empty for no minimum."
          },
          "dateFrom": {
            "title": "📅 Posted after",
            "type": "string",
            "description": "⏳ Only keep comments posted on or after this date.",
            "default": ""
          },
          "dateTo": {
            "title": "📅 Posted before",
            "type": "string",
            "description": "⏳ Only keep comments posted on or before this date.",
            "default": ""
          },
          "keywords": {
            "title": "🔑 Keywords",
            "type": "array",
            "description": "🧵 Only keep comments whose text contains at least one of these words (or all of them, with the toggle below).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordsMatchAll": {
            "title": "🔗 Require ALL keywords",
            "type": "boolean",
            "description": "☑️ On = a comment must contain every keyword. Off = any one keyword is enough.",
            "default": false
          },
          "authors": {
            "title": "🧑‍💻 Only these authors",
            "type": "array",
            "description": "👤 Only keep comments written by these usernames. Leave empty to keep every author.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "skipDeleted": {
            "title": "🗑️ Skip deleted / removed comments",
            "type": "boolean",
            "description": "🧹 Drop comments whose text or author has been deleted or removed.",
            "default": true
          },
          "includePostInfo": {
            "title": "📰 Attach post info to every comment",
            "type": "boolean",
            "description": "🔗 Repeat the parent post's title, author, score and text on every comment row — handy for flat CSV/Excel exports.",
            "default": true
          },
          "includePostRecord": {
            "title": "📄 Emit the post as its own row",
            "type": "boolean",
            "description": "📌 Also save the post itself as a separate row (with the coverage report attached), not just its comments.",
            "default": false
          },
          "includeThreadPath": {
            "title": "🧭 Include the ancestor chain",
            "type": "boolean",
            "description": "🪜 Attach each comment's full parent chain inline — ready-made conversational context for LLM pipelines.",
            "default": false
          },
          "includeBodyHtml": {
            "title": "🌐 Include raw comment HTML",
            "type": "boolean",
            "description": "🔧 Keep the original rendered HTML of the comment body alongside the markdown and plain-text versions.",
            "default": false
          },
          "outputTree": {
            "title": "🌳 Output as a nested tree",
            "type": "boolean",
            "description": "🗂️ Save one row per post with all of its comments nested as replies, instead of one flat row per comment.",
            "default": false
          },
          "authorKarma": {
            "title": "🏅 Look up author karma",
            "type": "boolean",
            "description": "🔍 Fetch post/comment karma for every unique commenter. Adds one extra request per unique author, so runs take longer.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "🚦 By default the run uses NO proxy. If Reddit pushes back, it automatically retries on a datacenter proxy, then a residential proxy (3 attempts), and stays on the residential route for the rest of the run. Pick your own route here to override that.",
            "default": {
              "useApifyProxy": false
            }
          },
          "browserFallback": {
            "title": "🧭 Browser rescue",
            "type": "boolean",
            "description": "🧭 As a last resort, retry stubborn requests inside a real browser session.",
            "default": true
          },
          "concurrency": {
            "title": "⚡ Parallel requests",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "🏎️ How many posts / comment batches to process at the same time.",
            "default": 4
          },
          "requestDelay": {
            "title": "🐢 Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "🕰️ A small pause keeps the run polite and stable. Random jitter is added automatically.",
            "default": 0.7
          },
          "maxRetries": {
            "title": "🔁 Retries per request",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "🛡️ Attempts before a request gives up or the run escalates to the next network route.",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}