{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Comment Scraper",
    "description": "Scrape Reddit comments to extract comment text, usernames, timestamps, scores, post details, subreddit data, and engagement metrics. Analyze audience sentiment, discover trends, monitor communities, research competitors, and collect valuable insights for SEO, marketing, and market research.",
    "version": "0.1",
    "x-build-id": "iCi34QAsy8lHOCWOE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~reddit-comment-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-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/scrapier~reddit-comment-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-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/scrapier~reddit-comment-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-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 Post URLs",
            "type": "array",
            "description": "📋 Paste one or more Reddit post URLs here. Each URL will be scraped for comments.\n\nExample: https://www.reddit.com/r/subreddit/comments/post_id/title/\n\nOptional if you fill in 🔎 Search / Discover Posts below instead.",
            "items": {
              "type": "string"
            }
          },
          "sortOrder": {
            "title": "↕️ Comment Sort Order",
            "enum": [
              "hot",
              "new",
              "top",
              "controversial",
              "old"
            ],
            "type": "string",
            "description": "🔀 Sort order used both for fetching comments and for subreddit listings/search discovery below.",
            "default": "hot"
          },
          "searchUrls": {
            "title": "🌐 Subreddit / Search URLs",
            "type": "array",
            "description": "🕵️ Paste subreddit listing URLs (e.g. https://www.reddit.com/r/ChatGPT/) or Reddit search URLs (e.g. https://www.reddit.com/r/ChatGPT/search/?q=gpt5) to discover posts to scrape, instead of pasting individual post URLs.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "🔑 Keyword Search Query",
            "type": "string",
            "description": "💡 A plain keyword/phrase to search Reddit site-wide for matching posts (used together with or instead of 🌐 Subreddit / Search URLs)."
          },
          "maxPostsToDiscover": {
            "title": "🔢 Max Posts to Discover",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "📈 Maximum number of posts to discover in total from 🌐 Subreddit / Search URLs and 🔑 Keyword Search Query combined. Ignored when only direct 🔗 Reddit Post URLs are used.",
            "default": 10
          },
          "safeSearch": {
            "title": "🚫 Exclude NSFW Posts from Discovery",
            "type": "boolean",
            "description": "🔞 When enabled, skip over_18/NSFW posts found via discovery. Has no effect on directly-provided 🔗 Reddit Post URLs.",
            "default": false
          },
          "sinceDate": {
            "title": "📅 Only Comments Since",
            "type": "string",
            "description": "⏱️ Only keep comments created on/after this date. Accepts an absolute date or a relative value like `3 days`/`1 week`."
          },
          "untilDate": {
            "title": "📅 Only Comments Until",
            "type": "string",
            "description": "⏱️ Only keep comments created on/before this date. Accepts an absolute date or a relative value like `3 days`/`1 week`."
          },
          "maxComments": {
            "title": "🔢 Maximum Comments per URL",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "⚙️ Set the maximum number of comments to extract from each Reddit post (direct or discovered). Range: 1-10,000 comments.",
            "default": 100
          },
          "replyLimit": {
            "title": "💬 Reply Limit per Comment",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "🌳 Control the depth of nested replies stored in the `replies` field. Set to 0 for unlimited depth. Note: All replies are still collected in the flattened output regardless of this setting.",
            "default": 2
          },
          "enrichAuthorProfile": {
            "title": "🏅 Enrich Author Karma & Account Age",
            "type": "boolean",
            "description": "📈 When enabled, adds an `authorProfile` object (total/post/comment karma, account creation date, Reddit Gold status) to every comment row, resolved once per unique author.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🔒 Proxy Configuration",
            "type": "object",
            "description": "🛡️ Configure proxy settings for reliable scraping. By default, no proxy is used, and the scraper transparently falls back to Apify's datacenter then residential proxy pools if Reddit blocks a request. If you explicitly enable a proxy here, your exact group/country selection is used for every fallback attempt instead of the automatic pools."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}