{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Subreddit Profile, Rules & Post Filter 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": "Yy4ffYbftredacudh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~reddit-subreddit-profile-rules-and-post-filter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-reddit-subreddit-profile-rules-and-post-filter",
        "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/dataspryva~reddit-subreddit-profile-rules-and-post-filter/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-reddit-subreddit-profile-rules-and-post-filter",
        "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/dataspryva~reddit-subreddit-profile-rules-and-post-filter/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-reddit-subreddit-profile-rules-and-post-filter",
        "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": "What to scrape",
            "enum": [
              "communities",
              "discover",
              "posts",
              "comments"
            ],
            "type": "string",
            "description": "Pick the result you want. 'Communities' returns one profile per subreddit (plus optional posts and comments). 'Discover' finds communities by keyword or browse. 'Posts' returns post records only. 'Comments' returns capped comment trees for post URLs or a subreddit's top posts.",
            "default": "communities"
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names to scrape. Accepts bare names, r/ names or full URLs. Use the name as shown in the subreddit URL (Reddit redirects are challenged on some networks). Not needed when 'postUrls' is set or when discovery finds enough communities.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs (comments mode)",
            "type": "array",
            "description": "Reddit post or comment URLs (or bare post IDs) to scrape in comments mode. When set, these take priority over subreddit top posts. Example: https://www.reddit.com/r/pics/comments/1x1xbpb/",
            "items": {
              "type": "string"
            }
          },
          "discoverMode": {
            "title": "Discovery source",
            "enum": [
              "search",
              "popular",
              "new"
            ],
            "type": "string",
            "description": "How to find extra communities. 'Keyword search' uses the field below. 'Currently popular' and 'Newest' browse Reddit's curated lists (best-effort: those pages expose only a few communities).",
            "default": "search"
          },
          "discoverQuery": {
            "title": "Discover communities by keyword",
            "type": "string",
            "description": "Search Reddit's community directory for this keyword and add the matching communities to the run. Only used with 'Keyword search'. Leave empty to skip discovery."
          },
          "discoverSort": {
            "title": "Discovery ranking",
            "enum": [
              "relevance",
              "activity"
            ],
            "type": "string",
            "description": "How to rank keyword-discovered communities: relevance keeps Reddit's order, activity sorts by weekly active users.",
            "default": "relevance"
          },
          "maxDiscoverResults": {
            "title": "Maximum discovered communities",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of communities to add from keyword search or browse (1-100).",
            "default": 10
          },
          "includeRules": {
            "title": "Include community rules",
            "type": "boolean",
            "description": "Add posting rules (name, description, priority) to community profiles in communities mode.",
            "default": true
          },
          "includeWiki": {
            "title": "Include wiki pages",
            "type": "boolean",
            "description": "Fetch the community wiki index and each page's Markdown source. Wiki pages are omitted when the wiki is disabled or empty.",
            "default": false
          },
          "maxWikiPages": {
            "title": "Maximum wiki pages",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of wiki pages to fetch per community when 'Include wiki pages' is on (0-200).",
            "default": 20
          },
          "includeWeeklyStats": {
            "title": "Include weekly activity",
            "type": "boolean",
            "description": "Include Reddit's weekly active users and weekly contributions from the community header.",
            "default": true
          },
          "includePosts": {
            "title": "Include recent posts",
            "type": "boolean",
            "description": "Also scrape the community's recent posts, with the full filter set below.",
            "default": true
          },
          "maxPosts": {
            "title": "Maximum posts per subreddit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum posts to collect per subreddit (1-1,000). The global 'Maximum records' cap still applies.",
            "default": 25
          },
          "sort": {
            "title": "Sort posts by",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial",
              "best"
            ],
            "type": "string",
            "description": "How to order the post feed.",
            "default": "hot"
          },
          "timeFilter": {
            "title": "Time window for top/controversial",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window used when sorting posts by top or controversial.",
            "default": "day"
          },
          "includeNSFW": {
            "title": "Include NSFW (18+) posts",
            "type": "boolean",
            "description": "Keep posts marked NSFW. NSFW-only communities are gated for signed-out visitors and return nothing regardless of this setting.",
            "default": false
          },
          "onlyWithFlair": {
            "title": "Only posts with a flair",
            "type": "boolean",
            "description": "Drop posts that have no flair tag.",
            "default": false
          },
          "postType": {
            "title": "Only this post type",
            "enum": [
              "self",
              "link",
              "image",
              "video",
              "gallery",
              "poll"
            ],
            "type": "string",
            "description": "Keep only one content type. Leave unset to keep all types."
          },
          "minScore": {
            "title": "Minimum score",
            "minimum": -1000000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep posts with a score (upvotes minus downvotes) at or above this value. Leave unset to keep all scores."
          },
          "maxScore": {
            "title": "Maximum score",
            "minimum": -1000000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep posts with a score at or below this value. Useful for finding overlooked posts. Leave unset to keep all scores."
          },
          "minComments": {
            "title": "Minimum number of comments",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep posts with at least this many comments. Leave unset to keep all posts."
          },
          "maxComments": {
            "title": "Maximum number of comments",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep posts with at most this many comments. Leave unset to keep all posts."
          },
          "excludeStickied": {
            "title": "Exclude stickied posts",
            "type": "boolean",
            "description": "Drop posts pinned by moderators (rules, weekly threads, announcements).",
            "default": false
          },
          "minUpvoteRatio": {
            "title": "Minimum upvote ratio",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Keep posts whose upvote ratio (0-1) is at or above this value. Leave unset to keep all ratios."
          },
          "excludeRemoved": {
            "title": "Exclude removed/deleted posts",
            "type": "boolean",
            "description": "Drop posts removed by a moderator or Reddit. Deleted post markers are only visible on post detail pages.",
            "default": false
          },
          "excludeCrossposts": {
            "title": "Exclude crossposts",
            "type": "boolean",
            "description": "Drop crossposts from another community, keeping original submissions.",
            "default": false
          },
          "excludeSpoilers": {
            "title": "Exclude spoiler-tagged posts",
            "type": "boolean",
            "description": "Drop posts marked as a spoiler by their author.",
            "default": false
          },
          "excludeLocked": {
            "title": "Exclude locked posts",
            "type": "boolean",
            "description": "Drop posts whose comments were locked by a moderator.",
            "default": false
          },
          "excludeDeletedAuthor": {
            "title": "Exclude deleted authors",
            "type": "boolean",
            "description": "Drop posts whose author appears as [deleted] or [removed].",
            "default": false
          },
          "onlyOriginalContent": {
            "title": "Only original content (OC)",
            "type": "boolean",
            "description": "Keep only posts the author tagged as original content.",
            "default": false
          },
          "minAwards": {
            "title": "Minimum awards",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep posts with at least this many total awards. Leave unset to keep all posts."
          },
          "titleContains": {
            "title": "Title contains",
            "type": "string",
            "description": "Keep posts whose title contains this text (case-insensitive). Leave empty to keep all titles."
          },
          "contentContains": {
            "title": "Post text contains",
            "type": "string",
            "description": "Keep self posts whose body contains this text (case-insensitive). Requires 'Fetch full post details' so post bodies are available; link/image posts are excluded."
          },
          "flairContains": {
            "title": "Flair contains",
            "type": "string",
            "description": "Keep posts whose flair text contains this text (case-insensitive). Leave empty to keep all flairs."
          },
          "authorFlairContains": {
            "title": "Author flair contains",
            "type": "string",
            "description": "Keep posts whose author flair text contains this text (case-insensitive)."
          },
          "authors": {
            "title": "Only these authors",
            "type": "array",
            "description": "Keep posts submitted by one of these usernames (bare or u/-prefixed, case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "domain": {
            "title": "Domain contains",
            "type": "string",
            "description": "Keep posts whose link domain contains this text (case-insensitive), e.g. youtube.com or self.python."
          },
          "distinguished": {
            "title": "Official posts only",
            "enum": [
              "moderator",
              "admin",
              "special",
              "none"
            ],
            "type": "string",
            "description": "Keep posts distinguished by Reddit as moderator, admin or special, or keep only regular posts. Leave unset to keep all."
          },
          "postedAfter": {
            "title": "Created on or after",
            "type": "string",
            "description": "Keep posts created on or after this date (UTC). When set, the post feed is walked from newest first."
          },
          "postedBefore": {
            "title": "Created on or before",
            "type": "string",
            "description": "Keep posts created on or before this date (end of day, UTC)."
          },
          "includeComments": {
            "title": "Include comments for collected posts",
            "type": "boolean",
            "description": "Fetch capped comment trees for every post collected in communities or posts mode. In comments mode this is always on.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop collecting a thread after this many comments (1-10,000). The global 'Maximum records' cap still applies.",
            "default": 25
          },
          "commentSort": {
            "title": "Sort comments by",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old"
            ],
            "type": "string",
            "description": "How Reddit orders the comment tree. 'Confidence' is Reddit's default best-first order; the other four are the verified alternate sorts.",
            "default": "confidence"
          },
          "maxCommentDepth": {
            "title": "Maximum comment depth",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep comments up to this nesting depth. 0 keeps top-level comments only; each extra level adds replies (0-100).",
            "default": 3
          },
          "includePostDetails": {
            "title": "Fetch full post details",
            "type": "boolean",
            "description": "Open each collected post page to fill body, media and detail-only flags. In comments mode this also saves the parent post record. Slower: one extra page per post.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on all records pushed by the run (communities, posts and comments together). The run stops cleanly when it is reached.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}