{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Search Scraper (哔哩哔哩 B站): Videos, Trending & Ranking",
    "description": "Bilibili (哔哩哔哩, B站) video search scraper: search videos by keyword and export the trending Popular (热门), Ranking top 100 (排行榜) and Weekly Must-Watch (每周必看) lists. Views, likes, danmaku, comments, coins, shares, uploader (UP主), tags and category. No login, no cookies.",
    "version": "0.1",
    "x-build-id": "c9h5gNKNScxsteiYO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteacs~bilibili-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteacs-bilibili-search",
        "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/siteacs~bilibili-search/runs": {
      "post": {
        "operationId": "runs-sync-siteacs-bilibili-search",
        "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/siteacs~bilibili-search/run-sync": {
      "post": {
        "operationId": "run-sync-siteacs-bilibili-search",
        "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": {
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Words to search Bilibili's videos for, one per line, as you would type them into Bilibili's search box. Chinese words find far more: 机械键盘 (mechanical keyboard), 露营 (camping), 原神 (Genshin Impact), 测评 (review). Brand and product names work in English too (iPhone 17, Tesla, DJI). A Bilibili search link (search.bilibili.com/all?keyword=... or m.bilibili.com/search?keyword=...) is read for its keyword. Duplicates are searched once. Leave empty to read only the lists below.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max videos per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many videos to save for each keyword, in Bilibili's order. A search page holds 42 videos; Bilibili's search stops at 1,000 results (24 pages).",
            "default": 100
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "mostPlayed",
              "newest",
              "mostDanmaku",
              "mostFavorited",
              "mostCommented"
            ],
            "type": "string",
            "description": "The search page's own sort options.",
            "default": "relevance"
          },
          "duration": {
            "title": "Duration",
            "enum": [
              "any",
              "under10",
              "10to30",
              "30to60",
              "over60"
            ],
            "type": "string",
            "description": "The search page's duration filter.",
            "default": "any"
          },
          "category": {
            "title": "Category",
            "enum": [
              "all",
              "anime",
              "music",
              "dance",
              "gaming",
              "knowledge",
              "tech",
              "sports",
              "cars",
              "life",
              "food",
              "animals",
              "kichiku",
              "fashion",
              "entertainment",
              "film"
            ],
            "type": "string",
            "description": "Only videos in one of Bilibili's main categories (分区).",
            "default": "all"
          },
          "publishedAfter": {
            "title": "Published on or after",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only videos published on or after this day (China time, UTC+8, as the site counts days). Format YYYY-MM-DD."
          },
          "publishedBefore": {
            "title": "Published on or before",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only videos published on or before this day (China time). Format YYYY-MM-DD."
          },
          "popularLists": {
            "title": "Popular lists",
            "type": "array",
            "description": "Bilibili's own trending and editor lists, read as their pages load them. Each video row is charged like a search row; each list ends with a free summary row.",
            "items": {
              "type": "string",
              "enum": [
                "popular",
                "ranking",
                "weekly",
                "precious"
              ],
              "enumTitles": [
                "Popular now (综合热门)",
                "Ranking, top 100 (排行榜)",
                "Weekly Must-Watch (每周必看)",
                "All-Time Must-Watch (入站必刷)"
              ]
            }
          },
          "rankingCategory": {
            "title": "Ranking category",
            "enum": [
              "all",
              "anime",
              "music",
              "dance",
              "gaming",
              "knowledge",
              "tech",
              "sports",
              "cars",
              "life",
              "food",
              "animals",
              "kichiku",
              "fashion",
              "entertainment",
              "film",
              "original",
              "rookie"
            ],
            "type": "string",
            "description": "Which tab of the Ranking page to read (about 100 videos each).",
            "default": "all"
          },
          "weeklyIssue": {
            "title": "Weekly Must-Watch issue",
            "minimum": 0,
            "type": "integer",
            "description": "0: the latest issue. Or an issue number (398 was the week of 30 Oct to 5 Nov 2026; issues go back to number 1 in March 2019).",
            "default": 0
          },
          "maxListResults": {
            "title": "Max videos per list",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many videos to save from each list. Popular holds up to 500; Ranking about 100; All-Time Must-Watch about 100; a Weekly issue 30 to 60.",
            "default": 100
          },
          "liveStats": {
            "title": "Live like, coin and share counts",
            "type": "boolean",
            "description": "On: each search result's counters are read from the video's own data, as its page shows them: likes are current and coins and shares are filled. Off: Bilibili's search index figures only, which is faster; plays, danmaku, comments and favourites match the page, likes can lag behind, coins and shares are empty. Same price either way. List rows always carry live counters.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Keywords at a time",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many keywords and lists are read in parallel. The pages of one keyword are read in order.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy (the default) works for Bilibili; a call Bilibili refuses is tried again on another IP with a new visitor cookie.",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Retry refused calls through residential proxy",
            "type": "boolean",
            "description": "On: a call Bilibili still refuses after 6 datacenter IPs is tried through Apify residential proxy, at no extra charge to you. Off: the keyword ends there and its summary row says why.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}