{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper API — Posts, Comments, Search, Users",
    "description": "Used by brand-monitoring teams, market researchers and AI pipelines that need Reddit at volume. Reddit scraper for posts, comments, subreddits, users and search in one flat table, with score and upvote ratio on every row. No API key, no login. Filters run before billing, so discarded rows are free.",
    "version": "0.1",
    "x-build-id": "T9xkqlidRMnH8Sjtu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vonsensey~reddit-scraper-posts-comments-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vonsensey-reddit-scraper-posts-comments-api",
        "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/vonsensey~reddit-scraper-posts-comments-api/runs": {
      "post": {
        "operationId": "runs-sync-vonsensey-reddit-scraper-posts-comments-api",
        "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/vonsensey~reddit-scraper-posts-comments-api/run-sync": {
      "post": {
        "operationId": "run-sync-vonsensey-reddit-scraper-posts-comments-api",
        "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": "Paste Reddit addresses and each is routed for you. Supported: community addresses, including sorted feeds such as /r/rust/top/?t=week, and in-community search pages (/r/<name>/search?q=…), which are answered as a keyword-filtered feed (see Keywords). Not available: single post and comment links, redd.it short links, user profiles, community About pages and site-wide search pages. This Actor reads those through Reddit's JSON API, which answers only visitors who pass Reddit's verification page, and it never gets past that page, so each returns a free row explaining the gap instead of data, and is not charged.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "subreddits": {
            "title": "Communities",
            "type": "array",
            "description": "Community names, with or without the r/ prefix — for example `askreddit` or `r/rust`. If you also fill in Keywords, these become the communities those keywords are searched inside.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Keywords",
            "type": "array",
            "description": "Keywords to look for inside the communities above. Reddit's JSON search answers only visitors who pass Reddit's verification page, which this Actor never gets past, so each community's feed is read instead (about 200 posts per keyword, in the sort chosen below) and only posts whose title or text contains every word are returned, marked `matchedBy: feed-keyword-filter`. This is a filtered feed, not Reddit's search ranking: a `\"quoted phrase\"` counts as one word, and operators such as `title:` or `author:` are not applied. Keywords without any community (site-wide search) are not available and return a free row explaining why.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Users",
            "type": "array",
            "description": "Reddit usernames, with or without the u/ prefix. Not available: this Actor reads user pages through Reddit's JSON API, which answers only visitors who pass Reddit's verification page, and it never gets past that page, so each username returns a free row explaining the gap instead of posts, and is not charged.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort communities by",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial",
              "best"
            ],
            "type": "string",
            "description": "Which community feed to read. `top` and `controversial` also use the time window below.",
            "default": "hot"
          },
          "time": {
            "title": "Time window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Applies to Top and Controversial sorts and to keyword searches.",
            "default": "all"
          },
          "maxPostsPerSource": {
            "title": "Results per source",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many posts to take from each community or keyword search. Reddit itself stops a single feed at about 1,000 — switch on Deep coverage below to go past that.",
            "default": 100
          },
          "maxItems": {
            "title": "Total row limit",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "A hard ceiling on billable rows for the whole run, counting posts and comments together. Leave at 0 for no limit. This is a spending safety net: the run stops here even if more data exists.",
            "default": 0
          },
          "deepCoverage": {
            "title": "Deep coverage — go past Reddit's per-feed ceiling",
            "type": "boolean",
            "description": "Reddit stops any single feed at roughly 1,000 posts. With this on, the same community is read through its other sorts and time windows and the results are de-duplicated, which reaches materially more of it. Costs more requests, so leave it off for small pulls.",
            "default": false
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Fetch the comment thread under every post returned. Comments are billed at their own, lower rate.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Comments per post",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper bound on comments returned for each post. Reddit's thread page gives about the first 25 comments and its 'load more' pages are not read, so a busier thread returns that first page plus a free row saying how many comments Reddit counts.",
            "default": 50
          },
          "commentSort": {
            "title": "Sort comments by",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Which comments Reddit returns first when a thread is larger than your per-post limit. Best is Reddit's own default ranking.",
            "default": "confidence"
          },
          "maxCommentDepth": {
            "title": "Reply depth",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How deep to follow reply chains. 0 returns only top-level comments.",
            "default": 10
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Keep only posts and comments newer than this. Takes a date (`2026-01-31`) or an age (`7 days`, `12h`, `3 months`) — an age is the one to use in a scheduled run, because a fixed date goes stale. Rows outside the window are discarded before billing, so you are never charged for them."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Keep only posts and comments older than this. Same formats as above. Combine the two to pull an exact date range."
          },
          "mustIncludeKeywords": {
            "title": "Must contain",
            "type": "array",
            "description": "Keep only rows whose text contains at least one of these words. Case-insensitive. Discarded rows are free.",
            "items": {
              "type": "string"
            }
          },
          "mustExcludeKeywords": {
            "title": "Must not contain",
            "type": "array",
            "description": "Drop rows whose text contains any of these words. Discarded rows are free.",
            "items": {
              "type": "string"
            }
          },
          "minScore": {
            "title": "Minimum score",
            "type": "integer",
            "description": "Drop posts and comments below this score. Leave empty for no minimum. Discarded rows are free."
          },
          "skipNsfw": {
            "title": "Skip NSFW posts",
            "type": "boolean",
            "description": "Drop posts marked over-18 before they are delivered or billed.",
            "default": false
          },
          "onlyNew": {
            "title": "Only rows I have not had before",
            "type": "boolean",
            "description": "For scheduled runs. Remembers what this input already returned and delivers only what is new since last time — so a daily run does not re-charge you for the same posts every day. The first run returns everything.",
            "default": false
          },
          "feedName": {
            "title": "Feed name",
            "type": "string",
            "description": "Optional label that groups runs sharing one 'only new' memory. Leave empty and it is derived from your inputs, so each distinct input list remembers separately."
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Lower this if you are on a small proxy allowance.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Reddit refuses datacenter addresses, so residential proxy is the default and is required for the Actor to return anything. Optional — proxy is handled for you and its cost is included in the price. Only set this if you have a specific reason."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}