{
  "description": "Pick a mode, then set its targets. Live records come from Reddit's rendered web pages; deep comment trees and bulk history can fall back to the Arctic Shift archive.",
  "properties": {
    "authorFlairContains": {
      "description": "Keep only posts whose author flair contains this text.",
      "editor": "textfield",
      "title": "Author flair contains",
      "type": "string"
    },
    "authors": {
      "default": [],
      "description": "Keep posts by these usernames.",
      "editor": "stringList",
      "prefill": [],
      "title": "Only these authors",
      "type": "array"
    },
    "commentSort": {
      "default": "confidence",
      "description": "Comment ordering for mode=post.",
      "editor": "select",
      "enum": [
        "confidence",
        "top",
        "new",
        "controversial",
        "old",
        "qa"
      ],
      "enumTitles": [
        "Best (confidence)",
        "Top",
        "New",
        "Controversial",
        "Old",
        "Q&A"
      ],
      "prefill": "confidence",
      "title": "Comment sort",
      "type": "string"
    },
    "contentContains": {
      "description": "Keep only posts whose body/self-text contains this text.",
      "editor": "textfield",
      "title": "Body contains",
      "type": "string"
    },
    "distinguished": {
      "description": "Keep only moderator/admin/special posts, or only regular posts.",
      "editor": "select",
      "enum": [
        "moderator",
        "admin",
        "special",
        "none"
      ],
      "enumTitles": [
        "Moderator posts",
        "Admin posts",
        "Special/official posts",
        "Regular posts only"
      ],
      "title": "Distinguished posts",
      "type": "string"
    },
    "domain": {
      "description": "Keep only posts whose link domain contains this text.",
      "editor": "textfield",
      "title": "Link domain contains",
      "type": "string"
    },
    "excludeArchived": {
      "default": false,
      "description": "Exclude archived posts that no longer accept votes or comments.",
      "prefill": false,
      "title": "Exclude archived posts",
      "type": "boolean"
    },
    "excludeAuthors": {
      "default": [],
      "description": "Drop posts by these usernames.",
      "editor": "stringList",
      "prefill": [],
      "title": "Exclude these authors",
      "type": "array"
    },
    "excludeCrossposts": {
      "default": false,
      "description": "Exclude crossposts.",
      "prefill": false,
      "title": "Exclude crossposts",
      "type": "boolean"
    },
    "excludeDeletedAuthor": {
      "default": false,
      "description": "Exclude records whose author account was deleted.",
      "prefill": false,
      "title": "Exclude deleted authors",
      "type": "boolean"
    },
    "excludeKeywords": {
      "default": [],
      "description": "Drop posts whose title, body or flair contains any of these terms.",
      "editor": "stringList",
      "prefill": [],
      "title": "Exclude keywords",
      "type": "array"
    },
    "excludeLocked": {
      "default": false,
      "description": "Exclude locked posts and comments.",
      "prefill": false,
      "title": "Exclude locked posts",
      "type": "boolean"
    },
    "excludeRemoved": {
      "default": false,
      "description": "Exclude posts or comments removed by moderators.",
      "prefill": false,
      "title": "Exclude removed posts",
      "type": "boolean"
    },
    "excludeSpoilers": {
      "default": false,
      "description": "Exclude posts marked as spoilers.",
      "prefill": false,
      "title": "Exclude spoilers",
      "type": "boolean"
    },
    "excludeStickied": {
      "default": false,
      "description": "Exclude pinned/stickied posts from results.",
      "prefill": false,
      "title": "Exclude stickied posts",
      "type": "boolean"
    },
    "failOnEmpty": {
      "default": true,
      "description": "Mark the run FAILED with a clear status message instead of finishing silently with 0 records.",
      "prefill": false,
      "title": "Fail when no records are found",
      "type": "boolean"
    },
    "flairContains": {
      "description": "Keep only posts whose link flair contains this text.",
      "editor": "textfield",
      "title": "Flair contains",
      "type": "string"
    },
    "includeComments": {
      "default": true,
      "description": "Emit comment records for each post. Disable to fetch only the parent post.",
      "prefill": false,
      "title": "Include comments (mode=post)",
      "type": "boolean"
    },
    "includeNSFW": {
      "default": false,
      "description": "Include over-18 posts and communities.",
      "prefill": false,
      "title": "Include NSFW (18+) posts",
      "type": "boolean"
    },
    "includePost": {
      "default": true,
      "description": "Emit the post record before its comments.",
      "prefill": true,
      "title": "Include parent post (mode=post)",
      "type": "boolean"
    },
    "includeProfileInfo": {
      "default": true,
      "description": "Emit a profile record with karma, counts and account metadata.",
      "prefill": true,
      "title": "Include profile record (mode=profile)",
      "type": "boolean"
    },
    "includeSubredditInfo": {
      "default": false,
      "description": "Emit one community record per subreddit before its posts.",
      "prefill": false,
      "title": "Include community info (mode=subreddit)",
      "type": "boolean"
    },
    "includeSubredditRules": {
      "default": false,
      "description": "Attach posting rules to the community record. Requires includeSubredditInfo.",
      "prefill": false,
      "title": "Include community rules (mode=subreddit)",
      "type": "boolean"
    },
    "keyword": {
      "description": "Only keep profile posts/comments whose title, body or text contains this phrase.",
      "editor": "textfield",
      "title": "Profile keyword filter",
      "type": "string"
    },
    "maxComments": {
      "default": 100,
      "description": "Comments per post, keyword, or profile comment section. 0 disables comment records.",
      "maximum": 100000,
      "minimum": 0,
      "prefill": 5,
      "title": "Maximum comments",
      "type": "integer"
    },
    "maxCommunities": {
      "default": 10,
      "description": "Maximum subreddit matches per search query.",
      "maximum": 1000,
      "minimum": 0,
      "prefill": 0,
      "title": "Maximum community results",
      "type": "integer"
    },
    "maxCommunitySubscribers": {
      "description": "Community search only: drop larger subreddits.",
      "maximum": 1000000000,
      "minimum": 0,
      "title": "Maximum community subscribers",
      "type": "integer"
    },
    "maxContentLength": {
      "description": "Keep only posts whose body is at most this many characters.",
      "maximum": 1000000,
      "minimum": 0,
      "title": "Maximum body length",
      "type": "integer"
    },
    "maxDepth": {
      "default": 6,
      "description": "Deepest reply level to emit (0 = top-level comments only).",
      "maximum": 20,
      "minimum": 0,
      "prefill": 6,
      "title": "Maximum comment depth",
      "type": "integer"
    },
    "maxItems": {
      "default": 50,
      "description": "Hard cap on all records pushed by the run, across every target.",
      "maximum": 10000,
      "minimum": 1,
      "prefill": 2,
      "title": "Maximum total records",
      "type": "integer"
    },
    "maxPostComments": {
      "description": "Drop posts with more comments than this.",
      "maximum": 1000000,
      "minimum": 0,
      "title": "Maximum post comment count",
      "type": "integer"
    },
    "maxPosts": {
      "default": 25,
      "description": "Posts per subreddit, keyword or profile section.",
      "maximum": 5000,
      "minimum": 1,
      "prefill": 2,
      "title": "Maximum posts per target",
      "type": "integer"
    },
    "maxProxyBytesMb": {
      "default": 50,
      "description": "Safety ceiling for paid proxy traffic. The run stops when the ceiling is reached. Images, media and fonts are never downloaded.",
      "maximum": 10000,
      "minimum": 0,
      "prefill": 50,
      "title": "Maximum proxy traffic (MB)",
      "type": "integer"
    },
    "maxScore": {
      "description": "Drop posts/comments above this score.",
      "maximum": 1000000,
      "minimum": -1000000,
      "title": "Maximum score",
      "type": "integer"
    },
    "maxUserKarma": {
      "description": "User search only: drop accounts with more total karma.",
      "maximum": 1000000000,
      "minimum": 0,
      "title": "Maximum user karma",
      "type": "integer"
    },
    "maxUsers": {
      "default": 25,
      "description": "Maximum account matches per search query.",
      "maximum": 100,
      "minimum": 0,
      "prefill": 0,
      "title": "Maximum user results",
      "type": "integer"
    },
    "minAwards": {
      "description": "Keep only posts with at least this many awards.",
      "maximum": 1000000,
      "minimum": 0,
      "title": "Minimum awards",
      "type": "integer"
    },
    "minCommunitySubscribers": {
      "description": "Community search only: drop smaller subreddits.",
      "maximum": 1000000000,
      "minimum": 0,
      "title": "Minimum community subscribers",
      "type": "integer"
    },
    "minContentLength": {
      "description": "Keep only posts whose body is at least this many characters.",
      "maximum": 1000000,
      "minimum": 0,
      "title": "Minimum body length",
      "type": "integer"
    },
    "minPostComments": {
      "description": "Drop posts with fewer comments than this.",
      "maximum": 1000000,
      "minimum": 0,
      "title": "Minimum post comment count",
      "type": "integer"
    },
    "minScore": {
      "description": "Drop posts/comments below this score.",
      "maximum": 1000000,
      "minimum": -1000000,
      "title": "Minimum score",
      "type": "integer"
    },
    "minUpvoteRatio": {
      "description": "Drop posts below this upvote ratio (0-1).",
      "maximum": 1,
      "minimum": 0,
      "title": "Minimum upvote ratio",
      "type": "number"
    },
    "minUserKarma": {
      "description": "User search only: drop accounts with less total karma.",
      "maximum": 1000000000,
      "minimum": 0,
      "title": "Minimum user karma",
      "type": "integer"
    },
    "mode": {
      "default": "subreddit",
      "description": "What to scrape: a subreddit listing, post URLs with comments, a user profile, or keyword search.",
      "editor": "select",
      "enum": [
        "subreddit",
        "post",
        "profile",
        "search"
      ],
      "enumTitles": [
        "Subreddit posts",
        "Post URLs + comments",
        "User profile + history",
        "Keyword search"
      ],
      "prefill": "subreddit",
      "title": "Mode",
      "type": "string"
    },
    "onlyNew": {
      "default": false,
      "description": "Emit only records newer than the watermark saved under stateKey by a previous run.",
      "prefill": false,
      "title": "Only new records (incremental runs)",
      "type": "boolean"
    },
    "onlyOriginalContent": {
      "default": false,
      "description": "Keep only posts tagged as OC.",
      "prefill": false,
      "title": "Only original content",
      "type": "boolean"
    },
    "onlyWithFlair": {
      "default": false,
      "description": "Drop posts without a link flair.",
      "prefill": false,
      "title": "Only posts with flair",
      "type": "boolean"
    },
    "postType": {
      "description": "Keep only posts of this type.",
      "editor": "select",
      "enum": [
        "self",
        "link",
        "image",
        "video",
        "gallery",
        "poll"
      ],
      "enumTitles": [
        "Text (self)",
        "Link",
        "Image",
        "Video",
        "Gallery",
        "Poll"
      ],
      "title": "Post type",
      "type": "string"
    },
    "postUrls": {
      "default": [],
      "description": "Post URLs, comment URLs, share links or bare post IDs (mode=post).",
      "editor": "stringList",
      "example": [
        "https://www.reddit.com/r/programming/comments/1vqukkf/",
        "1xbw0h8"
      ],
      "prefill": [],
      "title": "Post URLs or IDs",
      "type": "array"
    },
    "postedAfter": {
      "description": "UTC date lower bound (YYYY-MM-DD).",
      "editor": "datepicker",
      "title": "Created on or after",
      "type": "string"
    },
    "postedBefore": {
      "description": "UTC date upper bound (YYYY-MM-DD), inclusive.",
      "editor": "datepicker",
      "title": "Created on or before",
      "type": "string"
    },
    "proxyMode": {
      "default": "none",
      "description": "Direct (no proxy) is the default. Choose datacenter if Reddit blocks your runs. Residential is an explicit last resort and is capped by maxProxyBytesMb.",
      "editor": "select",
      "enum": [
        "none",
        "datacenter",
        "residential"
      ],
      "enumTitles": [
        "Direct / no proxy",
        "Datacenter proxy",
        "Residential proxy (explicit fallback)"
      ],
      "prefill": "none",
      "title": "Connection",
      "type": "string"
    },
    "restrictSubreddits": {
      "default": [],
      "description": "Only keep profile posts/comments made in these subreddits.",
      "editor": "stringList",
      "prefill": [],
      "title": "Restrict profile history to subreddits",
      "type": "array"
    },
    "searchComments": {
      "default": false,
      "description": "Include comment results in keyword search when Reddit's comment tab returns them.",
      "prefill": false,
      "title": "Search comments (mode=search)",
      "type": "boolean"
    },
    "searchCommunities": {
      "default": false,
      "description": "Include subreddit matches in keyword search.",
      "prefill": false,
      "title": "Search communities (mode=search)",
      "type": "boolean"
    },
    "searchPosts": {
      "default": true,
      "description": "Include post results in keyword search.",
      "prefill": true,
      "title": "Search posts (mode=search)",
      "type": "boolean"
    },
    "searchQuery": {
      "default": "",
      "description": "Keyword or phrase to search for (mode=search). Reddit search syntax such as \"exact phrase\", author:name, subreddit:name and -exclude is supported by live search.",
      "editor": "textfield",
      "example": "asyncio",
      "prefill": "",
      "title": "Search query",
      "type": "string"
    },
    "searchUsers": {
      "default": false,
      "description": "Include matching Reddit accounts in keyword search.",
      "prefill": false,
      "title": "Search users (mode=search)",
      "type": "boolean"
    },
    "sections": {
      "default": [
        "overview"
      ],
      "description": "Which history sections to fetch (mode=profile). Allowed values: overview, posts, comments.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [
        "posts"
      ],
      "title": "Profile sections",
      "type": "array"
    },
    "sort": {
      "default": "hot",
      "description": "Post/listing sort. Search accepts relevance, hot, top, new or comments; other modes use hot, new, top, rising, controversial or best.",
      "editor": "select",
      "enum": [
        "hot",
        "new",
        "top",
        "rising",
        "controversial",
        "best",
        "relevance",
        "comments"
      ],
      "enumTitles": [
        "Hot",
        "New",
        "Top",
        "Rising",
        "Controversial",
        "Best",
        "Relevance (search)",
        "Most comments (search)"
      ],
      "prefill": "hot",
      "title": "Sort",
      "type": "string"
    },
    "source": {
      "default": "auto",
      "description": "auto uses live Reddit first and the Arctic Shift archive for depth/bulk or as a fallback. archive is faster and cheaper but lags live Reddit by several hours; live never uses archive data.",
      "editor": "select",
      "enum": [
        "auto",
        "live",
        "archive"
      ],
      "enumTitles": [
        "Auto (live + archive fallback)",
        "Live only",
        "Archive only (Arctic Shift)"
      ],
      "prefill": "archive",
      "title": "Data source",
      "type": "string"
    },
    "stateKey": {
      "default": "reddit-mcp-state",
      "description": "Key-value store key prefix used by onlyNew watermarks.",
      "editor": "textfield",
      "prefill": "reddit-mcp-state",
      "title": "Incremental state key",
      "type": "string"
    },
    "subreddits": {
      "default": [
        "programming"
      ],
      "description": "Subreddits to scrape (mode=subreddit). Accepts names, r/ names or URLs.",
      "editor": "stringList",
      "example": [
        "programming",
        "r/Python"
      ],
      "prefill": [
        "programming"
      ],
      "title": "Subreddits",
      "type": "array"
    },
    "timeFilter": {
      "default": "day",
      "description": "Time window for top/controversial sorts and search.",
      "editor": "select",
      "enum": [
        "hour",
        "day",
        "week",
        "month",
        "year",
        "all"
      ],
      "enumTitles": [
        "Past hour",
        "Past day",
        "Past week",
        "Past month",
        "Past year",
        "All time"
      ],
      "prefill": "day",
      "title": "Time filter",
      "type": "string"
    },
    "titleContains": {
      "description": "Keep only posts whose title contains this text.",
      "editor": "textfield",
      "title": "Title contains",
      "type": "string"
    },
    "usernames": {
      "default": [],
      "description": "Reddit usernames to scrape (mode=profile). Accepts names, u/ names or profile URLs.",
      "editor": "stringList",
      "example": [
        "spez"
      ],
      "prefill": [],
      "title": "Usernames",
      "type": "array"
    },
    "withinCommunity": {
      "description": "Limit post/comment search to a single subreddit (name, r/name or URL). Required for archive keyword search.",
      "editor": "textfield",
      "example": "r/technology",
      "title": "Restrict search to one community",
      "type": "string"
    }
  },
  "required": [
    "mode"
  ],
  "schemaVersion": 1,
  "title": "Reddit Multi-Mode Scraper Input",
  "type": "object"
}
