{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper & API Alternative | $0.5 / 1K",
    "description": "Reddit data without an API key or login: subreddit posts, keyword search inside subreddits, comment threads, top posts and history back to 2005. Only-new mode for daily monitoring. $0.50 per 1,000 posts.",
    "version": "1.1",
    "x-build-id": "eKL6g2YtBet6j7UTc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hridayrungta~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hridayrungta-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/hridayrungta~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hridayrungta-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/hridayrungta~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hridayrungta-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": {
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddits to read, one per line: `smallbusiness`, `r/smallbusiness` or a full reddit.com link. Without search queries you get each subreddit's posts; with search queries, these are the subreddits the queries search in.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Keyword search (inside the subreddits above)",
            "type": "array",
            "description": "Optional words to search for, one query per line, e.g. `crm` or `per seat pricing`. A post matches when its title or body contains the words. Each query runs inside every subreddit you listed, and keyword search needs at least one subreddit: searching all of Reddit at once is not possible. Search is limited to the **Time range** below.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "new",
              "top"
            ],
            "type": "string",
            "description": "- **New**: most recent posts first. The default, the cheapest, and the order incremental mode uses.\n- **Top**: highest-scoring posts inside the **Time range**. The Actor reads the range newest-first (up to 5,000 posts per source) and ranks them by score, so for a busy subreddit over a long range it ranks the newest 5,000 posts.\n\nReddit's \"Hot\" and \"Relevance\" rankings are not available.",
            "default": "new"
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Used by **Top** and by keyword search. Ignored by a plain **New** listing (use the date fields below for that).",
            "default": "week"
          },
          "maxPostsPerSource": {
            "title": "Max posts per source",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many posts to take from each subreddit and each query. 100 posts are one request. This is your main cost control: you are billed once per post saved.",
            "default": 25
          },
          "minScore": {
            "title": "Minimum score",
            "type": "integer",
            "description": "Drop posts and comments scoring below this. `0` keeps everything that is not net-negative; a negative value keeps downvoted content too. Set it to 10 or 50 on a busy subreddit to skip the noise - a dropped post is never billed.",
            "default": 0
          },
          "includeComments": {
            "title": "Also scrape comments",
            "type": "boolean",
            "description": "OFF by default. Turn it ON and each post's comments are fetched as well, and every comment becomes its own row with `body`, `score`, `depth`, `parentId` and `parentType`, so the whole thread rebuilds from a flat table.\n\nComments are billed separately as `comment-scraped`. A comment thread is one extra request per post.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on comment rows per post. Only used when **Also scrape comments** is on.",
            "default": 50
          },
          "commentDepth": {
            "title": "Max comment depth",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How deep into a reply chain to go. 0 is top-level comments only, 10 covers almost every real thread. Replies below the cap are reported in the log as \"not expanded\" rather than silently dropped.",
            "default": 10
          },
          "commentConcurrency": {
            "title": "Comment fetches in parallel",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "How many comment threads to fetch at the same time when **Also scrape comments** is on. Kept low (max 3) because the data source is a free, community-run archive.",
            "default": 2
          },
          "onlyNewSinceLastRun": {
            "title": "Only new posts since my last run",
            "type": "boolean",
            "description": "OFF by default. Turn it ON and the Actor remembers, **per subreddit and per query**, the newest post it has already given you, and every later run returns only what was posted since. Point a schedule at it and you get a clean feed of new posts with no duplicates and no re-billing.\n\nThe marks are kept in a **key-value store on your own Apify account** (see *State store name* below), so they survive across runs, schedules and Actor updates, and 20 tracked sources get 20 independent marks.\n\nIt is also much the cheapest way to run this Actor. Reddit's `new` listing is newest-first, so the moment the Actor reads a post older than your mark it stops reading that source immediately instead of paging the rest. A daily run on a busy subreddit reads **one page instead of twenty**.\n\n**First run:** a source with no mark yet is seeded from *First run reaches back* (30 days by default) - never the whole listing, so a first run cannot surprise you with a bill for a year of posts you did not ask for. Set it to `all` if you do want the backfill.\n\nIncremental mode reads newest-first by necessity, so it overrides **Sort** for the run and says so in the log.",
            "default": false
          },
          "firstRunSince": {
            "title": "First run reaches back",
            "type": "string",
            "description": "Only used by **Only new posts since my last run**, and only for a source the Actor has never seen. Absolute (`2026-01-01`) or relative (`30 days`, `6 months`, `1 year`). Default `30 days`.\n\nSet it to `all` to take everything the listing will give on the first run and set the mark from it - a deliberate backfill. Leaving it at a span is the safe choice: you decide how much history you pay for.",
            "default": "30 days"
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Name of the key-value store on **your** Apify account that holds the high-water marks. Defaults to `reddit-scraper-state`, which is created for you on the first incremental run.\n\nGive different tracking sets different names - e.g. `reddit-state-competitors` and `reddit-state-leads` - and each keeps its own marks, so the same subreddit can be tracked independently in two schedules. Letters, digits and dashes; anything else is folded into those.",
            "default": "reddit-scraper-state"
          },
          "stateNamespace": {
            "title": "State namespace (optional)",
            "type": "string",
            "description": "Extra prefix on every state key. Leave empty and the Actor derives one from your Apify user id, which already keeps your marks separate from everybody else's. Set it only when you want several independent tracking sets inside ONE store - for example one namespace per client or per report."
          },
          "postsNewerThan": {
            "title": "Posts newer than (window START)",
            "type": "string",
            "description": "Keep only posts published at or after this moment. Absolute (`2020-01-01`, or a full ISO timestamp) or relative (`7 days`, `6 months`). Works years back, so you can pull a subreddit's history for any date range. Leave empty for no lower bound."
          },
          "postsOlderThan": {
            "title": "Posts older than (window END)",
            "type": "string",
            "description": "Keep only posts published before this moment. Same formats as the window start. Leave empty for no upper bound."
          },
          "personalData": {
            "title": "Include author usernames",
            "type": "boolean",
            "description": "OFF by default, and please leave it off unless you need it. While it is off, the author's username, their Reddit account id and their flair are removed from every post row and every comment row - the fields come back as `null`. The post title, the body, the score, the timestamp, the permalink and the subreddit are all kept, so the dataset stays fully useful for research, monitoring and market analysis without carrying anybody's identity.\n\nTurn it on only if you have a lawful basis for processing the identity of the people who wrote the posts.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard stop after this many rows across the whole run, posts and comments together. This is your overall cost cap: you are billed once per row saved.",
            "default": 1000
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 15,
            "maximum": 180,
            "type": "integer",
            "description": "How long one request may take before it is retried. 60 seconds is plenty for almost every request.",
            "default": 60
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries with backoff for timeouts, 429s and 5xx responses.",
            "default": 3
          },
          "failOnEmpty": {
            "title": "Fail the run if a source returns nothing unexpectedly",
            "type": "boolean",
            "description": "On by default. If a subreddit or query returns no posts at all and nothing explains it - no date window, no score floor, no incremental mark, no cap - the run FAILS and names the source, instead of finishing SUCCEEDED with an empty dataset. A misspelt subreddit name and a missing proxy both look like \"no results\", and neither should pass quietly. Rows already saved are kept either way. Turn this off only if an empty result is acceptable to you.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}