{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Community Scraper",
    "description": "Scrape full community intelligence for any subreddit: description, subscriber count, active users, weekly activity, posting rules, wiki pages, icons/colors and settings — plus optional recent posts. No API key or login.",
    "version": "1.0",
    "x-build-id": "YVJO0073Zz8fibFVe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~reddit-community-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-reddit-community-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/crawlerbros~reddit-community-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-reddit-community-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/crawlerbros~reddit-community-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-reddit-community-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": {
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "List of subreddits to analyze. Accepts bare names (python), r/ names or full URLs.",
            "items": {
              "type": "string"
            }
          },
          "discoverMode": {
            "title": "Discovery mode",
            "enum": [
              "search",
              "popular",
              "new"
            ],
            "type": "string",
            "description": "Optional. How to find extra subreddits to add to the run (in addition to any names listed above). 'Keyword search' uses the 'Discover subreddits by keyword' field below. 'Currently popular' and 'Newest' browse Reddit's curated community lists and need no keyword.",
            "default": "search"
          },
          "discoverQuery": {
            "title": "Discover subreddits by keyword (mode=search)",
            "type": "string",
            "description": "Search Reddit's community directory for this keyword and add the matching subreddits to the run. Only used when 'Discovery mode' is 'Keyword search'. Leave empty to only use 'Subreddits'."
          },
          "discoverSort": {
            "title": "Discovery sort (mode=search)",
            "enum": [
              "relevance",
              "activity"
            ],
            "type": "string",
            "description": "How to rank the subreddit search results. Only used when 'Discovery mode' is 'Keyword search' and 'Discover subreddits by keyword' is set.",
            "default": "relevance"
          },
          "maxDiscoverResults": {
            "title": "Maximum discovered subreddits",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of subreddits to add from the keyword search, or to browse from 'Currently popular'/'Newest' when 'Discovery mode' isn't 'Keyword search'.",
            "default": 10
          },
          "includeRules": {
            "title": "Include community rules",
            "type": "boolean",
            "description": "Fetch the subreddit's rules (name, description, kind, priority).",
            "default": true
          },
          "includeWiki": {
            "title": "Include wiki pages",
            "type": "boolean",
            "description": "Fetch the subreddit's wiki pages with their markdown content.",
            "default": false
          },
          "maxWikiPages": {
            "title": "Maximum wiki pages",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of wiki pages to fetch (when 'Include wiki pages' is on).",
            "default": 20
          },
          "includeWeeklyStats": {
            "title": "Include weekly active stats",
            "type": "boolean",
            "description": "Include weekly active users and weekly contributions from the community header.",
            "default": true
          },
          "includeModerators": {
            "title": "Include moderator list",
            "type": "boolean",
            "description": "Fetch the subreddit's public moderator list (username, mod permissions, moderator-since date).",
            "default": true
          },
          "includePosts": {
            "title": "Include recent posts",
            "type": "boolean",
            "description": "Also scrape the subreddit's posts (full post data).",
            "default": true
          },
          "maxPosts": {
            "title": "Maximum posts",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum posts to scrape (when 'Include recent posts' is on).",
            "default": 25
          },
          "sort": {
            "title": "Sort posts by",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial",
              "best"
            ],
            "type": "string",
            "description": "How to sort the included posts.",
            "default": "hot"
          },
          "timeFilter": {
            "title": "Time filter (for 'top' and 'controversial')",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time filter when sorting included posts by top/controversial.",
            "default": "day"
          },
          "includeNSFW": {
            "title": "Include NSFW (18+) posts",
            "type": "boolean",
            "description": "Include NSFW posts in the post listing.",
            "default": false
          },
          "onlyWithFlair": {
            "title": "Only posts that have a flair (mode=posts)",
            "type": "boolean",
            "description": "When enabled, posts without a flair tag are dropped from the post listing.",
            "default": false
          },
          "postType": {
            "title": "Only posts of this type (mode=posts)",
            "enum": [
              "self",
              "link",
              "image",
              "video",
              "gallery",
              "poll"
            ],
            "type": "string",
            "description": "Keep only posts of the selected content type in the post listing. Leave unset to keep all types."
          },
          "minScore": {
            "title": "Minimum score (mode=posts)",
            "minimum": -1000000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts with a score (upvotes minus downvotes) at or above this value. Leave unset to keep all scores."
          },
          "maxScore": {
            "title": "Maximum score (mode=posts)",
            "minimum": -100000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts with a score (upvotes minus downvotes) at or below this value. Useful for finding overlooked/low-visibility posts. Leave unset to keep all scores."
          },
          "minComments": {
            "title": "Minimum number of comments (mode=posts)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts with at least this many comments. Leave unset to keep all posts."
          },
          "maxComments": {
            "title": "Maximum number of comments (mode=posts)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts with at most this many comments. Useful for finding under-discussed posts. Leave unset to keep all posts."
          },
          "excludeStickied": {
            "title": "Exclude stickied/pinned posts (mode=posts)",
            "type": "boolean",
            "description": "When enabled, posts pinned/stickied by moderators (e.g. rules, weekly threads) are dropped from the post listing.",
            "default": false
          },
          "minUpvoteRatio": {
            "title": "Minimum upvote ratio (mode=posts)",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Only keep posts whose upvote ratio (fraction of votes that are upvotes, 0-1) is at or above this value. Useful for filtering out controversial/divisive posts. Leave unset to keep all ratios."
          },
          "excludeRemoved": {
            "title": "Exclude removed/deleted posts (mode=posts)",
            "type": "boolean",
            "description": "When enabled, posts removed by a moderator, Reddit, or deleted by their author (marker: removed_by_category) are dropped from the post listing.",
            "default": false
          },
          "excludeCrossposts": {
            "title": "Exclude crossposts (mode=posts)",
            "type": "boolean",
            "description": "When enabled, posts that are crossposts from another subreddit are dropped, keeping only original submissions to the scraped subreddit.",
            "default": false
          },
          "excludeSpoilers": {
            "title": "Exclude spoiler-tagged posts (mode=posts)",
            "type": "boolean",
            "description": "When enabled, posts marked as a spoiler by their author are dropped from the post listing.",
            "default": false
          },
          "excludeLocked": {
            "title": "Exclude locked posts (mode=posts)",
            "type": "boolean",
            "description": "When enabled, posts with comments locked by a moderator are dropped from the post listing.",
            "default": false
          },
          "excludeDeletedAuthor": {
            "title": "Exclude posts with a deleted/removed author (mode=posts)",
            "type": "boolean",
            "description": "When enabled, posts whose author account was deleted (shown as [deleted]/[removed]) are dropped from the post listing.",
            "default": false
          },
          "onlyOriginalContent": {
            "title": "Only original content (OC) posts (mode=posts)",
            "type": "boolean",
            "description": "When enabled, only posts the author tagged as original content are kept in the post listing.",
            "default": false
          },
          "minAwards": {
            "title": "Minimum awards received (mode=posts)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts with at least this many total awards. Leave unset to keep all posts."
          },
          "titleContains": {
            "title": "Title contains keyword (mode=posts)",
            "type": "string",
            "description": "Only keep posts whose title contains this text (case-insensitive substring match). Leave empty to keep all titles."
          },
          "contentContains": {
            "title": "Post text contains keyword (mode=posts)",
            "type": "string",
            "description": "Only keep self (text) posts whose body contains this text (case-insensitive substring match). Link/image/video posts have no body text and are excluded when this is set. Leave empty to keep all posts."
          },
          "flairContains": {
            "title": "Flair contains keyword (mode=posts)",
            "type": "string",
            "description": "Only keep posts whose flair text contains this text (case-insensitive substring match). Leave empty to keep all flairs."
          },
          "authorFlairContains": {
            "title": "Author flair contains keyword (mode=posts)",
            "type": "string",
            "description": "Only keep posts whose author flair text contains this text (case-insensitive substring match). Leave empty to keep all."
          },
          "authors": {
            "title": "Only posts by these authors (mode=posts)",
            "type": "array",
            "description": "Only keep posts submitted by one of these usernames (bare name or u/-prefixed, case-insensitive). Leave empty to keep posts from all authors.",
            "items": {
              "type": "string"
            }
          },
          "domain": {
            "title": "Domain contains (mode=posts)",
            "type": "string",
            "description": "Only keep posts whose link domain contains this text (case-insensitive, e.g. 'youtube.com' or 'self.python'). Leave empty to keep all domains."
          },
          "distinguished": {
            "title": "Distinguished (official) posts only (mode=posts)",
            "enum": [
              "moderator",
              "admin",
              "special",
              "none"
            ],
            "type": "string",
            "description": "Only keep posts distinguished by Reddit as moderator, admin or special (e.g. Reddit-team) posts, or only regular (non-distinguished) posts. Leave unset to keep all posts."
          },
          "postedAfter": {
            "title": "Posts created on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only keep posts created on or after this date (UTC). Note: when set, the listing walk starts from the newest posts."
          },
          "postedBefore": {
            "title": "Posts created on or before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only keep posts created on or before this date (interpreted as the end of that day, UTC)."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}