{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper | Posts, Comments, Subreddits & Users",
    "description": "Get Reddit posts, comments, subreddits and users as flat rows: title, text, score, upvote ratio, comment count, author and publish date. Subreddit feeds, full comment threads, search for posts, comments, communities or people, and user feeds in one run. No login or API key.",
    "version": "0.0",
    "x-build-id": "5JL0MoUcZ5tp8psSb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/genial_candlestand~reddit-posts-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-genial_candlestand-reddit-posts-comments-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/genial_candlestand~reddit-posts-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-genial_candlestand-reddit-posts-comments-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/genial_candlestand~reddit-posts-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-genial_candlestand-reddit-posts-comments-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 (subreddit, post, user or search)",
            "type": "array",
            "description": "Any reddit.com URLs: a subreddit (https://www.reddit.com/r/programming/top/?t=week), a post (…/r/x/comments/abc123/slug/ — the post and its comments), a user (…/user/spez/ or …/user/spez/comments/) or a search (…/search/?q=rust&type=comments, …/r/rust/search/?q=async). Sort, time and type in the URL override the fields below. old., np., m. and new.reddit.com hosts are accepted. Short redd.it links and r/all, r/popular are not supported.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "queries": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search on Reddit, one per line. What is searched is set by 'Search for' (posts, comments, communities or people); 'Search sort', 'Time range' and 'Search inside subreddit' refine it. Example: rust async.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search for",
            "enum": [
              "posts",
              "comments",
              "communities",
              "people"
            ],
            "type": "string",
            "description": "What the search terms return: posts, comments, communities (subreddits) or people (users). Applies only to 'Search terms'.",
            "default": "posts"
          },
          "searchSort": {
            "title": "Search sort",
            "enum": [
              "relevance",
              "new",
              "top",
              "comments",
              "hot"
            ],
            "type": "string",
            "description": "Order of search results for posts and comments. Not applied to communities and people searches (Reddit orders them by relevance).",
            "default": "relevance"
          },
          "searchSubreddit": {
            "title": "Search inside subreddit",
            "type": "string",
            "description": "Optional subreddit name (without r/) to limit post and comment searches to it, e.g. rust. Works only with 'Search for' = Posts or Comments; with Communities or People the run stops with an input error."
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names (without r/) whose feed to scrape, one per line, e.g. programming. The feed order is set by 'Subreddit sort'. r/all and r/popular are not supported.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Subreddit sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial",
              "best"
            ],
            "type": "string",
            "description": "Order of subreddit feeds. 'Time range' applies only to Top and Controversial. User feeds are always newest first.",
            "default": "hot"
          },
          "time": {
            "title": "Time range",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Period for subreddit feeds sorted by Top or Controversial and for post and comment searches. Ignored (with a log warning) for Hot, New, Rising and Best feeds. Empty = Reddit's own default (past day for Top feeds, all time for search)."
          },
          "users": {
            "title": "Users",
            "type": "array",
            "description": "Reddit usernames (without u/) whose activity to scrape, one per line, e.g. spez. What is scraped is set by 'User content'.",
            "items": {
              "type": "string"
            }
          },
          "userContent": {
            "title": "User content",
            "enum": [
              "posts",
              "comments",
              "overview"
            ],
            "type": "string",
            "description": "Which feed of each user: their posts, their comments, or both mixed (overview). Always newest first.",
            "default": "posts"
          },
          "includeComments": {
            "title": "Add comments of every post",
            "type": "boolean",
            "description": "Also scrape the comment thread of every post found in subreddit feeds, user feeds and post searches (up to 'Max comments per post' each). Every comment is its own row and a paid result. Post URLs always get their comments.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Most comments to scrape per post (top-level and replies, in the order of 'Comment sort'). Applies to post URLs and to 'Add comments of every post'. 0 = only the post row of a post URL.",
            "default": 100
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "best",
              "top",
              "new",
              "controversial",
              "old"
            ],
            "type": "string",
            "description": "Order of comments in a thread; decides which comments are kept when 'Max comments per post' cuts the thread.",
            "default": "best"
          },
          "postedAfter": {
            "title": "Only posted after",
            "type": "string",
            "description": "Keep only posts and comments published after this date: an absolute date (2026-01-31) or a relative one (7 days, 12 hours). Older rows are skipped for free. Not applied to communities and people."
          },
          "includeNsfw": {
            "title": "Include NSFW",
            "type": "boolean",
            "description": "Keep posts and communities marked NSFW (over 18). Off: they are skipped for free and the log says how many.",
            "default": false
          },
          "maxItemsPerSource": {
            "title": "Max results per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most posts, search results or user items per source (one URL, search term, subreddit or user). Comments are limited separately by 'Max comments per post'. Reddit lists end at about 1000 items.",
            "default": 100
          },
          "maxItems": {
            "title": "Max results in total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the whole run after this many rows (posts, comments, communities and users together). Every row is one paid result.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Reddit blocks most datacenter IPs; keep the residential proxy (default). Other proxies work only rarely and the log warns.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}