{
  "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": "1.0",
    "x-build-id": "aXR6xVwyCStLrYveu"
  },
  "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",
            "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/), mobile share link (https://www.reddit.com/r/x/s/token), 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 comments to scrape from each post (including nested replies).",
            "default": 100
          },
          "commentSort": {
            "title": "Sort comments by",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "How to sort the comment threads.",
            "default": "confidence"
          },
          "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."
          },
          "maxCommentScore": {
            "title": "Maximum comment score",
            "minimum": -1000000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep comments with a score (upvotes minus downvotes) at or below this value. Leave empty for no limit."
          },
          "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 that Reddit marks as deleted or author-deleted are dropped (no real content left to scrape).",
            "default": false
          },
          "excludeCollapsed": {
            "title": "Exclude collapsed comments",
            "type": "boolean",
            "description": "When enabled, comments Reddit collapses by default (low score or crowd control) are dropped.",
            "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. Leave empty to keep comments from all authors. Applied after `authors` (an author listed in both is excluded).",
            "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/boilerplate phrases. Applied after `keywords` (a keyword listed in both still excludes the comment). Leave empty to keep all comments.",
            "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."
          },
          "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 when building NLP datasets. 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`). Works for deeply nested targets; the target must still be publicly visible. Has no effect on plain post URLs.",
            "default": false
          },
          "commentContext": {
            "title": "Ancestor context depth (mode = focusOnTargetComment)",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many levels of parent comments above the target comment to include when `focusOnTargetComment` is enabled (matches Reddit's own comment-permalink page). 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}