{
  "description": "Search Bilibili videos by keyword, resolve video URLs or IDs, read the popular feed, or pull partition, rookie, origin, and weekly ranking charts. Public metadata only; no login or cookies required.",
  "properties": {
    "duration": {
      "default": "all",
      "description": "Keep only videos in this length range.",
      "editor": "select",
      "enum": [
        "all",
        "short",
        "medium",
        "long",
        "verylong"
      ],
      "enumTitles": [
        "All lengths",
        "Under 10 minutes",
        "10-30 minutes",
        "30-60 minutes",
        "Over 60 minutes"
      ],
      "prefill": "all",
      "title": "Duration filter (mode=search)",
      "type": "string"
    },
    "enrichDetails": {
      "default": false,
      "description": "Add one detail request per unique video in search, popular, and ranking modes to fill tags, coin/share counts, cid, parts, resolution, and uploader followers. Usually adds 3-10 seconds per video, depending on Bilibili latency. byVideoUrl lookups are always enriched.",
      "prefill": false,
      "title": "Enrich with video details",
      "type": "boolean"
    },
    "maxItems": {
      "default": 20,
      "description": "Hard cap on emitted video records. Error records do not count toward it.",
      "maximum": 1000,
      "minimum": 1,
      "prefill": 3,
      "title": "Max videos",
      "type": "integer"
    },
    "mode": {
      "default": "search",
      "description": "What to collect.",
      "editor": "select",
      "enum": [
        "search",
        "byVideoUrl",
        "popular",
        "ranking"
      ],
      "enumTitles": [
        "Search videos by keyword",
        "Fetch videos by URL / BV / AV / b23.tv",
        "Popular feed",
        "Ranking chart"
      ],
      "prefill": "search",
      "title": "Mode",
      "type": "string"
    },
    "partition": {
      "default": "0",
      "description": "Search partition filter (mode=search) or ranking chart (mode=ranking). Ignored for weekly charts.",
      "editor": "select",
      "enum": [
        "0",
        "1",
        "3",
        "4",
        "5",
        "36",
        "119",
        "129",
        "155",
        "160",
        "181",
        "188",
        "211",
        "217",
        "223"
      ],
      "enumTitles": [
        "All (全站)",
        "Anime (动画)",
        "Music (音乐)",
        "Game (游戏)",
        "Entertainment (娱乐)",
        "Knowledge (知识)",
        "Guichu (鬼畜)",
        "Dance (舞蹈)",
        "Fashion (时尚)",
        "Life (生活)",
        "Movie (影视)",
        "Digital (数码)",
        "Food (美食)",
        "Animal (动物圈)",
        "Car (汽车)"
      ],
      "prefill": "0",
      "title": "Partition",
      "type": "string"
    },
    "proxyConfiguration": {
      "description": "Optional. The actor starts direct and retries through fresh and anonymous browser sessions; this proxy is used only as the final escalation stage.",
      "editor": "proxy",
      "title": "Proxy configuration (optional)",
      "type": "object"
    },
    "publishedAfter": {
      "description": "Only videos published on or after this date, `YYYY-MM-DD` (mode=search). Can be used alone.",
      "editor": "datepicker",
      "title": "Published after (UTC)",
      "type": "string"
    },
    "publishedBefore": {
      "description": "Only videos published on or before this date, `YYYY-MM-DD` (mode=search). Can be used alone.",
      "editor": "datepicker",
      "title": "Published before (UTC)",
      "type": "string"
    },
    "rankingType": {
      "default": "all",
      "description": "All-time, originals-only, rookie, or the weekly series.",
      "editor": "select",
      "enum": [
        "all",
        "origin",
        "rookie",
        "weekly"
      ],
      "enumTitles": [
        "All-time chart",
        "Originals only",
        "Rookie chart",
        "Weekly series"
      ],
      "prefill": "all",
      "title": "Ranking type (mode=ranking)",
      "type": "string"
    },
    "searchQueries": {
      "default": [],
      "description": "One keyword per entry, e.g. `python`, `原神`, `Genshin`. Provide Chinese and English aliases explicitly; Bilibili does not translate them.",
      "editor": "stringList",
      "maxItems": 10,
      "prefill": [
        "python"
      ],
      "title": "Search queries / aliases (mode=search)",
      "type": "array"
    },
    "sort": {
      "default": "totalrank",
      "description": "Result ordering. `dm` is most danmaku and `scores` is most comments.",
      "editor": "select",
      "enum": [
        "totalrank",
        "click",
        "pubdate",
        "dm",
        "stow",
        "scores"
      ],
      "enumTitles": [
        "Relevance (default)",
        "Most viewed",
        "Newest",
        "Most danmaku",
        "Most favorites",
        "Most comments"
      ],
      "prefill": "totalrank",
      "title": "Search sort (mode=search)",
      "type": "string"
    },
    "videoUrls": {
      "default": [],
      "description": "Accepts https://www.bilibili.com/video/BV..., https://b23.tv/... short links, bare BV IDs, av123... IDs, or numeric aids.",
      "editor": "stringList",
      "maxItems": 1000,
      "prefill": [],
      "title": "Video URLs or IDs (mode=byVideoUrl)",
      "type": "array"
    },
    "weekNumber": {
      "description": "Specific weekly issue. Omit to use the latest issue.",
      "maximum": 10000,
      "minimum": 1,
      "title": "Weekly issue number (mode=ranking)",
      "type": "integer"
    }
  },
  "required": [
    "mode"
  ],
  "schemaVersion": 1,
  "title": "Bilibili Video Search, Ranking & Metadata Scraper Input",
  "type": "object"
}
