{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper - Posts, Comments & Search",
    "description": "Scrape Reddit posts, comments, subreddits and user profiles by keyword search or URL. No API key or login needed. Filter by date, upvotes and NSFW, get full comment threads and free sentiment analysis. Export JSON, CSV or Excel, or connect via API, MCP and integrations. Pay only per result.",
    "version": "0.0",
    "x-build-id": "VW9Zex5CQ78US1kbp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/briskpebble~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-briskpebble-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/briskpebble~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-briskpebble-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/briskpebble~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-briskpebble-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": {
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search Reddit posts for, one per line. Reddit search syntax works: \"exact phrase\", OR, -exclude, subreddit:name, author:name, site:example.com.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "How Reddit ranks the search results.",
            "default": "relevance"
          },
          "searchTime": {
            "title": "Search time range",
            "enum": [
              "all",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only return search results posted within this period.",
            "default": "all"
          },
          "searchSubreddit": {
            "title": "Search only inside this subreddit (optional)",
            "type": "string",
            "description": "Restrict the search to one community, e.g. \"SaaS\" or \"r/SaaS\". Leave empty to search all of Reddit."
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names or URLs to scrape posts from, e.g. \"technology\", \"r/AskReddit\" or \"https://www.reddit.com/r/startups/\".",
            "items": {
              "type": "string"
            }
          },
          "subredditSort": {
            "title": "Subreddit feed sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "Which feed of the subreddit to scrape.",
            "default": "hot"
          },
          "subredditTime": {
            "title": "Time range for Top / Controversial",
            "enum": [
              "all",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Period for the Top and Controversial feeds. Ignored for Hot, New and Rising.",
            "default": "week"
          },
          "usernames": {
            "title": "Reddit usernames",
            "type": "array",
            "description": "Usernames or profile URLs whose submitted posts you want, e.g. \"spez\", \"u/spez\" or \"https://www.reddit.com/user/spez/\".",
            "items": {
              "type": "string"
            }
          },
          "includeUserComments": {
            "title": "Also scrape the users' comments",
            "type": "boolean",
            "description": "Besides submitted posts, save the comments these users wrote.",
            "default": false
          },
          "startUrls": {
            "title": "Reddit URLs",
            "type": "array",
            "description": "Any mix of post, subreddit, search and user profile URLs. Post URLs return the full post (and its comments when Step 2 is on). Sorting in the URL (e.g. /top/?t=month or &sort=new) is respected.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "includeComments": {
            "title": "Scrape comments",
            "type": "boolean",
            "description": "Save the comments of every scraped post as separate items (dataType = \"comment\"), with author, text, score, depth and parent ID so you can rebuild the thread.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many comments for each post.",
            "default": 20
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "confidence",
              "top",
              "new",
              "old",
              "controversial",
              "qa"
            ],
            "type": "string",
            "description": "Order in which Reddit returns comments. With a low comment limit this decides which comments you get.",
            "default": "confidence"
          },
          "expandMoreComments": {
            "title": "Expand \"more replies\" threads",
            "type": "boolean",
            "description": "Follow Reddit's \"more replies\" links to collect deeper reply threads until the comment limit is reached.",
            "default": true
          },
          "skipBotComments": {
            "title": "Skip bot comments",
            "type": "boolean",
            "description": "Leave out comments by AutoModerator and other bots (names ending in \"bot\").",
            "default": false
          },
          "fetchPostDetails": {
            "title": "Get full post text",
            "type": "boolean",
            "description": "Open each post found via search or feeds to get its complete body text, flair and media. Feeds and search only show previews. Uses one extra request per post.",
            "default": false
          },
          "includeCommunityInfo": {
            "title": "Include subreddit details",
            "type": "boolean",
            "description": "Also save one item per subreddit (dataType = \"community\") with title, description, member count and icon.",
            "default": false
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Only keep posts and comments published after this date. Use an absolute date (2026-01-31) or a relative one (7 days, 2 weeks, 3 months). On \"New\" feeds the scraper stops paginating once it reaches older posts."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Only keep posts and comments published before this date (absolute or relative)."
          },
          "includeNsfw": {
            "title": "Include NSFW (18+) posts",
            "type": "boolean",
            "description": "Keep posts Reddit marks as NSFW. Off by default.",
            "default": false
          },
          "minScore": {
            "title": "Minimum upvotes",
            "type": "integer",
            "description": "Skip posts with a lower score (upvotes minus downvotes)."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer comments."
          },
          "strictSearch": {
            "title": "Strict keyword match",
            "type": "boolean",
            "description": "Reddit search is fuzzy. When on, a search result is kept only if every word of your search term appears in its title, text or snippet.",
            "default": false
          },
          "maxItems": {
            "title": "Max results (total)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Total number of items (posts + comments + communities) to save across all targets. The run stops when it is reached. This is the main way to control cost.",
            "default": 100
          },
          "maxPostsPerSource": {
            "title": "Max posts per target",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum posts to save for each search term, subreddit, user or URL. Comments don't count towards this limit.",
            "default": 25
          },
          "sentimentAnalysis": {
            "title": "Sentiment analysis",
            "type": "boolean",
            "description": "Add a sentiment field (score, comparative, label positive/neutral/negative) to every post and comment. Uses the AFINN lexicon on English text. Runs locally at no extra cost.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Reddit blocks most datacenter IPs, so residential proxies are recommended (default).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "fetchMode": {
            "title": "Fetch mode",
            "enum": [
              "auto",
              "http",
              "browser"
            ],
            "type": "string",
            "description": "Auto (recommended): fast HTTP requests; a real browser opens only when Reddit shows a challenge, and its cookies are reused. HTTP only: cheapest, but gives up on challenges. Browser: every page in Chrome; slowest and most expensive, use only if Auto keeps getting blocked.",
            "default": "auto"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum parallel requests. Higher is faster but more likely to be rate-limited.",
            "default": 5
          },
          "debugLog": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Verbose logs, and save pages that could not be parsed to the key-value store. Useful when reporting an issue.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}