{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Post Comments Scraper — Full Comment Tree, Any Post URL",
    "description": "Reddit comments scraper: paste post URLs (permalinks, redd.it, share links, comment links) and get every comment as flat rows with parent id, depth, thread path, reply and descendant counts, author, score, timestamps. Expands 'load more' stubs. No login or API key.",
    "version": "0.1",
    "x-build-id": "Fw23qT0CmRc2R1fsl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~reddit-post-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-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/scrapersdelight~reddit-post-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-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/scrapersdelight~reddit-post-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-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": {
          "postUrls": {
            "title": "📥 Reddit post URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "One or more Reddit posts. Accepts full permalinks (`https://www.reddit.com/r/programming/comments/luq9oz/…/`), `redd.it/luq9oz` short links, mobile share links (`/r/sub/s/AbCdEfG`), profile-post links (`/user/name/comments/…`), bare ids (`luq9oz` or `t3_luq9oz`), and **comment permalinks** — paste a link to one comment and you get just that comment's thread. Old/new/np subdomains all work.",
            "default": [
              "https://www.reddit.com/r/programming/comments/luq9oz/how_i_cut_gta_online_loading_times_by_70/"
            ],
            "items": {
              "type": "string"
            }
          },
          "commentSort": {
            "title": "🔀 Comment sort",
            "enum": [
              "top",
              "best",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "The order Reddit ranks the tree in — this decides which comments come first when a cap applies. `top` = highest score first; `best` = Reddit's default \"best\" ranking; `new`, `old`, `controversial`, `qa` as on the site.",
            "default": "top"
          },
          "maxCommentsPerPost": {
            "title": "💯 Max comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many comments for each post (nested replies count). **0 = the whole tree**, however deep — a 1,359-comment thread took 92 calls / ~2 min; a 10,000-comment thread is several hundred calls, so give the run time. The shipped default of 200 keeps a first click under $0.40.",
            "default": 200
          },
          "maxTotalComments": {
            "title": "Max comments for the whole run",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cost cap across all posts. 0 = no cap (the per-post cap still applies). The run's *Max total charge* setting works as well and is honoured to the whole row.",
            "default": 0
          },
          "expandMoreComments": {
            "title": "🌳 Expand \"load more comments\" stubs",
            "type": "boolean",
            "description": "Reddit's first page of a big thread hides part of the tree behind \"load more comments\" and \"continue this thread\" links (measured: a 1,323-comment post shows 479 on page one, 189 stubs hide the other 844). On, the Actor expands them through Reddit's own `morechildren` and subtree endpoints until the tree is complete or your cap is hit. Off = page one only (fast, cheap, `tree_complete` will be false on big threads).",
            "default": true
          },
          "maxDepth": {
            "title": "Max depth",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only comments at this nesting depth or shallower (0-based: top-level comments are depth 0). **0 = unlimited.** Set 1 to keep top-level comments and their direct replies (depths 0 and 1) (their `reply_count` / `descendant_count` are still computed from the full tree). Filtered rows are never billed.",
            "default": 0
          },
          "includeDeleted": {
            "title": "Include [deleted] / [removed] comments",
            "type": "boolean",
            "description": "Reddit keeps a placeholder row for deleted and moderator-removed comments so the tree stays intact. On (default) they are delivered with `is_deleted: true`; off, they are dropped and not billed (their replies are still delivered, with `parent_comment_id` pointing at the missing row).",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "**Residential proxy (country US) is required.** Measured 2026-08-22 through Apify: Chromium on RESIDENTIAL-US cleared Reddit's browser challenge 10/10 across 5 fresh sessions; datacenter Chromium 0/3; plain HTTP 0/66 on every rung. The default below is already correct — do not switch it to datacenter.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "postsPerSession": {
            "title": "Posts per browser session",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many posts one challenge-cleared browser session serves before a fresh session (new exit IP) is minted. Each mint costs ~13 s. A failed post also triggers a re-mint.",
            "default": 40
          },
          "requestDelayMs": {
            "title": "Delay between Reddit calls (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pacing between the JSON calls that expand a tree. Lower is faster but more likely to be throttled. Measured: a 1,359-comment tree = 92 calls, ~2 minutes.",
            "default": 300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}