{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper: Posts & Full Comment Threads, Excel Rows, MCP",
    "description": "Public Reddit posts with full comment threads, as nested JSON or one Excel row per comment with depth and path. Subreddits, post links, users and search; no login or API key. Works from Claude through Apify MCP. Scheduled onlyNew runs replace Reddit RSS. $0.003 per row.",
    "version": "1.6",
    "x-build-id": "uR91dEh56de4trw1y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/benthepythondev~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-benthepythondev-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/benthepythondev~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-benthepythondev-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/benthepythondev~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-benthepythondev-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": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "subreddit",
              "post",
              "user",
              "search"
            ],
            "type": "string",
            "description": "What to scrape from Reddit",
            "default": "subreddit"
          },
          "subreddit": {
            "title": "Subreddit Name",
            "type": "string",
            "description": "Subreddit to scrape (e.g., 'python' or 'r/python'). A subreddit link or an old RSS feed link such as https://www.reddit.com/r/python/.rss also works. Required for subreddit mode.",
            "default": "AskReddit"
          },
          "postUrl": {
            "title": "Post URL",
            "type": "string",
            "description": "Full URL of Reddit post to scrape (for post mode)"
          },
          "username": {
            "title": "Username",
            "type": "string",
            "description": "Reddit username to scrape posts from (for user mode)"
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Search query to find posts (for search mode)"
          },
          "searchSubreddit": {
            "title": "Limit Search to Subreddit",
            "type": "string",
            "description": "Limit search to specific subreddit (optional for search mode)"
          },
          "sort": {
            "title": "Sort Order",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial",
              "relevance"
            ],
            "type": "string",
            "description": "How posts are ordered: hot, new, top, rising, controversial, or relevance (search only). Example: top.",
            "default": "hot"
          },
          "timeFilter": {
            "title": "Time Filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time range for top/controversial sort",
            "default": "all"
          },
          "maxPosts": {
            "title": "Maximum Posts",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of posts to scrape (0 = unlimited)",
            "default": 10
          },
          "strictMatch": {
            "title": "Every word must be in the post (search)",
            "type": "boolean",
            "description": "Search mode only. Reddit's search also returns posts that only relate to your words (in New order, 15 of the 30 newest results for \"home assistant\" lacked one of the words on October 26, 2026). With this on, a post is kept only when its title or text contains every word of the query, so a keyword or brand watch returns real mentions. Posts left out are not saved and not charged.",
            "default": false
          },
          "deepScrape": {
            "title": "Read past Reddit's list limit",
            "type": "boolean",
            "description": "Reddit ends a subreddit list after about 950 posts and a search after about 240. When on, the Actor also reads the other orders and time ranges of the same subreddit or search and adds the posts it has not saved yet, until Maximum Posts: about 2,400 posts of a large subreddit and about 1,100 of a broad search in our tests. Subreddit and search mode. Off by default: the run returns the one list you chose.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new posts since the last run (monitoring)",
            "type": "boolean",
            "description": "Watch a subreddit, search or user: every run returns only the posts earlier runs of the watch have not returned, oldest first, so a schedule gives you a feed of new posts (export it as RSS, or send it to Slack or a webhook through an integration). The first run returns the newest posts up to Maximum Posts and marks where the watch begins. Subreddit and search are read in New order. With Include Comments, the comments of the new posts come too. A run without new posts saves nothing and is charged for nothing beyond its start.",
            "default": false
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Optional. Runs with the same target and the same name share one memory of delivered posts. Give two schedules on the same subreddit or search different names to keep them apart."
          },
          "maxComments": {
            "title": "Maximum Comments Per Post",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum comments to scrape per post (applies to both post mode and subreddit mode with includeComments, 0 = unlimited)",
            "default": 50
          },
          "includeComments": {
            "title": "Include Comments in Subreddit Mode",
            "type": "boolean",
            "description": "Scrape comments for each post in subreddit mode (slower but more data)",
            "default": false
          },
          "commentRows": {
            "title": "One row per comment (Excel-ready)",
            "type": "boolean",
            "description": "Return every comment and reply as its own row, in thread order right after its post: type, post_id, post_title, comment_id, parent_id, depth (0 = top level), path (like 1.3.2), author, score, created_utc, body and indented_body. A CSV or XLSX export then shows the whole reply tree under its post. Each comment row is billed like any other row (one dataset row each), so a thread with its replies costs more than the top-level comments alone. Off by default: comments come back nested in `replies`.",
            "default": false
          },
          "expandMoreComments": {
            "title": "Expand 'Load More' / 'Continue Thread' Stubs",
            "type": "boolean",
            "description": "When ON (default), resolves Reddit's 'load more comments' stubs via /api/morechildren and follows 'continue this thread' links so the scraped count matches num_comments. Turn OFF for faster runs that only return the first ~50 comments per post.",
            "default": true
          },
          "sinceDate": {
            "title": "Posts Since Date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Subreddit mode only: keep posts on or after this UTC date (YYYY-MM-DD). Invalid dates and other modes with this field are rejected."
          },
          "outputFormat": {
            "title": "Content Output Format",
            "enum": [
              "markdown",
              "html",
              "text"
            ],
            "type": "string",
            "description": "Format returned in content on posts, comments and nested replies. Original text/Markdown/HTML fields remain available. Plain text is extracted from source HTML; original text is retained when HTML is absent.",
            "default": "markdown"
          },
          "includeImages": {
            "title": "Include Images",
            "type": "boolean",
            "description": "Include extracted image URLs and thumbnails. False returns an empty images array and a null thumbnail; post URLs and links within the original text remain unchanged.",
            "default": true
          },
          "delaySeconds": {
            "title": "Delay Between Requests (seconds)",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "Delay between Reddit API requests to respect rate limits",
            "default": 1
          },
          "debugMode": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Enable detailed logging for debugging",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}