{
  "data": {
    "id": "ZsdGtcAjKAaeE8fhO",
    "actId": "f6Gftf5vOWMMfxpe1",
    "userId": "IYgBDiXtHOijAaUel",
    "startedAt": "2026-10-24T15:51:22.511Z",
    "finishedAt": "2026-10-24T15:52:01.905Z",
    "status": "SUCCEEDED",
    "meta": {
      "origin": "CLI"
    },
    "stats": {
      "durationMillis": 39266,
      "runTimeSecs": 39.266,
      "computeUnits": 0.04362888888888889,
      "imageSizeBytes": 3139430400
    },
    "options": {
      "useCache": true,
      "betaPackages": false,
      "memoryMbytes": 4096,
      "diskMbytes": 8192
    },
    "createdByOrganizationMemberUserId": "QYo53EZkJk0prePWY",
    "exitCode": 0,
    "inputSchema": "{\n  \"title\": \"Bilibili Video Search, Ranking & Metadata Scraper Input\",\n  \"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.\",\n  \"type\": \"object\",\n  \"schemaVersion\": 1,\n  \"properties\": {\n    \"mode\": {\n      \"title\": \"Mode\",\n      \"type\": \"string\",\n      \"description\": \"What to collect.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"search\",\n        \"byVideoUrl\",\n        \"popular\",\n        \"ranking\"\n      ],\n      \"enumTitles\": [\n        \"Search videos by keyword\",\n        \"Fetch videos by URL / BV / AV / b23.tv\",\n        \"Popular feed\",\n        \"Ranking chart\"\n      ],\n      \"default\": \"search\",\n      \"prefill\": \"search\"\n    },\n    \"searchQueries\": {\n      \"title\": \"Search queries / aliases (mode=search)\",\n      \"type\": \"array\",\n      \"description\": \"One keyword per entry, e.g. `python`, `原神`, `Genshin`. Provide Chinese and English aliases explicitly; Bilibili does not translate them.\",\n      \"editor\": \"stringList\",\n      \"maxItems\": 10,\n      \"default\": [],\n      \"prefill\": [\n        \"python\"\n      ]\n    },\n    \"videoUrls\": {\n      \"title\": \"Video URLs or IDs (mode=byVideoUrl)\",\n      \"type\": \"array\",\n      \"description\": \"Accepts https://www.bilibili.com/video/BV..., https://b23.tv/... short links, bare BV IDs, av123... IDs, or numeric aids.\",\n      \"editor\": \"stringList\",\n      \"maxItems\": 1000,\n      \"default\": [],\n      \"prefill\": []\n    },\n    \"maxItems\": {\n      \"title\": \"Max videos\",\n      \"type\": \"integer\",\n      \"description\": \"Hard cap on emitted video records. Error records do not count toward it.\",\n      \"minimum\": 1,\n      \"maximum\": 1000,\n      \"default\": 20,\n      \"prefill\": 3\n    },\n    \"sort\": {\n      \"title\": \"Search sort (mode=search)\",\n      \"type\": \"string\",\n      \"description\": \"Result ordering. `dm` is most danmaku and `scores` is most comments.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"totalrank\",\n        \"click\",\n        \"pubdate\",\n        \"dm\",\n        \"stow\",\n        \"scores\"\n      ],\n      \"enumTitles\": [\n        \"Relevance (default)\",\n        \"Most viewed\",\n        \"Newest\",\n        \"Most danmaku\",\n        \"Most favorites\",\n        \"Most comments\"\n      ],\n      \"default\": \"totalrank\",\n      \"prefill\": \"totalrank\"\n    },\n    \"publishedAfter\": {\n      \"title\": \"Published after (UTC)\",\n      \"type\": \"string\",\n      \"description\": \"Only videos published on or after this date, `YYYY-MM-DD` (mode=search). Can be used alone.\",\n      \"editor\": \"datepicker\"\n    },\n    \"publishedBefore\": {\n      \"title\": \"Published before (UTC)\",\n      \"type\": \"string\",\n      \"description\": \"Only videos published on or before this date, `YYYY-MM-DD` (mode=search). Can be used alone.\",\n      \"editor\": \"datepicker\"\n    },\n    \"duration\": {\n      \"title\": \"Duration filter (mode=search)\",\n      \"type\": \"string\",\n      \"description\": \"Keep only videos in this length range.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"all\",\n        \"short\",\n        \"medium\",\n        \"long\",\n        \"verylong\"\n      ],\n      \"enumTitles\": [\n        \"All lengths\",\n        \"Under 10 minutes\",\n        \"10-30 minutes\",\n        \"30-60 minutes\",\n        \"Over 60 minutes\"\n      ],\n      \"default\": \"all\",\n      \"prefill\": \"all\"\n    },\n    \"partition\": {\n      \"title\": \"Partition\",\n      \"type\": \"string\",\n      \"description\": \"Search partition filter (mode=search) or ranking chart (mode=ranking). Ignored for weekly charts.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"0\",\n        \"1\",\n        \"3\",\n        \"4\",\n        \"5\",\n        \"36\",\n        \"119\",\n        \"129\",\n        \"155\",\n        \"160\",\n        \"181\",\n        \"188\",\n        \"211\",\n        \"217\",\n        \"223\"\n      ],\n      \"enumTitles\": [\n        \"All (全站)\",\n        \"Anime (动画)\",\n        \"Music (音乐)\",\n        \"Game (游戏)\",\n        \"Entertainment (娱乐)\",\n        \"Knowledge (知识)\",\n        \"Guichu (鬼畜)\",\n        \"Dance (舞蹈)\",\n        \"Fashion (时尚)\",\n        \"Life (生活)\",\n        \"Movie (影视)\",\n        \"Digital (数码)\",\n        \"Food (美食)\",\n        \"Animal (动物圈)\",\n        \"Car (汽车)\"\n      ],\n      \"default\": \"0\",\n      \"prefill\": \"0\"\n    },\n    \"rankingType\": {\n      \"title\": \"Ranking type (mode=ranking)\",\n      \"type\": \"string\",\n      \"description\": \"All-time, originals-only, rookie, or the weekly series.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"all\",\n        \"origin\",\n        \"rookie\",\n        \"weekly\"\n      ],\n      \"enumTitles\": [\n        \"All-time chart\",\n        \"Originals only\",\n        \"Rookie chart\",\n        \"Weekly series\"\n      ],\n      \"default\": \"all\",\n      \"prefill\": \"all\"\n    },\n    \"weekNumber\": {\n      \"title\": \"Weekly issue number (mode=ranking)\",\n      \"type\": \"integer\",\n      \"description\": \"Specific weekly issue. Omit to use the latest issue.\",\n      \"minimum\": 1,\n      \"maximum\": 10000\n    },\n    \"enrichDetails\": {\n      \"title\": \"Enrich with video details\",\n      \"type\": \"boolean\",\n      \"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.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"proxyConfiguration\": {\n      \"title\": \"Proxy configuration (optional)\",\n      \"type\": \"object\",\n      \"description\": \"Optional. The actor starts direct and retries through fresh and anonymous browser sessions; this proxy is used only as the final escalation stage.\",\n      \"editor\": \"proxy\"\n    }\n  },\n  \"required\": [\n    \"mode\"\n  ]\n}",
    "readme": "# Bilibili Video Search, Ranking & Metadata Scraper\r\n\r\nCollect public video metadata from Bilibili without an account. Search a keyword with Bilibili's own sort and filter options, resolve video links or IDs, walk the popular feed, or pull all-time, origin, rookie, and weekly ranking charts. Each row carries the identifiers, uploader, engagement counters, duration, publish time, cover, and optional detail fields such as tags, coin/share counts, parts, resolution, and uploader followers.\r\n\r\n## What this actor does\r\n\r\n- **Four modes:** `search`, `byVideoUrl`, `popular`, and `ranking` (weekly charts are a ranking type).\r\n- **Search filters:** sort by relevance, views, newest, danmaku, favorites, or comments; publication date range; duration bucket; and partition.\r\n- **Ranking coverage:** 15 partitions across all-time, originals-only, rookie, and the weekly series (one issue per run, or a specific issue number).\r\n- **Detail enrichment:** optional per-video enrichment adds tags, coin and share counts, cid, every part, resolution, uploader followers, and the full stat block. Video lookups are always enriched.\r\n- **Duplicate-safe:** repeated videos across pages or queries are emitted once, and course-ad rows without a video ID are skipped.\r\n- **Stable field names:** every mode uses the same names, and a field is omitted only when Bilibili has no real value for that video, never replaced with a placeholder.\r\n- **Empty fields are omitted:** missing values are left out instead of being returned as `null`.\r\n\r\n## Output per video\r\n\r\n- `recordType` — `\"video\"` for normal rows, `\"error\"` for error rows.\r\n- `bvid` — BV-format video ID.\r\n- `aid` — numeric AV video ID.\r\n- `cid` — main part content ID (detail, popular, ranking, weekly, and enriched rows).\r\n- `title` — video title, with search highlighting and HTML entities cleaned.\r\n- `description` — video description.\r\n- `tags[]` — video tags (search rows and enriched rows).\r\n- `typeName` — partition or category label.\r\n- `partitionId` — Bilibili category ID for the video (often a subcategory of the selected partition).\r\n- `author` — uploader display name.\r\n- `authorMid` — uploader numeric member ID.\r\n- `authorAvatar` — uploader avatar URL.\r\n- `authorFollowers` — uploader follower count (enriched rows).\r\n- `viewCount` — total views.\r\n- `likeCount` — likes.\r\n- `coinCount` — coins (enriched, popular, ranking, and weekly rows; absent on raw search rows).\r\n- `favorites` — favorites/collections.\r\n- `shareCount` — shares (enriched, popular, ranking, and weekly rows; absent on raw search rows).\r\n- `danmaku` — aggregate danmaku count.\r\n- `replyCount` — comment count.\r\n- `duration` — length in seconds.\r\n- `durationText` — length formatted as `H:MM:SS` or `M:SS`.\r\n- `publishTime` — publish time in UTC ISO format.\r\n- `publishDate` — publish date in `YYYY-MM-DD` (UTC).\r\n- `coverUrl` — cover image URL.\r\n- `pageCount` — number of parts in a multi-part upload.\r\n- `pages[]` — per-part objects with `page`, `cid`, `title`, `duration`, `width`, and `height` (enriched rows).\r\n- `resolution` — main part resolution, for example `1920x1080`.\r\n- `dynamic` — the uploader's video dynamic text, when present.\r\n- `copyright` — Bilibili copyright flag.\r\n- `uploadRegion` — uploader's declared location, when published.\r\n- `rankIndex` — 1-based chart position (ranking and weekly rows).\r\n- `recReason` — recommendation reason shown by Bilibili (popular and weekly rows, when present).\r\n- `engagementRate` — `(likes + coins + favorites + shares + replies) / views`, rounded to four decimals. Raw search rows have no coin/share counters, so their rate uses the counters Bilibili returns there.\r\n- `coinLikeRatio` — `coins / likes`, rounded to four decimals, when likes are non-zero. Absent on raw search rows because Bilibili does not return coins in search results.\r\n- `videoUrl` — canonical Bilibili video page.\r\n- `sourceUrl` — the search page, chart, or video page the row came from.\r\n- `sourceQuery` — original search keyword (search rows only).\r\n- `dataSource` — `search`, `video`, `popular`, `ranking`, or `weekly`.\r\n- `enriched` — `true` when per-video detail data was merged.\r\n- `scrapedAt` — UTC timestamp of collection.\r\n\r\n## Output per error record\r\n\r\nError rows carry `recordType: \"error\"`, an `errorType` (`invalid_input`, `not_found`, `blocked`, `rate_limited`, `upstream_error`, `parse_error`, or `empty_response`), a `message`, the `sourceUrl` that failed, optional `statusCode` and `biliCode` values, a `retryable` flag, and `scrapedAt`. Error rows never count toward `maxItems`.\r\n\r\n## Input\r\n\r\n| Field | Type | Default | Description |\r\n|---|---|---|---|\r\n| `mode` | String (select) | `search` | `search`, `byVideoUrl`, `popular`, or `ranking`. |\r\n| `searchQueries` | List of strings | `[]` (prefill `[\"python\"]`) | Keywords to search. Use one entry per alias; Bilibili does not translate Chinese and English keywords. Used in `search` mode. |\r\n| `videoUrls` | List of strings | `[]` | Video pages, `b23.tv` short links, bare BV IDs, `av` IDs, or numeric AV IDs. Used in `byVideoUrl` mode. |\r\n| `maxItems` | Integer | `20` | Maximum video rows (1-1000). Error rows do not count. |\r\n| `sort` | String (select) | `totalrank` | Search order: `totalrank`, `click`, `pubdate`, `dm` (most danmaku), `stow` (most favorites), or `scores` (most comments). Used in `search` mode. |\r\n| `publishedAfter` | Date | – | Keep videos published on or after this UTC date (`YYYY-MM-DD`). Used in `search` mode. |\r\n| `publishedBefore` | Date | – | Keep videos published on or before this UTC date (`YYYY-MM-DD`). Used in `search` mode. |\r\n| `duration` | String (select) | `all` | `all`, `short` (under 10 min), `medium` (10-30 min), `long` (30-60 min), or `verylong` (over 60 min). Used in `search` mode. |\r\n| `partition` | String (select) | `0` | Partition for search filtering or the ranking chart (all plus 14 named partitions). Ignored for weekly charts. |\r\n| `rankingType` | String (select) | `all` | `all`, `origin`, `rookie`, or `weekly`. Used in `ranking` mode. |\r\n| `weekNumber` | Integer | – | A specific weekly issue number (1-10000). Omit for the latest issue. |\r\n| `enrichDetails` | Boolean | `false` | Add a detail request per unique video to fill tags, coin/share counts, cid, parts, resolution, and uploader followers. Usually adds 3-10 seconds per video, depending on Bilibili latency. |\r\n| `proxyConfiguration` | Object | – | Optional. The actor starts direct and retries through fresh and anonymous browser sessions; a proxy you provide is used only as the final escalation stage. |\r\n\r\nEither date bound can be used alone; the scraper fills in the missing bound because Bilibili applies a publish-date filter only when both bounds are supplied.\r\n\r\n### Example: newest short Python videos from the knowledge partition\r\n\r\n```json\r\n{\r\n  \"mode\": \"search\",\r\n  \"searchQueries\": [\"python\"],\r\n  \"sort\": \"pubdate\",\r\n  \"partition\": \"36\",\r\n  \"duration\": \"short\",\r\n  \"publishedAfter\": \"2026-01-01\",\r\n  \"maxItems\": 40\r\n}\r\n```\r\n\r\n### Example: enrich a batch of mixed video links\r\n\r\n```json\r\n{\r\n  \"mode\": \"byVideoUrl\",\r\n  \"videoUrls\": [\r\n    \"https://www.bilibili.com/video/BV1wD4y1o7AS/\",\r\n    \"BV1Jgf6YvE8e\",\r\n    \"av170001\",\r\n    \"https://b23.tv/abc123\"\r\n  ]\r\n}\r\n```\r\n\r\n### Example: top popular videos with full detail\r\n\r\n```json\r\n{\r\n  \"mode\": \"popular\",\r\n  \"maxItems\": 100,\r\n  \"enrichDetails\": true\r\n}\r\n```\r\n\r\n### Example: latest weekly chart in the food partition\r\n\r\n```json\r\n{\r\n  \"mode\": \"ranking\",\r\n  \"rankingType\": \"weekly\",\r\n  \"partition\": \"211\",\r\n  \"maxItems\": 50\r\n}\r\n```\r\n\r\n## Use cases\r\n\r\n- **Creator and niche research** — search Chinese and English keywords with date and duration filters to see who is active in a topic.\r\n- **Trend tracking** — schedule daily pulls of a partition's all-time, origin, rookie, or weekly chart and compare rank movement.\r\n- **Content benchmarking** — compare views, likes, coins, favorites, and comments across videos and partitions.\r\n- **Dataset building** — export stable video metadata for recommendation models, topic analysis, or media monitoring.\r\n- **Catalog resolution** — turn a list of saved links or BV IDs into complete metadata with one run.\r\n- **Engagement analysis** — use the derived engagement rate and coin-to-like ratio to screen videos for authentic interaction.\r\n\r\n## FAQ\r\n\r\n### Do I need a Bilibili account or cookies?\r\n\r\nNo. Search, video lookups, the popular feed, and every ranking chart are read from public pages without a login.\r\n\r\n### Does this actor collect comments, danmaku text, subtitles, creator video lists, or video files?\r\n\r\nNo. The actor returns public video metadata and aggregate counters only. Comment text, individual danmaku messages, subtitles, creator video lists, and media downloads are outside its scope. Uploader details and follower counts come from the videos themselves.\r\n\r\n### Why are `coinCount` and `shareCount` missing on some search rows?\r\n\r\nBilibili's search results do not include coin or share counts. Set `enrichDetails` to `true` (or use `byVideoUrl`) to fill them from the video detail data.\r\n\r\n### How much slower is detail enrichment?\r\n\r\nEach enriched video usually adds 3-10 seconds, depending on Bilibili latency. A 1,000-row search with enrichment can take an hour or more; the default run is intentionally small.\r\n\r\n### Why do I get fewer videos than `maxItems`?\r\n\r\nSearch returns at most 1,000 rows across 20 pages, the popular feed currently holds about 643 videos, a ranking chart has roughly 87-100 entries, and a weekly issue has about 48-49. Filters applied after collection can reduce the count further.\r\n\r\n### What do `dm` and `scores` mean in the sort list?\r\n\r\n`dm` sorts by danmaku count and `scores` sorts by comment count. Older actors labelled `scores` as a rating; that is not what Bilibili returns.\r\n\r\n### Are course ads included in search results?\r\n\r\nNo. Search pages can contain course-promotion rows without a video ID; those are skipped, so a page of 50 results can yield fewer than 50 videos.\r\n\r\n### What timezone are the date filters in?\r\n\r\nBoth `publishedAfter` and `publishedBefore` are interpreted in UTC, and `publishTime` is emitted in UTC ISO format.\r\n\r\n### Can I fetch a specific weekly issue?\r\n\r\nYes. Set `rankingType` to `weekly` and pass the issue number in `weekNumber`. Leave `weekNumber` empty to get the latest issue.\r\n\r\n### What happens with an invalid link or ID?\r\n\r\nThat input produces an error row with `recordType: \"error\"` and an `errorType`, so you can see exactly which entry failed. Valid entries in the same run still produce video rows.\r\n\r\n### Do I need to configure a proxy?\r\n\r\nNo. The actor starts with a direct connection and retries through a fresh session and an anonymous browser session. If you provide a proxy, it is used only after those stages; without one, a persistent block ends in a typed error record.\r\n\r\n### Is this actor affiliated with Bilibili?\r\n\r\nNo. It is an independent third-party tool and is not affiliated with, endorsed by, or sponsored by Bilibili or its operators.\r\n",
    "actorDefinition": {
      "actorSpecification": 1,
      "name": "bilibili-video-search-ranking-and-metadata-scraper",
      "title": "Bilibili Video Search, Ranking & Metadata Scraper",
      "description": "Collect public Bilibili video metadata from keyword search, video URLs or IDs, the popular feed, and all-time, origin, rookie, or weekly ranking charts, with full engagement counters and optional per-video detail enrichment.",
      "version": "2.0",
      "buildTag": "latest",
      "dockerfile": "./Dockerfile",
      "readme": "# Bilibili Video Search, Ranking & Metadata Scraper\r\n\r\nCollect public video metadata from Bilibili without an account. Search a keyword with Bilibili's own sort and filter options, resolve video links or IDs, walk the popular feed, or pull all-time, origin, rookie, and weekly ranking charts. Each row carries the identifiers, uploader, engagement counters, duration, publish time, cover, and optional detail fields such as tags, coin/share counts, parts, resolution, and uploader followers.\r\n\r\n## What this actor does\r\n\r\n- **Four modes:** `search`, `byVideoUrl`, `popular`, and `ranking` (weekly charts are a ranking type).\r\n- **Search filters:** sort by relevance, views, newest, danmaku, favorites, or comments; publication date range; duration bucket; and partition.\r\n- **Ranking coverage:** 15 partitions across all-time, originals-only, rookie, and the weekly series (one issue per run, or a specific issue number).\r\n- **Detail enrichment:** optional per-video enrichment adds tags, coin and share counts, cid, every part, resolution, uploader followers, and the full stat block. Video lookups are always enriched.\r\n- **Duplicate-safe:** repeated videos across pages or queries are emitted once, and course-ad rows without a video ID are skipped.\r\n- **Stable field names:** every mode uses the same names, and a field is omitted only when Bilibili has no real value for that video, never replaced with a placeholder.\r\n- **Empty fields are omitted:** missing values are left out instead of being returned as `null`.\r\n\r\n## Output per video\r\n\r\n- `recordType` — `\"video\"` for normal rows, `\"error\"` for error rows.\r\n- `bvid` — BV-format video ID.\r\n- `aid` — numeric AV video ID.\r\n- `cid` — main part content ID (detail, popular, ranking, weekly, and enriched rows).\r\n- `title` — video title, with search highlighting and HTML entities cleaned.\r\n- `description` — video description.\r\n- `tags[]` — video tags (search rows and enriched rows).\r\n- `typeName` — partition or category label.\r\n- `partitionId` — Bilibili category ID for the video (often a subcategory of the selected partition).\r\n- `author` — uploader display name.\r\n- `authorMid` — uploader numeric member ID.\r\n- `authorAvatar` — uploader avatar URL.\r\n- `authorFollowers` — uploader follower count (enriched rows).\r\n- `viewCount` — total views.\r\n- `likeCount` — likes.\r\n- `coinCount` — coins (enriched, popular, ranking, and weekly rows; absent on raw search rows).\r\n- `favorites` — favorites/collections.\r\n- `shareCount` — shares (enriched, popular, ranking, and weekly rows; absent on raw search rows).\r\n- `danmaku` — aggregate danmaku count.\r\n- `replyCount` — comment count.\r\n- `duration` — length in seconds.\r\n- `durationText` — length formatted as `H:MM:SS` or `M:SS`.\r\n- `publishTime` — publish time in UTC ISO format.\r\n- `publishDate` — publish date in `YYYY-MM-DD` (UTC).\r\n- `coverUrl` — cover image URL.\r\n- `pageCount` — number of parts in a multi-part upload.\r\n- `pages[]` — per-part objects with `page`, `cid`, `title`, `duration`, `width`, and `height` (enriched rows).\r\n- `resolution` — main part resolution, for example `1920x1080`.\r\n- `dynamic` — the uploader's video dynamic text, when present.\r\n- `copyright` — Bilibili copyright flag.\r\n- `uploadRegion` — uploader's declared location, when published.\r\n- `rankIndex` — 1-based chart position (ranking and weekly rows).\r\n- `recReason` — recommendation reason shown by Bilibili (popular and weekly rows, when present).\r\n- `engagementRate` — `(likes + coins + favorites + shares + replies) / views`, rounded to four decimals. Raw search rows have no coin/share counters, so their rate uses the counters Bilibili returns there.\r\n- `coinLikeRatio` — `coins / likes`, rounded to four decimals, when likes are non-zero. Absent on raw search rows because Bilibili does not return coins in search results.\r\n- `videoUrl` — canonical Bilibili video page.\r\n- `sourceUrl` — the search page, chart, or video page the row came from.\r\n- `sourceQuery` — original search keyword (search rows only).\r\n- `dataSource` — `search`, `video`, `popular`, `ranking`, or `weekly`.\r\n- `enriched` — `true` when per-video detail data was merged.\r\n- `scrapedAt` — UTC timestamp of collection.\r\n\r\n## Output per error record\r\n\r\nError rows carry `recordType: \"error\"`, an `errorType` (`invalid_input`, `not_found`, `blocked`, `rate_limited`, `upstream_error`, `parse_error`, or `empty_response`), a `message`, the `sourceUrl` that failed, optional `statusCode` and `biliCode` values, a `retryable` flag, and `scrapedAt`. Error rows never count toward `maxItems`.\r\n\r\n## Input\r\n\r\n| Field | Type | Default | Description |\r\n|---|---|---|---|\r\n| `mode` | String (select) | `search` | `search`, `byVideoUrl`, `popular`, or `ranking`. |\r\n| `searchQueries` | List of strings | `[]` (prefill `[\"python\"]`) | Keywords to search. Use one entry per alias; Bilibili does not translate Chinese and English keywords. Used in `search` mode. |\r\n| `videoUrls` | List of strings | `[]` | Video pages, `b23.tv` short links, bare BV IDs, `av` IDs, or numeric AV IDs. Used in `byVideoUrl` mode. |\r\n| `maxItems` | Integer | `20` | Maximum video rows (1-1000). Error rows do not count. |\r\n| `sort` | String (select) | `totalrank` | Search order: `totalrank`, `click`, `pubdate`, `dm` (most danmaku), `stow` (most favorites), or `scores` (most comments). Used in `search` mode. |\r\n| `publishedAfter` | Date | – | Keep videos published on or after this UTC date (`YYYY-MM-DD`). Used in `search` mode. |\r\n| `publishedBefore` | Date | – | Keep videos published on or before this UTC date (`YYYY-MM-DD`). Used in `search` mode. |\r\n| `duration` | String (select) | `all` | `all`, `short` (under 10 min), `medium` (10-30 min), `long` (30-60 min), or `verylong` (over 60 min). Used in `search` mode. |\r\n| `partition` | String (select) | `0` | Partition for search filtering or the ranking chart (all plus 14 named partitions). Ignored for weekly charts. |\r\n| `rankingType` | String (select) | `all` | `all`, `origin`, `rookie`, or `weekly`. Used in `ranking` mode. |\r\n| `weekNumber` | Integer | – | A specific weekly issue number (1-10000). Omit for the latest issue. |\r\n| `enrichDetails` | Boolean | `false` | Add a detail request per unique video to fill tags, coin/share counts, cid, parts, resolution, and uploader followers. Usually adds 3-10 seconds per video, depending on Bilibili latency. |\r\n| `proxyConfiguration` | Object | – | Optional. The actor starts direct and retries through fresh and anonymous browser sessions; a proxy you provide is used only as the final escalation stage. |\r\n\r\nEither date bound can be used alone; the scraper fills in the missing bound because Bilibili applies a publish-date filter only when both bounds are supplied.\r\n\r\n### Example: newest short Python videos from the knowledge partition\r\n\r\n```json\r\n{\r\n  \"mode\": \"search\",\r\n  \"searchQueries\": [\"python\"],\r\n  \"sort\": \"pubdate\",\r\n  \"partition\": \"36\",\r\n  \"duration\": \"short\",\r\n  \"publishedAfter\": \"2026-01-01\",\r\n  \"maxItems\": 40\r\n}\r\n```\r\n\r\n### Example: enrich a batch of mixed video links\r\n\r\n```json\r\n{\r\n  \"mode\": \"byVideoUrl\",\r\n  \"videoUrls\": [\r\n    \"https://www.bilibili.com/video/BV1wD4y1o7AS/\",\r\n    \"BV1Jgf6YvE8e\",\r\n    \"av170001\",\r\n    \"https://b23.tv/abc123\"\r\n  ]\r\n}\r\n```\r\n\r\n### Example: top popular videos with full detail\r\n\r\n```json\r\n{\r\n  \"mode\": \"popular\",\r\n  \"maxItems\": 100,\r\n  \"enrichDetails\": true\r\n}\r\n```\r\n\r\n### Example: latest weekly chart in the food partition\r\n\r\n```json\r\n{\r\n  \"mode\": \"ranking\",\r\n  \"rankingType\": \"weekly\",\r\n  \"partition\": \"211\",\r\n  \"maxItems\": 50\r\n}\r\n```\r\n\r\n## Use cases\r\n\r\n- **Creator and niche research** — search Chinese and English keywords with date and duration filters to see who is active in a topic.\r\n- **Trend tracking** — schedule daily pulls of a partition's all-time, origin, rookie, or weekly chart and compare rank movement.\r\n- **Content benchmarking** — compare views, likes, coins, favorites, and comments across videos and partitions.\r\n- **Dataset building** — export stable video metadata for recommendation models, topic analysis, or media monitoring.\r\n- **Catalog resolution** — turn a list of saved links or BV IDs into complete metadata with one run.\r\n- **Engagement analysis** — use the derived engagement rate and coin-to-like ratio to screen videos for authentic interaction.\r\n\r\n## FAQ\r\n\r\n### Do I need a Bilibili account or cookies?\r\n\r\nNo. Search, video lookups, the popular feed, and every ranking chart are read from public pages without a login.\r\n\r\n### Does this actor collect comments, danmaku text, subtitles, creator video lists, or video files?\r\n\r\nNo. The actor returns public video metadata and aggregate counters only. Comment text, individual danmaku messages, subtitles, creator video lists, and media downloads are outside its scope. Uploader details and follower counts come from the videos themselves.\r\n\r\n### Why are `coinCount` and `shareCount` missing on some search rows?\r\n\r\nBilibili's search results do not include coin or share counts. Set `enrichDetails` to `true` (or use `byVideoUrl`) to fill them from the video detail data.\r\n\r\n### How much slower is detail enrichment?\r\n\r\nEach enriched video usually adds 3-10 seconds, depending on Bilibili latency. A 1,000-row search with enrichment can take an hour or more; the default run is intentionally small.\r\n\r\n### Why do I get fewer videos than `maxItems`?\r\n\r\nSearch returns at most 1,000 rows across 20 pages, the popular feed currently holds about 643 videos, a ranking chart has roughly 87-100 entries, and a weekly issue has about 48-49. Filters applied after collection can reduce the count further.\r\n\r\n### What do `dm` and `scores` mean in the sort list?\r\n\r\n`dm` sorts by danmaku count and `scores` sorts by comment count. Older actors labelled `scores` as a rating; that is not what Bilibili returns.\r\n\r\n### Are course ads included in search results?\r\n\r\nNo. Search pages can contain course-promotion rows without a video ID; those are skipped, so a page of 50 results can yield fewer than 50 videos.\r\n\r\n### What timezone are the date filters in?\r\n\r\nBoth `publishedAfter` and `publishedBefore` are interpreted in UTC, and `publishTime` is emitted in UTC ISO format.\r\n\r\n### Can I fetch a specific weekly issue?\r\n\r\nYes. Set `rankingType` to `weekly` and pass the issue number in `weekNumber`. Leave `weekNumber` empty to get the latest issue.\r\n\r\n### What happens with an invalid link or ID?\r\n\r\nThat input produces an error row with `recordType: \"error\"` and an `errorType`, so you can see exactly which entry failed. Valid entries in the same run still produce video rows.\r\n\r\n### Do I need to configure a proxy?\r\n\r\nNo. The actor starts with a direct connection and retries through a fresh session and an anonymous browser session. If you provide a proxy, it is used only after those stages; without one, a persistent block ends in a typed error record.\r\n\r\n### Is this actor affiliated with Bilibili?\r\n\r\nNo. It is an independent third-party tool and is not affiliated with, endorsed by, or sponsored by Bilibili or its operators.\r\n",
      "input": {
        "title": "Bilibili Video Search, Ranking & Metadata Scraper Input",
        "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.",
        "type": "object",
        "schemaVersion": 1,
        "properties": {
          "mode": {
            "title": "Mode",
            "type": "string",
            "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"
            ],
            "default": "search",
            "prefill": "search"
          },
          "searchQueries": {
            "title": "Search queries / aliases (mode=search)",
            "type": "array",
            "description": "One keyword per entry, e.g. `python`, `原神`, `Genshin`. Provide Chinese and English aliases explicitly; Bilibili does not translate them.",
            "editor": "stringList",
            "maxItems": 10,
            "default": [],
            "prefill": [
              "python"
            ]
          },
          "videoUrls": {
            "title": "Video URLs or IDs (mode=byVideoUrl)",
            "type": "array",
            "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,
            "default": [],
            "prefill": []
          },
          "maxItems": {
            "title": "Max videos",
            "type": "integer",
            "description": "Hard cap on emitted video records. Error records do not count toward it.",
            "minimum": 1,
            "maximum": 1000,
            "default": 20,
            "prefill": 3
          },
          "sort": {
            "title": "Search sort (mode=search)",
            "type": "string",
            "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"
            ],
            "default": "totalrank",
            "prefill": "totalrank"
          },
          "publishedAfter": {
            "title": "Published after (UTC)",
            "type": "string",
            "description": "Only videos published on or after this date, `YYYY-MM-DD` (mode=search). Can be used alone.",
            "editor": "datepicker"
          },
          "publishedBefore": {
            "title": "Published before (UTC)",
            "type": "string",
            "description": "Only videos published on or before this date, `YYYY-MM-DD` (mode=search). Can be used alone.",
            "editor": "datepicker"
          },
          "duration": {
            "title": "Duration filter (mode=search)",
            "type": "string",
            "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"
            ],
            "default": "all",
            "prefill": "all"
          },
          "partition": {
            "title": "Partition",
            "type": "string",
            "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 (汽车)"
            ],
            "default": "0",
            "prefill": "0"
          },
          "rankingType": {
            "title": "Ranking type (mode=ranking)",
            "type": "string",
            "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"
            ],
            "default": "all",
            "prefill": "all"
          },
          "weekNumber": {
            "title": "Weekly issue number (mode=ranking)",
            "type": "integer",
            "description": "Specific weekly issue. Omit to use the latest issue.",
            "minimum": 1,
            "maximum": 10000
          },
          "enrichDetails": {
            "title": "Enrich with video details",
            "type": "boolean",
            "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.",
            "default": false,
            "prefill": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration (optional)",
            "type": "object",
            "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"
          }
        },
        "required": [
          "mode"
        ]
      },
      "output": {
        "actorOutputSchemaVersion": 1,
        "title": "Bilibili Video Search, Ranking & Metadata Scraper Output",
        "description": "Bilibili videos with IDs, title, description, tags, category, uploader details, engagement counters, duration, publish time, cover, parts, resolution, and ranking position.",
        "properties": {
          "videos": {
            "type": "string",
            "title": "Bilibili videos",
            "description": "Dataset containing all collected Bilibili video and error records.",
            "template": "{{links.apiDefaultDatasetUrl}}/items"
          }
        }
      },
      "defaultMemoryMbytes": 2048,
      "storages": {
        "dataset": {
          "actorSpecification": 1,
          "views": {
            "overview": {
              "title": "Videos",
              "transformation": {
                "fields": [
                  "title",
                  "author",
                  "viewCount",
                  "likeCount",
                  "publishTime",
                  "videoUrl"
                ]
              },
              "display": {
                "component": "table",
                "properties": {}
              }
            }
          }
        }
      },
      "environmentVariables": {}
    },
    "buildNumber": "2.0.2",
    "imageDigest": "2b3d99c0d5c02342c5c8caf5339e83cec2de3073202c540e84a417ca93e2ac5c",
    "actVersion": {
      "sourceType": "SOURCE_FILES",
      "buildTag": "latest",
      "versionNumber": "2.0"
    },
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0.04362888888888889
    }
  }
}