{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper — Subreddit Posts, Comments & Search, No API Key",
    "description": "Type a subreddit and get its posts as rows — title, text, score, upvote ratio, comment count, flair, date, image or playable video link — sorted hot, new, top or rising. Add comments per post, search all of Reddit, or paste post links. No API key, no login, exact limit, no result fee.",
    "version": "1.0",
    "x-build-id": "kwfdzRwxkGJohHDAJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyfetch~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyfetch-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/steadyfetch~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-steadyfetch-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/steadyfetch~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-steadyfetch-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",
        "required": [
          "subreddits"
        ],
        "properties": {
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names, one per line — \"smallbusiness\", \"r/smallbusiness\" or a link to the subreddit; names are not case sensitive. Each one is walked under the sort you choose below, up to \"Max posts per subreddit or query\". A subreddit that does not exist, one that is private and one that is banned all answer identically, so they ship as one uncharged row saying exactly that rather than guessing which it was. Leave this empty and the run returns a small built-in sample instead of collecting anything, at no result fee. A post link put here is routed to the post box automatically, not refused.",
            "default": [
              "_demo"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search all of Reddit",
            "type": "array",
            "description": "Search terms, one per line — each one searches all of Reddit and returns post rows with the same columns as a subreddit walk. Reddit's own search serves 4 to 7 posts per page and is the slowest door here, so narrow a query with a date window instead of asking for hundreds of rows. A query that matches nothing ships one uncharged row and is never retried, and no query is ever widened or rewritten to find something — you get what you typed or you get told.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post links",
            "type": "array",
            "description": "Individual Reddit post links, one per line — https://www.reddit.com/r/<subreddit>/comments/<id>/<slug>/, a redd.it/<id> short link, or a share link. Each one returns that post's own row, charged as one \"Post lookup\" when the row lands; with \"Include comments\" on, the same read also brings that post's first page of comments. A link Reddit answers is gone ships as an uncharged row instead.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (subreddit, post and search links mixed)",
            "type": "array",
            "description": "One list for every kind of Reddit link, for buyers moving over from another scraper: subreddit links, post links, reddit.com/search?q= links and r/<subreddit>/search?q= links. Each line is sorted into the right door before anything is bought, so a post link never pays for a subreddit walk and a subreddit link never pays for a post lookup. A /user/ or /wiki/ link is refused on an uncharged row: a user's own post list is not a door Reddit serves to any reader we can be.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sort": {
            "title": "Sort a subreddit by",
            "type": "string",
            "description": "How each subreddit's own feed is ordered: hot, new, top, rising or best. Read only by subreddits, never by search. \"top\" reads the timeframe below and the others ignore it. A daily schedule wants new with \"Only posts published after\" set, so the run stops as soon as the feed goes older than your window.",
            "default": "hot"
          },
          "searchSort": {
            "title": "Sort search results by",
            "type": "string",
            "description": "How search results are ordered: relevance, new, top or comment_count. Read only by \"Search all of Reddit\", never by a subreddit walk, which has its own sort above.",
            "default": "relevance"
          },
          "timeframe": {
            "title": "Timeframe",
            "type": "string",
            "description": "The window that \"top\" ranks inside: hour, day, week, month, year or all. Read by a subreddit sorted top, by a search of all of Reddit, and — for any value other than the default week — by a search inside a subreddit, which stays over all time while this box is left alone. Every other feed ignores it, and the run says so rather than pretending it applied.",
            "default": "week"
          },
          "resultsLimit": {
            "title": "Max posts per subreddit or query",
            "type": "integer",
            "description": "How many posts to take from EACH subreddit and EACH search query — exact, never overshot, and never padded: a feed that holds fewer gives you what it holds and the run says so. Accepted range 1 to 1,000; a number outside it is moved to the nearest value in range and one uncharged note row says so, rather than the run being refused.",
            "default": 50
          },
          "maxItems": {
            "title": "Max rows to return",
            "type": "integer",
            "description": "Hard ceiling for the WHOLE run, counting post rows and comment rows together, across every subreddit, every query and every post link, whatever else is set. The per-subreddit cap is \"Max posts per subreddit or query\" above. Other scrapers call this limit, count or maxPosts; those names are read as this field too and the smallest of them wins, with one uncharged note row saying which was read. Accepted range 1 to 50,000; a number outside it is moved to the nearest value in range.",
            "default": 1000
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "OFF (default): post rows only. ON: every post delivered also brings its comment rows — about 25 nodes per page, replies nested under their parents, each one its own row. A comment row is charged like a post row, so a 50-post run with comments on can deliver many times 50 rows: \"Max comments per post\" below is what bounds it, and maxTotalChargeUsd on the run is what caps the bill.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "type": "integer",
            "description": "The cap on comment rows taken from ONE post, counting the nested replies. The run walks comment pages until it reaches this number or the thread runs out, and a post whose thread was longer keeps a note on its own row saying so — a note, never a miss, and nothing extra is charged for it. Read only when \"Include comments\" is on. Accepted range 1 to 1,000; a number outside it is moved to the nearest value in range and one uncharged note row says so.",
            "default": 50
          },
          "postedAfter": {
            "title": "Only posts published after",
            "type": "string",
            "description": "A date, YYYY-MM-DD, an ISO timestamp, or a relative window like \"7 days\". Posts published before it are dropped, uncharged, and the status line says how many. A subreddit sorted new stops walking as soon as the feed goes older than this, so a daily schedule pays only for what is new."
          },
          "postedBefore": {
            "title": "Only posts published before",
            "type": "string",
            "description": "A date, YYYY-MM-DD, an ISO timestamp, or a relative window like \"30 days\". Posts published after it are dropped, uncharged, and counted on the status line."
          },
          "includeNsfw": {
            "title": "Include posts marked over 18",
            "type": "boolean",
            "description": "ON (default): posts marked over 18 are delivered like any other, with isNsfw: true on the row so you can filter them yourself. OFF: they are dropped before anything is charged for them and the status line says how many. Reddit serves these posts to this actor either way, so this setting is your filter and never a claim about what Reddit hides.",
            "default": true
          },
          "maxRunSeconds": {
            "title": "Max run seconds",
            "type": "integer",
            "description": "The run stops cleanly before this many seconds and reports what is left, instead of being killed by a timeout. A time limit ends the collecting, never the delivering: rows already in hand are always written out. Accepted range 30 to 3,600 seconds; a number outside it is moved to the nearest value in range and one uncharged note row says so.",
            "default": 900
          },
          "includeSeen": {
            "title": "Include rows you already have",
            "type": "boolean",
            "description": "OFF (default): a post or comment already delivered to your account is skipped — no row, no charge. ON: those rows are delivered again anyway, marked repeat: true, and still not charged. Anything older than 90 days in your account's memory counts as new again either way.",
            "default": false
          },
          "resumeFromDatasetId": {
            "title": "Skip rows in this dataset",
            "type": "string",
            "description": "The dataset ID of a previous run of this actor. Posts and comments already in it are treated as rows you already have and are skipped, so a follow-up run collects only what is new even from a different Apify account. Selecting it here is what grants this run permission to read it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}