{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper - Posts, Comments, Search, Users (no login)",
    "description": "Scrape Reddit posts, comments, search results and user history without a login. Paste keywords, r/subreddits, u/users or post links in one list. Only-new-posts monitoring per line, date filter, and a plain-English reason for every line that returns nothing.",
    "version": "0.3",
    "x-build-id": "9FMkXy9N2toZzLryq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/constructive_calm~reddit-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-constructive_calm-reddit-scraper-pro",
        "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/constructive_calm~reddit-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-constructive_calm-reddit-scraper-pro",
        "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/constructive_calm~reddit-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-constructive_calm-reddit-scraper-pro",
        "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": {
          "targets": {
            "title": "What to scrape",
            "type": "array",
            "description": "One per line — each line is auto-detected:\n• Keyword search (all of Reddit): python   or   \"agentic payments\" OR x402\n• Search inside one subreddit: r/rust async runtime\n• Subreddit feed: r/technology   or   https://www.reddit.com/r/technology/top/?t=week\n• One post + its comments: https://www.reddit.com/r/.../comments/abc123/...   (redd.it and app share links work too)\n• A user's posts & comments: u/spez   or   https://www.reddit.com/user/spez\n• Any Reddit search link: https://www.reddit.com/search/?q=x402&sort=new\n\nPlain text is always searched. To scrape a subreddit's feed, start the line with r/ (names are not case-sensitive).",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerTarget": {
            "title": "Max posts per line",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many posts to collect for each keyword, subreddit or user above (for users: posts + comments). A post link always returns that one post.",
            "default": 25
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "auto",
              "new",
              "top",
              "hot",
              "rising",
              "relevance",
              "comments",
              "controversial"
            ],
            "type": "string",
            "description": "A sort inside a pasted Reddit link (e.g. /top/?t=week or &sort=new) always wins for that line.",
            "default": "auto"
          },
          "timeFilter": {
            "title": "Time window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "For searches it limits every sort. For subreddits and users only Top and Controversial use it. For an exact cut-off date use 'Only posts newer than' instead.",
            "default": "all"
          },
          "postedAfter": {
            "title": "Only posts newer than",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(hour|day|week|month|year)s?$",
            "type": "string",
            "description": "A date (2026-09-01) or relative time (7 days, 3 weeks, 1 month; API callers can also send 24 hours). Older posts are skipped and not charged. Leave empty for no date limit."
          },
          "onlyNew": {
            "title": "Only new posts since my last run (monitoring)",
            "type": "boolean",
            "description": "Turn on for scheduled runs. The first run saves a baseline (returns the latest page). After that, each run returns only posts published since the previous run, tracked separately for every subreddit and keyword line (user and post lines are scraped normally). Progress is stored in your account's key-value store 'reddit-monitor-state'.",
            "default": false
          },
          "commentsMode": {
            "title": "Get comments for",
            "enum": [
              "postUrls",
              "all",
              "none"
            ],
            "type": "string",
            "description": "With 'Every post found', each post's comment thread is read before the post is saved, and its comments follow the post row. Posts with 0 comments are skipped without an extra request.",
            "default": "postUrls"
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Up to this many comments per post (100 when left empty), in Reddit's default (best) order. The whole thread is read — collapsed 'load more comments' and 'continue this thread' branches included. Big threads have thousands of comments and every comment is charged ($0.0008 each: 5,000 comments ≈ $4), so keep this modest unless you need the full discussion. 'Max total rows' still caps the whole run."
          },
          "maxCommentDepth": {
            "title": "Reply depth",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "1 = top-level comments only. 10 = most full threads. 0 = post only.",
            "default": 10
          },
          "maxItems": {
            "title": "Max total rows (spending cap)",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard cap on posts + comments across the whole run. The run stops cleanly when it is reached. Raise it when you collect comments for many posts. Status rows are not charged and not counted.",
            "default": 200
          },
          "includeNsfw": {
            "title": "Include NSFW (18+) posts",
            "type": "boolean",
            "description": "Turn off to skip posts marked NSFW (they are not charged).",
            "default": true
          },
          "statusRows": {
            "title": "Explain empty results in the dataset",
            "type": "boolean",
            "description": "For any line that returns nothing (not found, private, banned, no matches, blocked), add one row with recordType 'status' and a plain-English reason (status rows are never charged). Turn off if your pipeline must receive only posts and comments. The run's OUTPUT record always has the per-line status.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is. Apify's datacenter proxy works for Reddit; with Apify Proxy the actor switches to a US residential IP only when a page hits a network error or a regional age gate. Your own proxy URLs are always used as they are (never replaced).",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Auto residential fallback",
            "type": "boolean",
            "description": "With Apify Proxy: retry a page through a US residential IP after network errors or regional age gates (reported in the run's status and OUTPUT). Never used with your own proxy URLs or without a proxy.",
            "default": true
          },
          "mode": {
            "title": "Legacy: mode",
            "type": "string",
            "description": "0.1.x input (subreddit_posts | search | comments_thread | user_profile | monitor). Still honoured when 'What to scrape' is empty; an unknown value falls back to subreddit_posts."
          },
          "subreddits": {
            "title": "Legacy: subreddits",
            "type": "array",
            "description": "0.1.x input for subreddit_posts / monitor (and the scope of a restricted search). Use 'What to scrape' instead.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Legacy: searchQuery",
            "type": "string",
            "description": "0.1.x input for search mode. Use 'What to scrape' instead."
          },
          "restrictToSubreddit": {
            "title": "Legacy: restrictToSubreddit",
            "type": "boolean",
            "description": "0.1.x: search only inside the first legacy subreddit. Use 'r/name words' in 'What to scrape' instead."
          },
          "postUrls": {
            "title": "Legacy: postUrls",
            "type": "array",
            "description": "0.1.x input for comments_thread mode. Paste post links into 'What to scrape' instead.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Legacy: usernames",
            "type": "array",
            "description": "0.1.x input for user_profile mode. Use u/name in 'What to scrape' instead.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Legacy: includeComments",
            "type": "boolean",
            "description": "0.1.x comments_thread switch (on unless set to false). Use 'Get comments for' instead."
          },
          "maxPagesPerTarget": {
            "title": "Legacy: maxPagesPerTarget",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "0.1.x pagination cap (default 5 pages of 25): a legacy line returns at most maxPagesPerTarget × 25 posts. The 0.2 input uses 'Max posts per line' instead."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}