{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper - No API Key, Posts, Comments & Search",
    "description": "Reddit scraper with no API key or login. Scrape posts and comments from subreddits, post URLs, user profiles and keyword search. Sort and time filters, date cutoff, NSFW filter, comment depth and parent ids. JSON, CSV, Excel.",
    "version": "1.0",
    "x-build-id": "8DtiJGqieMC9OeIAW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/groupoject~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-groupoject-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/groupoject~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-groupoject-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/groupoject~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-groupoject-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": "Reddit pages to scrape. Supported: subreddits (https://www.reddit.com/r/Python/, also /new/, /top/?t=week, /rising/), single posts (https://www.reddit.com/r/Python/comments/abc123/...), short links (https://redd.it/abc123), user profiles (https://www.reddit.com/user/NAME/) and search pages (https://www.reddit.com/search/?q=..., https://www.reddit.com/r/NAME/search/?q=...). A sort or time filter inside the URL overrides the settings below.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searches": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords or phrases to search on Reddit, one per line. Each keyword is a separate source with its own post limit. Leave empty if you only use URLs.",
            "items": {
              "type": "string"
            }
          },
          "searchSubreddit": {
            "title": "Search only inside this subreddit",
            "type": "string",
            "description": "Optional. Restrict the keyword searches above to one subreddit, e.g. 'smallbusiness' (with or without 'r/'). Leave empty to search all of Reddit."
          },
          "sort": {
            "title": "Sort subreddit posts by",
            "enum": [
              "hot",
              "new",
              "top",
              "rising"
            ],
            "type": "string",
            "description": "Order used for subreddit listings (and user profiles, where Hot falls back to New). 'Top' uses the time filter below.",
            "default": "hot"
          },
          "searchSort": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "new",
              "top",
              "hot",
              "comments"
            ],
            "type": "string",
            "description": "Order used for keyword searches and search URLs without their own sort.",
            "default": "relevance"
          },
          "time": {
            "title": "Time filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window for 'Top' subreddit listings and for search results (Relevance, Top, Most comments). Ignored by Hot, New and Rising. For an exact cutoff use 'Only posts newer than'.",
            "default": "all"
          },
          "maxPostsPerSource": {
            "title": "Max posts per source",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum posts to save from each URL and each search keyword. Comments are counted separately (see below).",
            "default": 25
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Also save the comments of every post found. Each comment is its own row (dataType 'comment') with parentId and depth, so you can rebuild the thread. Makes runs slower and adds rows.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum comments to save for each post when 'Include comments' is on.",
            "default": 20
          },
          "maxCommentDepth": {
            "title": "Max reply depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How deep into reply threads to go. 0 = only top-level comments, 1 = plus direct replies, and so on.",
            "default": 2
          },
          "commentSort": {
            "title": "Sort comments by",
            "enum": [
              "top",
              "confidence",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Which comments come first (and are kept when the per-post limit is reached).",
            "default": "top"
          },
          "postedAfter": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Optional cutoff. Keep only posts created after this moment. Use a date (2026-10-01), a date-time (2026-10-01T12:00:00Z) or a relative period such as '24 hours', '7 days', '2 weeks'. With sort 'New' the scraper stops paging as soon as it reaches older posts, which makes scheduled monitoring runs cheap."
          },
          "includeNsfw": {
            "title": "Include NSFW posts",
            "type": "boolean",
            "description": "Off by default: posts marked NSFW (18+) are skipped. Turn on to keep them.",
            "default": false
          },
          "maxItems": {
            "title": "Max total rows",
            "minimum": 0,
            "type": "integer",
            "description": "Optional overall cap on dataset rows (posts + comments) for the whole run. 0 = no cap. The run also stops when your maximum charge per run is reached.",
            "default": 0
          },
          "onlyNew": {
            "title": "Only new posts and comments (monitoring)",
            "type": "boolean",
            "description": "For scheduled runs. When on, posts and comments already saved by earlier runs with the same state key are skipped before they reach the dataset, so you only get (and pay for) what is new since the last run. A known post is re-opened for comments only when Reddit shows more comments than last time. The first run saves everything it finds and remembers it.",
            "default": false
          },
          "stateKey": {
            "title": "Monitoring state key",
            "type": "string",
            "description": "Name of the memory used by 'Only new'. Runs with the same key share what has been seen; use one key per monitor (e.g. 'acme-brand-mentions'). Letters, numbers and dashes. Leave empty to derive a key from your Reddit URLs and search keywords automatically. Change it to start over."
          },
          "keywordsMustMatch": {
            "title": "Keep only posts mentioning",
            "type": "array",
            "description": "Optional. Keep only posts whose title or text contains at least one of these words or phrases (case-insensitive, whole words). Useful for brand and competitor monitoring on busy subreddits. Search results are checked after their full text is fetched; with 'Fetch full text of search results' off only the title is checked. Comments are saved only for posts that match.",
            "items": {
              "type": "string"
            }
          },
          "searchFullText": {
            "title": "Fetch full text of search results",
            "type": "boolean",
            "description": "Reddit's search page shows titles only. When on, the scraper opens each search result to add the post body and media (one extra request per result; skipped if the run had to fall back to residential proxy). Turn off for faster, title-only search runs.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is used by default (datacenter). You normally do not need to change this.",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Retry blocked requests through residential proxy",
            "type": "boolean",
            "description": "If Reddit blocks a request on every datacenter attempt, retry it through Apify residential proxy instead of losing it. Included in the result price.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests run at the same time. Higher is faster but more likely to be rate-limited by Reddit.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}