{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Comment Thread Scraper with Score & Keyword Filters",
    "description": "Scrape Reddit comment threads, nested replies included, with author, score, depth, and moderation flags, filtered by date, score, author, or keyword. Optional parent post record. No API key or login.",
    "version": "2.0",
    "x-build-id": "beBoVAhkQuQGT6gKU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~reddit-comment-thread-scraper-with-score/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-reddit-comment-thread-scraper-with-score",
        "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/vexaloom-labs~reddit-comment-thread-scraper-with-score/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-reddit-comment-thread-scraper-with-score",
        "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/vexaloom-labs~reddit-comment-thread-scraper-with-score/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-reddit-comment-thread-scraper-with-score",
        "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": [
          "postUrls"
        ],
        "properties": {
          "postUrls": {
            "title": "Reddit post URLs or IDs",
            "minItems": 1,
            "type": "array",
            "description": "Post URLs, comment URLs, share links or bare post IDs. Accepted forms: full post URL (https://www.reddit.com/r/x/comments/1abc/title/), short URL (https://www.reddit.com/comments/1abc or with ?sort=top), comment URL (.../comments/1abc/title/comment/xyz/), share link (https://www.reddit.com/r/x/s/token), redd.it short link, bare post id (1abc123) or t3_1abc123.",
            "items": {
              "type": "string"
            }
          },
          "maxComments": {
            "title": "Maximum comments per post",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of comment records to save per post, after filters (nested replies included). The archive tree returns at most 25,000 comments; the flat search path returns at most 50,000.",
            "default": 100
          },
          "commentSort": {
            "title": "Sort comments by",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Order of sibling comments. The two data sources do not accept a server-side comment sort, so Top/New/Old/Controversial/Q&A are applied client-side with the fields the source exposes; Best preserves the archive's default order.",
            "default": "confidence"
          },
          "dataSource": {
            "title": "Data source",
            "enum": [
              "auto",
              "archive_tree",
              "archive_search",
              "rss"
            ],
            "type": "string",
            "description": "Auto uses the Arctic Shift comment tree, fills truncated batches from the paginated archive search, and falls back to Reddit's Atom feed only when the archive returns no comments. The single-source modes are useful for diagnostics.",
            "default": "auto"
          },
          "includePost": {
            "title": "Include the parent post record",
            "type": "boolean",
            "description": "When enabled, the parent post metadata is emitted as the first record of each thread.",
            "default": false
          },
          "postedAfter": {
            "title": "Comments created on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only keep comments created on or after this date (UTC)."
          },
          "postedBefore": {
            "title": "Comments created on or before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only keep comments created on or before this date (interpreted as the end of that day, UTC)."
          },
          "minDepth": {
            "title": "Minimum reply depth",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only keep comments nested at or deeper than this depth (0 = keep everything, 1 = drop top-level comments and keep only replies, 2 = keep only replies-to-replies and deeper, etc.). Leave empty for no limit."
          },
          "maxDepth": {
            "title": "Maximum reply depth",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only keep comments nested at or above this depth (0 = top-level comments only, 1 = top-level + first-level replies, etc.). Leave empty for no limit."
          },
          "minCommentScore": {
            "title": "Minimum comment score",
            "minimum": -1000000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep comments with a score (upvotes minus downvotes) at or above this value. Leave empty for no limit. Atom RSS comments have no score and pass this filter."
          },
          "maxCommentScore": {
            "title": "Maximum comment score",
            "minimum": -1000000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep comments with a score at or below this value. Leave empty for no limit. Atom RSS comments have no score and pass this filter."
          },
          "onlyOP": {
            "title": "Only original poster's comments",
            "type": "boolean",
            "description": "When enabled, only comments written by the post's original author are kept.",
            "default": false
          },
          "excludeDeletedRemoved": {
            "title": "Exclude deleted/removed comments",
            "type": "boolean",
            "description": "When enabled, comments marked as deleted or removed (body or author no longer available) are dropped.",
            "default": false
          },
          "excludeCollapsed": {
            "title": "Exclude collapsed comments",
            "type": "boolean",
            "description": "When enabled, comments the archive marks as collapsed by default (low score or crowd control) are dropped.",
            "default": false
          },
          "excludeStickied": {
            "title": "Exclude stickied comments",
            "type": "boolean",
            "description": "When enabled, moderator-pinned comments are dropped.",
            "default": false
          },
          "distinguishedFilter": {
            "title": "Moderator/admin badge filter",
            "enum": [
              "any",
              "moderator",
              "admin",
              "none"
            ],
            "type": "string",
            "description": "Keep only comments carrying the selected badge. 'No badge' keeps only regular comments; 'Any' disables the filter.",
            "default": "any"
          },
          "controversialOnly": {
            "title": "Only controversial comments",
            "type": "boolean",
            "description": "Keep only comments Reddit flags as controversial (near-even upvote/downvote split).",
            "default": false
          },
          "authors": {
            "title": "Filter by comment author(s)",
            "type": "array",
            "description": "Only keep comments written by these Reddit usernames (case-insensitive). Leave empty to keep comments from all authors.",
            "items": {
              "type": "string"
            }
          },
          "excludeAuthors": {
            "title": "Exclude comment author(s)",
            "type": "array",
            "description": "Drop comments written by these Reddit usernames (case-insensitive), e.g. bots like AutoModerator. Applied after `authors`.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Filter by keyword(s) in comment body",
            "type": "array",
            "description": "Only keep comments whose body contains at least one of these keywords or phrases (case-insensitive substring match). Leave empty to keep all comments.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keyword(s) in comment body",
            "type": "array",
            "description": "Drop comments whose body contains any of these keywords or phrases (case-insensitive substring match), e.g. spam phrases. Applied after `keywords`.",
            "items": {
              "type": "string"
            }
          },
          "minAwards": {
            "title": "Minimum total awards received",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep comments with at least this many total awards. Leave empty for no limit. Atom RSS comments have no award data and count as zero."
          },
          "minReplies": {
            "title": "Minimum direct replies",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep comments that have at least this many direct replies in the fetched thread. Useful for finding conversation starters. Leave empty for no limit."
          },
          "minCommentLength": {
            "title": "Minimum comment length (characters)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Only keep comments whose body text is at least this many characters long. Useful for filtering out one-word/emoji-only noise. Leave empty for no limit."
          },
          "maxCommentLength": {
            "title": "Maximum comment length (characters)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Only keep comments whose body text is at most this many characters long (Reddit's hard cap is 10,000 characters). Leave empty for no limit."
          },
          "focusOnTargetComment": {
            "title": "Focus on the specific comment in the URL",
            "type": "boolean",
            "description": "When a `postUrls` item is a specific comment permalink, return that comment plus its ancestor chain (see `commentContext`). Has no effect on plain post URLs.",
            "default": false
          },
          "commentContext": {
            "title": "Ancestor context depth (focus mode)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many levels of parent comments above the target comment to include when `focusOnTargetComment` is enabled. Ignored otherwise.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}