{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Comment Scraper Pro | No Login | No Cookie",
    "description": "Scrape Reddit comments at scale with zero browser overhead. Extracts nested comment trees, deep replies, sentiment scores, and media URLs in bulk. 10x faster and ultra-low memory usage (<150MB). Perfect for AI training & NLP sentiment.",
    "version": "0.0",
    "x-build-id": "bOLCGE7d2HUf8gRdu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rexreus~Reddit-Comment-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rexreus-Reddit-Comment-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/rexreus~Reddit-Comment-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-rexreus-Reddit-Comment-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/rexreus~Reddit-Comment-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rexreus-Reddit-Comment-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": {
          "startUrls": {
            "title": "Reddit URLs",
            "type": "array",
            "description": "Direct URLs to Reddit posts or comment permalinks. Example: https://www.reddit.com/r/technology/comments/1i3b62l/openai_operator_live_demo/",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "subreddits": {
            "title": "Subreddit Names",
            "type": "array",
            "description": "Optional: list of subreddit names (without 'r/') to scrape comments from recent posts.",
            "items": {
              "type": "string"
            }
          },
          "postIds": {
            "title": "Post IDs",
            "type": "array",
            "description": "Optional: raw Reddit post IDs (e.g., '1i3b62l' or 't3_1i3b62l').",
            "items": {
              "type": "string"
            }
          },
          "postsPerSubreddit": {
            "title": "Posts per Subreddit",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "If subreddits are specified, number of recent posts to scrape per subreddit.",
            "default": 10
          },
          "sort": {
            "title": "Comment Sort Order",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "How comments should be sorted within the thread.",
            "default": "confidence"
          },
          "maxCommentsPerPost": {
            "title": "Max Comments per Post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of comments to extract per post (0 = extract all reachable).",
            "default": 100
          },
          "maxDepth": {
            "title": "Max Reply Depth",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum reply depth (0 = top-level only, 1 = direct replies, 10 = deep threads).",
            "default": 10
          },
          "expandMoreComments": {
            "title": "Expand Collapsed ('Load More') Comments",
            "type": "boolean",
            "description": "When true, calls Reddit's morechildren API to retrieve deeply nested and collapsed comments.",
            "default": true
          },
          "minScore": {
            "title": "Minimum Comment Score",
            "type": "integer",
            "description": "Exclude comments with net upvotes below this threshold.",
            "default": 0
          },
          "skipDeleted": {
            "title": "Skip Deleted / Removed Comments",
            "type": "boolean",
            "description": "Skip comments marked as '[deleted]' or '[removed]'.",
            "default": true
          },
          "keywordFilter": {
            "title": "Keyword Filter",
            "type": "array",
            "description": "Only include comments containing at least one of these keywords/phrases (case-insensitive). Leave empty to disable.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Date From (ISO 8601 or YYYY-MM-DD)",
            "type": "string",
            "description": "Only include comments posted after this date. Example: '2026-01-01'."
          },
          "dateTo": {
            "title": "Date To (ISO 8601 or YYYY-MM-DD)",
            "type": "string",
            "description": "Only include comments posted before this date. Example: '2026-12-31'."
          },
          "enableSentiment": {
            "title": "Compute Sentiment Analysis",
            "type": "boolean",
            "description": "Calculate fast in-memory sentiment score, comparative value, and polarity label (positive/neutral/negative).",
            "default": true
          },
          "extractMedia": {
            "title": "Extract Links & Media URLs",
            "type": "boolean",
            "description": "Parse external HTTP URLs and embedded media (GIFs, images) from the markdown content.",
            "default": true
          },
          "includePostContext": {
            "title": "Include Post Context with Comments",
            "type": "boolean",
            "description": "Attach post title, post author, and post URL to each comment record.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify Proxy configuration. RESIDENTIAL proxy is strongly recommended for Reddit.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of simultaneous requests. Recommended: 10 - 30.",
            "default": 15
          },
          "debugLog": {
            "title": "Enable Debug Logs",
            "type": "boolean",
            "description": "Turn on verbose logging for troubleshooting.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}