{
  "description": "Choose what to collect from Hacker News: live feeds, historical front pages, search results, specific items or users, or the monthly Who is hiring? threads.",
  "properties": {
    "author": {
      "description": "Only return content written by this Hacker News username.",
      "editor": "textfield",
      "title": "Author (mode=search)",
      "type": "string"
    },
    "commentAuthorFilter": {
      "default": [],
      "description": "Only keep comments written by these usernames. Matching is case-insensitive and accepts partial names.",
      "editor": "stringList",
      "prefill": [],
      "title": "Comment author filter",
      "type": "array"
    },
    "commentSort": {
      "default": "rank",
      "description": "`rank` keeps Hacker News display order. `newest` orders sibling replies newest first.",
      "editor": "select",
      "enum": [
        "rank",
        "newest"
      ],
      "enumTitles": [
        "Hacker News rank",
        "Newest first"
      ],
      "prefill": "rank",
      "title": "Comment order",
      "type": "string"
    },
    "contentTypes": {
      "default": [
        "story"
      ],
      "description": "Which Hacker News record types search should return. Selecting several types returns any of them. `front_page` covers only the current front page.",
      "editor": "select",
      "items": {
        "enum": [
          "story",
          "comment",
          "poll",
          "pollopt",
          "job",
          "show_hn",
          "ask_hn",
          "front_page"
        ],
        "enumTitles": [
          "Stories",
          "Comments",
          "Polls",
          "Poll options",
          "Jobs",
          "Show HN",
          "Ask HN",
          "Current front page"
        ],
        "type": "string"
      },
      "prefill": [
        "story"
      ],
      "title": "Search content types",
      "type": "array"
    },
    "dateRangeFrom": {
      "description": "Drop items posted before this date (UTC, `YYYY-MM-DD`). Empty means no lower bound.",
      "editor": "textfield",
      "title": "Date range from",
      "type": "string"
    },
    "dateRangeTo": {
      "description": "Drop items posted after this date (UTC, `YYYY-MM-DD`). Empty means no upper bound.",
      "editor": "textfield",
      "title": "Date range to",
      "type": "string"
    },
    "domainAllowlist": {
      "default": [],
      "description": "Keep only stories whose link host contains one of these text fragments. For example, `github.com` or `arxiv.org`.",
      "editor": "stringList",
      "prefill": [],
      "title": "Domain allowlist",
      "type": "array"
    },
    "domainBlocklist": {
      "default": [],
      "description": "Drop stories whose link host contains one of these text fragments. For example, `twitter.com` or `x.com`.",
      "editor": "stringList",
      "prefill": [],
      "title": "Domain blocklist",
      "type": "array"
    },
    "enableCommentHierarchy": {
      "default": false,
      "description": "When true, each story carries a nested `comments` tree. When false, comments are separate rows and never contain duplicate reply rows.",
      "prefill": false,
      "title": "Nest comment replies",
      "type": "boolean"
    },
    "excludeDeadOrDeleted": {
      "default": true,
      "description": "Drop items marked dead or deleted by Hacker News. Turning this off uses the slower exact comment path so those records can be included.",
      "prefill": true,
      "title": "Exclude dead or deleted content",
      "type": "boolean"
    },
    "exhaustiveSearch": {
      "default": false,
      "description": "Hacker News search exposes at most 1,000 hits per query. When enabled, the actor splits the requested date range into smaller windows so deeper result sets can be collected. Relevance order then follows each date window rather than one global ranking.",
      "prefill": false,
      "title": "Search past 1,000 results",
      "type": "boolean"
    },
    "frontPageDate": {
      "description": "Historical day to read in mode `frontPage`, as `YYYY-MM-DD`. Empty uses yesterday (UTC).",
      "editor": "textfield",
      "title": "Front page date",
      "type": "string"
    },
    "hiringKeywords": {
      "default": [],
      "description": "Keep only job posts whose text, company, role, location, or tech stack contains one of these terms.",
      "editor": "stringList",
      "prefill": [],
      "title": "Hiring keywords",
      "type": "array"
    },
    "hiringMonths": {
      "default": 1,
      "description": "How many recent monthly Who is hiring? threads to parse. Ignored when specific thread IDs are supplied.",
      "maximum": 12,
      "minimum": 1,
      "prefill": 1,
      "title": "Hiring months",
      "type": "integer"
    },
    "hiringThreadIds": {
      "default": [],
      "description": "Specific Who is hiring? thread IDs to parse. Overrides the automatic monthly selection.",
      "editor": "stringList",
      "prefill": [],
      "title": "Hiring thread IDs",
      "type": "array"
    },
    "includeAuthorProfiles": {
      "default": false,
      "description": "Add `authorKarma` and `authorCreatedAt` to stories and comments. This costs one extra lookup per unique author.",
      "prefill": false,
      "title": "Add author karma",
      "type": "boolean"
    },
    "includeSubmissions": {
      "default": false,
      "description": "For mode `user`, also emit the user's recent stories and comments as normal records after the profile.",
      "prefill": false,
      "title": "Include user submissions",
      "type": "boolean"
    },
    "itemIds": {
      "default": [],
      "description": "Hacker News item IDs to look up, as numbers or numeric strings. Stories, comments, jobs, polls, and poll options are all accepted.",
      "editor": "stringList",
      "prefill": [],
      "title": "Item IDs (mode=item)",
      "type": "array"
    },
    "maxComments": {
      "default": 0,
      "description": "How many comments to collect for each story. 0 skips comment collection. This is applied after a story passes your filters.",
      "maximum": 5000,
      "minimum": 0,
      "prefill": 0,
      "title": "Comments per story",
      "type": "integer"
    },
    "maxDepth": {
      "default": 5,
      "description": "Deepest reply level to keep when comments are collected. Root comments are depth 0.",
      "maximum": 20,
      "minimum": 0,
      "prefill": 5,
      "title": "Maximum reply depth",
      "type": "integer"
    },
    "maxItems": {
      "default": 50,
      "description": "Hard cap on emitted records across all types. Nested comments also count toward this cap.",
      "maximum": 5000,
      "minimum": 1,
      "prefill": 20,
      "title": "Maximum records",
      "type": "integer"
    },
    "minCommentCount": {
      "description": "Drop stories and polls with fewer than this many comments.",
      "maximum": 1000000,
      "minimum": 0,
      "title": "Minimum comment count",
      "type": "integer"
    },
    "minScore": {
      "description": "Drop stories, jobs, and polls below this point score. Comments are unaffected because Hacker News does not publish comment scores.",
      "maximum": 1000000,
      "minimum": 0,
      "title": "Minimum points",
      "type": "integer"
    },
    "mode": {
      "default": "topStories",
      "description": "What to scrape. Feeds walk the live Hacker News lists. `item` looks up specific IDs, `user` loads profiles, `search` queries Hacker News history, `frontPage` reads a historical day, and `whoIsHiring` parses monthly hiring threads.",
      "editor": "select",
      "enum": [
        "topStories",
        "newStories",
        "bestStories",
        "askStories",
        "showStories",
        "jobStories",
        "item",
        "user",
        "search",
        "frontPage",
        "whoIsHiring"
      ],
      "enumTitles": [
        "Top stories",
        "New stories",
        "Best stories",
        "Ask HN",
        "Show HN",
        "Jobs",
        "Items by ID",
        "User profiles",
        "Search",
        "Historical front page",
        "Who is hiring?"
      ],
      "prefill": "topStories",
      "title": "Mode",
      "type": "string"
    },
    "remoteOnly": {
      "default": false,
      "description": "Keep only hiring posts that explicitly mention remote work.",
      "prefill": false,
      "title": "Remote jobs only",
      "type": "boolean"
    },
    "searchQueries": {
      "default": [],
      "description": "One or more keyword queries. Every query runs independently and the results are merged without duplicates. Leave empty to browse by tags, author, or story instead.",
      "editor": "stringList",
      "prefill": [],
      "title": "Search queries (mode=search)",
      "type": "array"
    },
    "searchSort": {
      "default": "relevance",
      "description": "`relevance` ranks by keyword match. `date` returns newest first and is more reproducible.",
      "editor": "select",
      "enum": [
        "relevance",
        "date"
      ],
      "enumTitles": [
        "Most relevant",
        "Newest first"
      ],
      "prefill": "relevance",
      "title": "Search order",
      "type": "string"
    },
    "startUrls": {
      "default": [],
      "description": "Hacker News links to read directly: item, user, historical front-page, and hiring-thread URLs. IDs and URLs are merged with the mode-specific lists.",
      "editor": "stringList",
      "prefill": [],
      "title": "Start URLs",
      "type": "array"
    },
    "storyId": {
      "description": "Only return content attached to this story ID. Useful with `contentTypes` set to `comment` to search inside one thread.",
      "editor": "textfield",
      "title": "Story ID (mode=search)",
      "type": "string"
    },
    "submissionTypes": {
      "default": "all",
      "description": "Which submissions to emit when `includeSubmissions` is enabled.",
      "editor": "select",
      "enum": [
        "all",
        "story",
        "comment"
      ],
      "enumTitles": [
        "Stories and comments",
        "Stories only",
        "Comments only"
      ],
      "prefill": "all",
      "title": "User submission types",
      "type": "string"
    },
    "usernames": {
      "default": [],
      "description": "Hacker News usernames whose profiles and, optionally, submissions you want.",
      "editor": "stringList",
      "prefill": [],
      "title": "Usernames (mode=user)",
      "type": "array"
    }
  },
  "required": [
    "mode"
  ],
  "schemaVersion": 1,
  "title": "Hacker News Scraper Input",
  "type": "object"
}
