{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper - Trending, Search, Comments & Trend History",
    "description": "Bilibili (哔哩哔哩) popular board, Top 100 rankings by category, weekly must-watch issues back to 2019, hot searches, video search, video details with tags, comments, danmaku and creator profiles. Scheduled runs track what changed: new entries, rank moves, views gained. No login.",
    "version": "0.0",
    "x-build-id": "MgxX6fBN408IvRsgR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlplant~bilibili-trending-history/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlplant-bilibili-trending-history",
        "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/crawlplant~bilibili-trending-history/runs": {
      "post": {
        "operationId": "runs-sync-crawlplant-bilibili-trending-history",
        "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/crawlplant~bilibili-trending-history/run-sync": {
      "post": {
        "operationId": "run-sync-crawlplant-bilibili-trending-history",
        "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",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "popular",
              "ranking",
              "weekly",
              "mustWatch",
              "hotSearches",
              "search",
              "videos",
              "comments",
              "danmaku",
              "creators",
              "tracked"
            ],
            "type": "string",
            "description": "popular = the popular board (综合热门, up to 500 videos, what Bilibili promotes right now); ranking = Top 100 per category (排行榜); weekly = weekly must-watch issues (每周必看, every issue since March 2019); mustWatch = the all-time must-watch list (入站必刷, ~100 videos); hotSearches = the top 50 hot searches (热搜); search = videos or creators by keyword; videos = details of videos by id or URL; comments = comments of videos; danmaku = bullet comments (弹幕) of videos; creators = creator profiles by id or URL; tracked = the hour-by-hour history of the videos and creators you track (trackDays).",
            "default": "popular"
          },
          "rankingCategories": {
            "title": "Ranking categories",
            "type": "array",
            "description": "ranking mode: which Top 100 lists to read, 100 videos each. all = the all-site ranking.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "animation",
                "chinese-animation",
                "music",
                "dance",
                "gaming",
                "knowledge",
                "tech",
                "sports",
                "cars",
                "life",
                "food",
                "animals",
                "kichiku",
                "fashion",
                "entertainment",
                "film-tv"
              ],
              "enumTitles": [
                "All (全站)",
                "Animation (动画)",
                "Chinese animation (国创)",
                "Music (音乐)",
                "Dance (舞蹈)",
                "Gaming (游戏)",
                "Knowledge (知识)",
                "Tech (科技)",
                "Sports (运动)",
                "Cars (汽车)",
                "Life (生活)",
                "Food (美食)",
                "Animals (动物圈)",
                "Kichiku, remix & memes (鬼畜)",
                "Fashion (时尚)",
                "Entertainment (娱乐)",
                "Film & TV (影视)"
              ]
            },
            "default": [
              "all"
            ]
          },
          "weeklyIssues": {
            "title": "Weekly issues",
            "type": "array",
            "description": "weekly mode: latest, an issue number (392) or a range (380-392). Issue 1 is from March 2019; a new issue comes out every Friday evening (China time). About 40-50 videos per issue.",
            "items": {
              "type": "string"
            },
            "default": [
              "latest"
            ]
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "search mode: one or more keywords, in Chinese or English (Chinese finds more: 耐克 rather than Nike). Up to 1,000 results per keyword; maxItems is shared evenly between keywords.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searchType": {
            "title": "Search for",
            "enum": [
              "videos",
              "creators"
            ],
            "type": "string",
            "description": "search mode: videos, or creators (UP主) whose name matches, with followers, video count and their latest uploads.",
            "default": "videos"
          },
          "sortBy": {
            "title": "Sort videos by",
            "enum": [
              "relevance",
              "views",
              "newest",
              "danmaku",
              "favorites"
            ],
            "type": "string",
            "description": "search mode (videos): Bilibili's own sorts. relevance = its default ranking; views = most played; newest = newest uploads first; danmaku = most danmaku; favorites = most saved.",
            "default": "relevance"
          },
          "durationFilter": {
            "title": "Video length",
            "enum": [
              "any",
              "under10",
              "10to30",
              "30to60",
              "over60"
            ],
            "type": "string",
            "description": "search mode (videos): only videos of this length.",
            "default": "any"
          },
          "searchCategory": {
            "title": "Category",
            "enum": [
              "all",
              "animation",
              "chinese-animation",
              "music",
              "dance",
              "gaming",
              "knowledge",
              "tech",
              "sports",
              "cars",
              "life",
              "food",
              "animals",
              "kichiku",
              "fashion",
              "entertainment",
              "film-tv"
            ],
            "type": "string",
            "description": "search mode (videos): only videos of this category (the same categories as the rankings).",
            "default": "all"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "search mode (videos): only videos published on or after this date. 2026-09-01, an ISO time, or relative: 7 days, 24 hours."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "search mode (videos): only videos published on or before this date (a date includes the whole day). Same formats as Published after."
          },
          "videos": {
            "title": "Videos",
            "type": "array",
            "description": "videos, comments and danmaku modes: BV ids (BV1Gtap6NEPB), av numbers (av80433022) or video URLs (bilibili.com/video/..., m.bilibili.com). Open b23.tv short links in a browser and paste the full URL.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "creators": {
            "title": "Creators",
            "type": "array",
            "description": "creators mode: creator ids (the number in space.bilibili.com/546195) or profile URLs.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "commentsSort": {
            "title": "Comments order",
            "enum": [
              "hot",
              "newest"
            ],
            "type": "string",
            "description": "comments mode: hot = Bilibili's own hot order (popular comments first, the pinned comment on top); newest = newest first.",
            "default": "hot"
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "comments mode: stop after this many comments per video (replies included when Include replies is on). 20 per request.",
            "default": 100
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "comments mode: after each comment, add its replies (oldest first, up to maxRepliesPerComment), marked isReply with the comment id in rootId.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Replies per comment",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "comments mode with includeReplies: replies added under each comment (1-20). Replies count toward maxCommentsPerVideo, so a small number leaves room for more comments.",
            "default": 5
          },
          "maxDanmakuPerVideo": {
            "title": "Max danmaku per video",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "danmaku mode: Bilibili keeps a pool of up to 1,000-8,000+ danmaku per video part. When the pool is larger than this, the rows are an even sample across the whole video timeline (poolSize says how many there were).",
            "default": 1000
          },
          "creatorVideos": {
            "title": "Latest videos per creator",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "creators mode: also return each creator's newest uploads as video rows (0-50).",
            "default": 0
          },
          "includeDetails": {
            "title": "Video details",
            "type": "boolean",
            "description": "popular, ranking, weekly, mustWatch, search and creator videos: read each video's page too, for tags, honours (e.g. 全站排行榜最高第1名), coins and shares where the list lacks them, exact weekly counts, and the creator's followers and video count. One extra request per video, priced as a detailed video row.",
            "default": false
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Video modes: only videos with at least this many views (applied before rows are saved and charged). 0 = all.",
            "default": 0
          },
          "trackHistory": {
            "title": "Track changes between runs",
            "type": "boolean",
            "description": "Remember what earlier runs saw (popular board, each ranking, hot searches, each search, each creator's uploads, videos and creators by id) and add to each row: firstSeenAt, timesSeen, isNew, previousPosition, positionChange, bestPosition, and views gained (followers gained, heat change) since the previous run. Kept in a key-value store named bilibili-trending-history in your own account. Schedule the run (e.g. hourly) to build the history.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new rows",
            "type": "boolean",
            "description": "Return only videos, hot searches and search results that earlier runs of the same board or search did not see: a feed of what is newly trending. The first run returns everything.",
            "default": false
          },
          "historyKey": {
            "title": "History name",
            "type": "string",
            "description": "Optional: a name that keeps this task's tracking apart from your other runs of the same board (e.g. hourly-popular vs daily-popular). Empty = shared per board or search."
          },
          "trackDays": {
            "title": "Track on our server for (days)",
            "minimum": 0,
            "maximum": 90,
            "type": "integer",
            "description": "videos and creators modes: keep reading these videos and creators every hour on our server for this many days, also while this Actor is not running (views, likes, coins, favorites, shares, comments and danmaku of each video; followers, videos, likes and new uploads of each creator). Run mode tracked any time later for the curves. Charged per video or creator and day (tracking-day); running it again extends the period and charges only the added days. 0 = off.",
            "default": 0
          },
          "historyResolution": {
            "title": "History points",
            "enum": [
              "daily",
              "hourly"
            ],
            "type": "string",
            "description": "tracked mode: one point per day (the day's last reading) or every hourly reading.",
            "default": "daily"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows in total (after filters). Every row is charged, so this also caps the cost.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}