{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper — Videos, Search, Creators & Danmaku",
    "description": "Scrape Bilibili trending videos, category rankings, keyword search, creator profiles & uploads, video details, top comments, and danmaku (bullet comments) without login or cookies. Direct signed HTTP API, zero browser overhead.",
    "version": "1.0",
    "x-build-id": "hxxZ95gAhZi6jqgQv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/qilu~bilibili-no-login-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-qilu-bilibili-no-login-scraper",
        "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/qilu~bilibili-no-login-scraper/runs": {
      "post": {
        "operationId": "runs-sync-qilu-bilibili-no-login-scraper",
        "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/qilu~bilibili-no-login-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-qilu-bilibili-no-login-scraper",
        "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": "Scrape Mode",
            "enum": [
              "trending",
              "search",
              "creator",
              "videos"
            ],
            "type": "string",
            "description": "Choose what to scrape from Bilibili: trending/rankings, keyword search, creator videos, or specific video URLs/BV IDs.",
            "default": "trending"
          },
          "trendingType": {
            "title": "Trending Feed Type",
            "enum": [
              "popular",
              "ranking"
            ],
            "type": "string",
            "description": "Used in 'trending' mode. 'popular' paginates Bilibili's hot feed; 'ranking' fetches the Top 100 leaderboard for the chosen category.",
            "default": "popular"
          },
          "rankingCategory": {
            "title": "Ranking Category",
            "enum": [
              "all",
              "douga",
              "music",
              "dance",
              "game",
              "knowledge",
              "tech",
              "sports",
              "car",
              "life",
              "food",
              "fashion",
              "ent",
              "cinephile"
            ],
            "type": "string",
            "description": "Used when mode='trending' and trendingType='ranking'.",
            "default": "all"
          },
          "searchQuery": {
            "title": "Search Keyword",
            "type": "string",
            "description": "Used in 'search' mode. Supports Chinese or English keywords (e.g. 'AI', '新能源汽车', '黑神话悟空', 'iPhone').",
            "default": ""
          },
          "searchOrder": {
            "title": "Search Sort Order",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow"
            ],
            "type": "string",
            "description": "Used in 'search' mode.",
            "default": "totalrank"
          },
          "creatorIds": {
            "title": "Creator UIDs or Space URLs",
            "type": "array",
            "description": "Used in 'creator' mode. Enter numeric UIDs (e.g. '946974') or profile URLs ('https://space.bilibili.com/946974').",
            "default": [
              "946974"
            ],
            "items": {
              "type": "string"
            }
          },
          "creatorVideoOrder": {
            "title": "Creator Videos Sort Order",
            "enum": [
              "pubdate",
              "click",
              "stow"
            ],
            "type": "string",
            "description": "Used in 'creator' mode.",
            "default": "pubdate"
          },
          "videoUrls": {
            "title": "Video URLs or BV IDs",
            "type": "array",
            "description": "Used in 'videos' mode. Enter BV IDs (e.g. 'BV1rryhzDEy8') or full video URLs ('https://www.bilibili.com/video/BV1rryhzDEy8').",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Include Top Comments (Add-on)",
            "type": "boolean",
            "description": "Fetch top-liked comments for each scraped video.",
            "default": false
          },
          "maxCommentsPerVideo": {
            "title": "Max Comments Per Video",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of top comments to attach per video when Include Top Comments is enabled.",
            "default": 20
          },
          "includeDanmaku": {
            "title": "Include Danmaku / Bullet Comments (Add-on)",
            "type": "boolean",
            "description": "Fetch timestamped danmaku (bullet comments) from each video's XML feed.",
            "default": false
          },
          "maxDanmakuPerVideo": {
            "title": "Max Danmaku Per Video",
            "minimum": 10,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of danmaku items to keep per video when Include Danmaku is enabled.",
            "default": 200
          },
          "maxItems": {
            "title": "Max Videos to Return",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of videos to extract. Free Apify plans are capped at 20 preview items.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}