{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper: Posts, Comments, Users, Search & Explore",
    "description": "Scrape Reddit posts, full comment threads, users, communities and comment search by keyword, plus the Explore tab's recommended communities. API-grade JSON with no login or browser, unaffected by Reddit's 2026 .json shutdown. Monitor brands and keywords with only-new runs.",
    "version": "0.1",
    "x-build-id": "getCOFMmYE0PMF0qC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nextgensda~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nextgensda-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/nextgensda~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nextgensda-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/nextgensda~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nextgensda-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": "Any Reddit URL: a subreddit (with a sort, e.g. <code>/r/espresso/top/?t=week</code>), a post (with its comments), a user (<code>/user/name/</code>, <code>/comments/</code> or <code>/submitted/</code>), a search (<code>/search/?q=…&type=comments</code>), <code>r/popular</code>, <code>r/all</code>, the front page or <code>/explore/</code>. Share links (<code>/s/…</code>) aren't supported: open them and copy the post URL.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Community names (<code>AskReddit</code>, <code>r/espresso</code>). <code>popular</code> and <code>all</code> work too.",
            "items": {
              "type": "string"
            }
          },
          "searches": {
            "title": "Search keywords",
            "type": "array",
            "description": "Search Reddit for each keyword. Choose what to search for below.",
            "items": {
              "type": "string"
            }
          },
          "searchFor": {
            "title": "Search for",
            "type": "array",
            "description": "What each keyword searches: posts, comments (full comment text, with the post and subreddit), communities or users.",
            "items": {
              "type": "string",
              "enum": [
                "posts",
                "comments",
                "communities",
                "users"
              ],
              "enumTitles": [
                "Posts",
                "Comments",
                "Communities",
                "Users"
              ]
            },
            "default": [
              "posts"
            ]
          },
          "searchSubreddit": {
            "title": "Search inside one subreddit",
            "type": "string",
            "description": "Optional: restrict post and comment searches to this community (e.g. <code>espresso</code>)."
          },
          "users": {
            "title": "Users",
            "type": "array",
            "description": "Usernames (<code>spez</code>, <code>u/spez</code>): profile, posts and/or comments (see below).",
            "items": {
              "type": "string"
            }
          },
          "includeExplore": {
            "title": "Explore: recommended communities",
            "type": "boolean",
            "description": "The communities Reddit's Explore tab recommends, with subscribers, description and (optionally) rules.",
            "default": false
          },
          "sort": {
            "title": "Sort subreddits and users",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "Order of subreddit listings and user posts/comments. With <b>New</b>, a <i>Posted after</i> date ends the listing as soon as it's reached.",
            "default": "hot"
          },
          "searchSort": {
            "title": "Sort searches",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "Order of search results. Comment search supports Relevance, Top and New.",
            "default": "relevance"
          },
          "timeframe": {
            "title": "Time range",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "For <b>Top</b> and <b>Controversial</b> sorts and for searches.",
            "default": "all"
          },
          "includeComments": {
            "title": "Include comments of every post",
            "type": "boolean",
            "description": "Fetch each post's comment thread (one row per comment, with its depth and parent). Post URLs always include their comments.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 2500,
            "type": "integer",
            "description": "Reddit shows logged-out readers up to 500 comments of a thread at a time. Above 500, the actor merges several comment orders (top, new, controversial, old) to reach deeper into big threads.",
            "default": 100
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "top",
              "best",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Which comments come first (and are kept when a thread has more than the maximum).",
            "default": "top"
          },
          "userContent": {
            "title": "From users, scrape",
            "enum": [
              "both",
              "posts",
              "comments"
            ],
            "type": "string",
            "description": "A user's posts, comments or both. A user URL ending in <code>/comments/</code> or <code>/submitted/</code> overrides this.",
            "default": "both"
          },
          "userProfile": {
            "title": "Include user profiles",
            "type": "boolean",
            "description": "A row per user: karma, account age, description, verified, moderator, employee.",
            "default": true
          },
          "includeSubredditInfo": {
            "title": "Include subreddit info",
            "type": "boolean",
            "description": "A row per scraped subreddit: subscribers, description, creation date, type, icon.",
            "default": false
          },
          "includeRules": {
            "title": "Include community rules",
            "type": "boolean",
            "description": "Add each community's rules to its row (subreddit info, community search, Explore).",
            "default": false
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Only posts from this date on: <code>2026-10-01</code>, or relative: <code>7 days</code>, <code>24 hours</code>, <code>1 month</code>. Schedule a daily run with <code>1 day</code> to collect what's new."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Only posts up to this date (same formats)."
          },
          "commentedAfter": {
            "title": "Comments after",
            "type": "string",
            "description": "Only comments from this date on (same formats)."
          },
          "minScore": {
            "title": "Minimum score",
            "type": "integer",
            "description": "Skip posts (and searched or user comments) with a lower score."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer comments."
          },
          "onlyNew": {
            "title": "Only new rows (monitoring)",
            "type": "boolean",
            "description": "Skip posts, comments, communities and users this monitor delivered in earlier runs (remembered 60 days). Skipped rows aren't charged. Schedule the actor for brand, keyword or community monitoring.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keep separate monitors apart (e.g. one per brand). Letters, digits and dashes.",
            "default": "default"
          },
          "maxItemsPerSource": {
            "title": "Max rows per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Posts per subreddit, search or user (and comments per comment search or user). Reddit ends any listing or search at about 1,000. Thread comments are capped by <i>Max comments per post</i> instead.",
            "default": 100
          },
          "maxItems": {
            "title": "Max rows in total",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The run stops after this many rows (posts, comments, communities and users together).",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify's datacenter proxies work and cost least. Reddit allows each IP 100 requests per 10 minutes: the actor moves to a new IP before that runs out. If Reddit refuses datacenter IPs, the run switches to residential by itself.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}