{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper - Posts, Comments, Subreddits & Users",
    "description": "Scrape Reddit posts, comments, subreddits and user profiles by keyword or URL. Full comment threads, 40+ fields, search, NSFW and monitoring mode. No login, no API key, no browser.",
    "version": "0.1",
    "x-build-id": "FKHe6RJ8vRT3cyuX0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-reddit-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/scrapesage~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-reddit-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/scrapesage~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-reddit-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": "Start URLs (any Reddit URL)",
            "type": "array",
            "description": "Paste any Reddit URLs — subreddit (https://www.reddit.com/r/RealEstate/), a specific post/comments page, a user profile (/user/spez/), a search results page, or a /subreddits/search page. Each URL is auto-detected and routed. One per row.",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names to scrape posts from — e.g. \"RealEstate\", \"r/AskReddit\". Uses the Sort + Time settings below. One per row.",
            "items": {
              "type": "string"
            }
          },
          "searches": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keyword queries to search Reddit. Returns posts (default) or communities depending on \"Search returns\" below. One query per row — e.g. \"best CRM\", \"moving to Austin\".",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Reddit usernames to scrape — e.g. \"spez\", \"u/someuser\". Returns the user's profile (karma, cake day) plus their recent posts and comments. One per row.",
            "items": {
              "type": "string"
            }
          },
          "searchScope": {
            "title": "Search returns",
            "enum": [
              "posts",
              "communities"
            ],
            "type": "string",
            "description": "What the \"Search keywords\" queries should return: posts, or communities (subreddits).",
            "default": "posts"
          },
          "searchInSubreddit": {
            "title": "Restrict search to subreddit",
            "type": "string",
            "description": "Optional. Limit \"Search keywords\" to a single subreddit (e.g. \"RealEstate\"). Leave empty to search all of Reddit."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial",
              "relevance",
              "comments"
            ],
            "type": "string",
            "description": "Order of results. Subreddits: hot/new/top/rising/controversial. Search: relevance/new/top/comments (hot/rising fall back to relevance).",
            "default": "hot"
          },
          "time": {
            "title": "Time range (for Top / Controversial)",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window when sorting by Top or Controversial.",
            "default": "all"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000000,
            "type": "integer",
            "description": "Cap on total records (posts + comments + communities + users) across the whole run. Listings paginate automatically until this cap is reached.",
            "default": 50
          },
          "maxItemsPerSource": {
            "title": "Max items per source",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Optional per-source cap (per subreddit / search / user). 0 = no per-source limit (only the global Max items applies).",
            "default": 0
          },
          "includeComments": {
            "title": "Include comments for posts",
            "type": "boolean",
            "description": "For every post scraped from a subreddit/search/user, also open it and output its comment thread (type `comment`). Adds one request per post. A post/comments URL in Start URLs always returns its comments regardless of this toggle.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "How many comments to output per post (top of the thread first). Set 0 to skip comments entirely on post URLs.",
            "default": 50
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "How to order comments within a thread.",
            "default": "confidence"
          },
          "expandMoreComments": {
            "title": "Expand \"load more comments\"",
            "type": "boolean",
            "description": "Follow the \"load more comments\" links to pull deeper/collapsed replies (more requests, slower). Off = only the comments rendered on the main thread page.",
            "default": false
          },
          "includeDeletedComments": {
            "title": "Include deleted / removed comments",
            "type": "boolean",
            "description": "Off (default, recommended): skip comments whose content was deleted by the user or removed by a moderator — i.e. body \"[deleted]\", \"[removed]\" or empty. These have no usable text and you are never charged for them, so your comment count is filled only with real content. On: include them as `comment` records carrying an `isDeleted` flag.",
            "default": false
          },
          "onlyPostsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Keep only posts/comments newer than this. Accepts an ISO date (2026-06-01) or a relative window like \"7 days\", \"24 hours\", \"3 months\". Great with monitoring mode for fresh-only pulls."
          },
          "includeNSFW": {
            "title": "Include NSFW / 18+",
            "type": "boolean",
            "description": "Include NSFW (over-18) posts. Turn off to exclude them.",
            "default": true
          },
          "skipAds": {
            "title": "Skip promoted posts (ads)",
            "type": "boolean",
            "description": "Skip promoted/advertised posts so you only get organic content.",
            "default": true
          },
          "includeUserProfile": {
            "title": "Include user profile record",
            "type": "boolean",
            "description": "For username sources, output a `user` record with post/comment karma and cake day in addition to their content.",
            "default": true
          },
          "includeUserContent": {
            "title": "Include user posts & comments",
            "type": "boolean",
            "description": "For username sources, output the user's recent posts and comments. Turn off to get only the profile record.",
            "default": true
          },
          "userSection": {
            "title": "User content section",
            "enum": [
              "overview",
              "submitted",
              "comments"
            ],
            "type": "string",
            "description": "Which part of a user's history to scrape.",
            "default": "overview"
          },
          "deduplicate": {
            "title": "Deduplicate",
            "type": "boolean",
            "description": "Skip a record already emitted in this run (by id) — useful when sources overlap.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode — only new records",
            "type": "boolean",
            "description": "Remember ids already returned and emit ONLY records not seen in previous runs. Pairs with Apify Schedules to track new posts/comments over time without re-paying for old data.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store that holds the 'already seen' ids for monitoring mode. Use a different name per tracked job to keep their histories separate. Lowercase letters, digits and hyphens only.",
            "default": "reddit-scraper-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Maximum parallel requests when fetching comment threads. Lower it if you see transient blocks; raise it for speed.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Reddit blocks datacenter IPs, so this actor defaults to Apify Residential proxy (blocked requests retry automatically on a fresh IP). Residential is strongly recommended.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}