{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper | Posts, Comments and Search | No API Key",
    "description": "Scrape Reddit posts, comments, subreddits, search & user history. No login, pay per result, full nested comment trees, monitor mode for new posts only. Use in Claude, ChatGPT & any MCP agent for market research, sentiment & AI training data.",
    "version": "0.2",
    "x-build-id": "TcA7o7s8hsX3zWkRM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-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/themineworks~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-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/themineworks~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "subreddit",
              "search",
              "user",
              "post"
            ],
            "type": "string",
            "description": "What to scrape. Choose subreddit, search, user, or specific post URLs.",
            "default": "subreddit"
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "List of subreddit names to scrape (without r/ prefix). Used when mode=subreddit, e.g. \"MachineLearning\" or \"Python\".",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Search query string. Used when mode=search. Supports Reddit's full search syntax, e.g. \"lab grown diamonds engagement ring\"."
          },
          "username": {
            "title": "Reddit Username",
            "type": "string",
            "description": "Reddit username (without u/ prefix). Used when mode=user, e.g. \"spez\"."
          },
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "Full Reddit post URLs to scrape with comments. Used when mode=post, e.g. https://www.reddit.com/r/MachineLearning/comments/abc123/some_post_title/.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "hot",
              "new",
              "top",
              "rising"
            ],
            "type": "string",
            "description": "How to sort posts. 'top' can be combined with a timeframe.",
            "default": "hot"
          },
          "dataSource": {
            "title": "Data source",
            "enum": [
              "live",
              "auto",
              "archive"
            ],
            "type": "string",
            "description": "Live reads Reddit itself, so hot, top and rising rankings and current scores and comment counts are exact. Archive reads a public copy of Reddit instead: it costs far less to run and is fast, but it lists posts newest first only, scores and comment counts on posts under about 36 hours old can lag, and a few live only fields (locked, pinned) are left empty. Auto uses the archive only where it answers the same way as live (a subreddit sorted by new, a user's posts, with comments off) and goes live for everything else, including every run that asks for comments. Searching all of Reddit is not available from the archive (it finds very few posts), so use Live or Auto for search. Archive text keeps Reddit's original markdown, and comments on posts under about 36 hours old can be missing or partial. Each row says which one it came from in data_source. Tip: for archive runs choose 512 MB memory to pay a smaller start fee.",
            "default": "live"
          },
          "timeframe": {
            "title": "Timeframe (for Top sort)",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window when using sort=top. Ignored for other sort types.",
            "default": "all"
          },
          "maxPosts": {
            "title": "Max Posts",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of posts to scrape. You are charged only for posts actually scraped.",
            "default": 25
          },
          "includeComments": {
            "title": "Include Comments",
            "type": "boolean",
            "description": "Fetch and include the comment tree for each post. Increases run time and cost.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max Comments Per Post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of top-level comments to fetch per post. Only used when includeComments=true.",
            "default": 100
          },
          "maxDepth": {
            "title": "Max Comment Depth",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How deep to recurse into comment reply threads. 1 = top-level only, 3 = three levels deep.",
            "default": 3
          },
          "skipPinnedPosts": {
            "title": "Skip Pinned Posts",
            "type": "boolean",
            "description": "Skip mod-pinned/stickied posts at the top of subreddit listings.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode (only new results)",
            "type": "boolean",
            "description": "Run on a schedule and deliver ONLY results not seen in a previous run. You are charged per new result, not for the whole feed each time. Ideal for daily monitoring. Requires the same input across runs.",
            "default": false
          },
          "after": {
            "title": "Pagination Cursor (after)",
            "type": "string",
            "description": "Leave blank for a normal run. To resume or backfill deeper history, paste the Reddit 'after' cursor from a previous run's summary item, e.g. t3_1c8x9qz, and the run continues where that one left off."
          },
          "clientId": {
            "title": "Reddit Client ID (optional)",
            "type": "string",
            "description": "No longer needed and ignored. Reddit closed its API to scrapers on 12 Nov 2026, so the actor reads Reddit's public web pages instead. Old inputs that still carry a client ID keep working."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}