{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper — Posts, Comments, Subreddits & Users",
    "description": "Reddit scraper for posts, full comment threads (up to 25,000 per post), subreddits and users — no API key, no login. Search, sort and date filters, history past Reddit's 1,000-item cap, flat JSON/CSV rows. Pay per result from $1.20 per 1,000.",
    "version": "0.3",
    "x-build-id": "H199cUDt8foGhqoJw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datasiphon~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datasiphon-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/datasiphon~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datasiphon-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/datasiphon~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datasiphon-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": "Reddit URLs",
            "type": "array",
            "description": "Post, subreddit or user URLs (reddit.com / old.reddit.com).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names, e.g. programming or r/programming.",
            "items": {
              "type": "string"
            }
          },
          "searches": {
            "title": "Search terms",
            "type": "array",
            "description": "Keyword searches. Live source: all of Reddit or one subreddit. Archive source: requires 'Search inside subreddit'.",
            "items": {
              "type": "string"
            }
          },
          "searchInSubreddit": {
            "title": "Search inside subreddit",
            "type": "string",
            "description": "Restrict searches to one subreddit (required for archive-source search)."
          },
          "source": {
            "title": "Data source",
            "enum": [
              "auto",
              "live",
              "archive"
            ],
            "type": "string",
            "description": "auto = live Reddit when reachable, else archive (each record is tagged with its source). live = fail if Reddit unreachable. archive = Arctic Shift only: full history and complete comment trees, but scores lag ~36h.",
            "default": "auto"
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Fetch the full comment tree for every post (each comment is one billed result).",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Upper bound per post; trees up to 25,000 comments are supported.",
            "default": 500
          },
          "maxPostsPerSource": {
            "title": "Max posts per subreddit / search",
            "minimum": 1,
            "type": "integer",
            "description": "Posts collected per input target.",
            "default": 100
          },
          "maxItems": {
            "title": "Max total results",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on billed results for the whole run.",
            "default": 100
          },
          "sort": {
            "title": "Sort (live source)",
            "enum": [
              "new",
              "hot",
              "top",
              "rising",
              "controversial",
              "relevance"
            ],
            "type": "string",
            "description": "Ordering on the live source. The archive is always newest-first.",
            "default": "new"
          },
          "time": {
            "title": "Time filter (live source)",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Applies to top/controversial/relevance on the live source.",
            "default": "all"
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "ISO date, e.g. 2026-01-01. Works on both sources; on the archive it reaches past Reddit's 1,000-item listing cap."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "ISO date, e.g. 2026-06-30."
          },
          "includeNsfw": {
            "title": "Include NSFW",
            "type": "boolean",
            "description": "Include 18+ posts and comments.",
            "default": false
          },
          "redditClientId": {
            "title": "Reddit app client ID (optional)",
            "type": "string",
            "description": "Enables the OAuth live path if you have registered a Reddit app."
          },
          "redditClientSecret": {
            "title": "Reddit app client secret (optional)",
            "type": "string",
            "description": "Paired with the client ID."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Used for the live source. Reddit blocks Apify's datacenter and residential proxy pools outright -- the UNBLOCKER group (default here) genuinely reaches Reddit's JSON API, verified 2026-09-22. It's slow (30-90s per request, it proxies through a real unblocking backend) and priced per unit, so live mode is much slower and slightly costed compared to the archive source -- budget maxItems/maxCommentsPerPost accordingly."
          },
          "classify": {
            "title": "Classify pain/advice/solution signals",
            "type": "boolean",
            "description": "Adds hasPainSignal, isAdviceRequest, mentionsSolution, mentionsMoney to each post/comment — cheap keyword heuristics (no AI), a screening signal not ground truth.",
            "default": false
          },
          "discoverRelatedSubreddits": {
            "title": "Discover related subreddits",
            "type": "array",
            "description": "Seed subreddit names. Finds subreddits with overlapping audiences by sampling recent posters and aggregating what else they post in — surfaces subreddits you wouldn't have searched for directly.",
            "items": {
              "type": "string"
            }
          },
          "relatedSampleAuthors": {
            "title": "Related-subreddit sample size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many recent posters to sample per seed subreddit. One archive call per author — higher is slower and more thorough.",
            "default": 20
          },
          "relatedMinSubscribers": {
            "title": "Related subreddits: min subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep discovered subreddits at or above this size."
          },
          "relatedMaxSubscribers": {
            "title": "Related subreddits: max subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep discovered subreddits at or below this size (e.g. 100000 for the '10k-100k sweet spot' niche-discovery pattern)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}