{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili (哔哩哔哩) Video Scraper ✅ NO COOKIES",
    "description": "Scrape Bilibili (哔哩哔哩) by keyword or URL: video search, video details, comments, UP主 profiles, danmaku (弹幕 bullet-comments), and native subtitle transcripts, plus trending. No cookies, no login. Fast structured JSON. Pay only for results returned; failed lookups are free.",
    "version": "1.0",
    "x-build-id": "Pd7FPpNBVOBy09WEO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/atomus~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-atomus-bilibili-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/atomus~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-atomus-bilibili-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/atomus~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-atomus-bilibili-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",
        "required": [
          "searchType"
        ],
        "properties": {
          "searchType": {
            "title": "🎯 What to scrape (mode) / 抓取模式",
            "enum": [
              "search",
              "video-detail",
              "comments",
              "danmaku",
              "transcript",
              "profile",
              "user-videos",
              "trend"
            ],
            "type": "string",
            "description": "Choose the mode. EVERY mode is paid: the run is billed per result by the mode you pick here (price shown in each option below). Each mode uses a different input field and is billed as its own event; failed lookups are free, Gold+ Apify plans get 20% off. // 请选择模式。所有模式均按结果计费，价格见下方各选项。不同模式使用下方不同的输入字段并按各自事件计费；查询失败不收费，Gold 及以上套餐享 8 折。",
            "default": "search"
          },
          "keywords": {
            "title": "🔍 Keywords / 关键词",
            "type": "array",
            "description": "Used by \"Keyword search\" ($0.01 per video returned). One or more search terms, e.g. \"编程\" (programming), \"游戏\" (games). // 用于「关键词搜索」（每返回一个视频 $0.01），可填写一个或多个关键词。",
            "items": {
              "type": "string"
            }
          },
          "sortOrder": {
            "title": "↕️ Sort order / 排序",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow"
            ],
            "type": "string",
            "description": "Only for \"Keyword search\". How to sort results. // 仅用于「关键词搜索」，结果排序方式。",
            "default": "totalrank"
          },
          "durationFilter": {
            "title": "⏱️ Video length / 时长筛选",
            "enum": [
              "any",
              "short",
              "medium",
              "long",
              "verylong"
            ],
            "type": "string",
            "description": "Only for \"Keyword search\". Filter results by video length. Free. // 仅用于「关键词搜索」，按视频时长筛选，免费。",
            "default": "any"
          },
          "publishedAfter": {
            "title": "📅 Published on/after / 发布起始日期",
            "type": "string",
            "description": "Only for \"Keyword search\". Return only videos published on or after this date (YYYY-MM-DD). Free. // 仅用于「关键词搜索」，仅返回该日期（含）之后发布的视频，格式 YYYY-MM-DD，免费。"
          },
          "publishedBefore": {
            "title": "📅 Published on/before / 发布结束日期",
            "type": "string",
            "description": "Only for \"Keyword search\". Return only videos published on or before this date (YYYY-MM-DD). Free. // 仅用于「关键词搜索」，仅返回该日期（含）之前发布的视频，格式 YYYY-MM-DD，免费。"
          },
          "videoUrls": {
            "title": "🔗 Video URLs or BV IDs / 视频链接或BV号",
            "type": "array",
            "description": "Used by \"Video detail\" ($0.02/video), \"Comments\" ($0.008/comment, min 2), \"Danmaku\" ($0.01/video), and \"Transcript\" ($0.01/video). Paste video URLs (https://www.bilibili.com/video/BV...) or bare BV IDs (BV1rpWjevEip). // 用于「视频详情」（$0.02/条）「评论」（$0.008/条，最低 2 条）「弹幕」（$0.01/视频）「字幕」（$0.01/视频），可粘贴视频链接或BV号。",
            "items": {
              "type": "string"
            }
          },
          "userUrls": {
            "title": "👤 UP主 space URLs or UIDs / UP主主页链接或UID",
            "type": "array",
            "description": "Used by \"UP主 profile\" ($0.012 per user) and \"UP主 videos\" ($0.01 per video returned). Paste space URLs (https://space.bilibili.com/178360345) or bare numeric UIDs. // 用于「UP主主页」（每个用户 $0.012）和「UP主投稿视频」（每返回一个视频 $0.01），可粘贴主页链接或纯数字UID。",
            "items": {
              "type": "string"
            }
          },
          "trendType": {
            "title": "📈 Trending type / 热门类型",
            "enum": [
              "videos",
              "keywords"
            ],
            "type": "string",
            "description": "Only for \"Trending\" ($0.008 per result, min 2). Return trending videos (热门视频) or hot search terms (热搜词). // 仅用于「热门」（$0.008/条，每次最低 2 条），返回热门视频或热搜关键词。",
            "default": "videos"
          },
          "maxItems": {
            "title": "💯 Max results per keyword/target / 每个关键词或目标的最大结果数",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many results to return per keyword or target for list modes (search, comments, UP主 videos, trending). ⚠️ This is your main cost lever: those modes bill per result, so total cost ≈ mode price × results (up to this cap) × targets. Video detail / profile return one record per target; danmaku and transcript return the full set from a single call. Comments and Trending bill a minimum of 2 results per request. Why there is a minimum: one request is one lookup, and that lookup does the same work whether it comes back with 50 results, with 1, or with none. The minimum covers the request itself, which is what keeps thin targets worth running instead of being refused outright. Requests that fail are free. // 每个关键词或目标返回的最大结果数（搜索/评论/UP主投稿/热门）。⚠️ 这是主要的费用控制项：上述模式按结果计费，总费用≈模式单价×结果数（不超过此上限）×目标数。视频详情/主页每个目标一条；弹幕与字幕按单次调用返回全部。 「评论」与「热门/热搜」每次请求最低计费 2 条。为什么有最低计费：一次请求就是一次查询，无论返回 50 条、1 条还是 0 条，工作量都相同。最低计费覆盖的是这次请求本身，这样结果很少的目标依然值得抓取，而不是被直接拒绝。请求失败不收费。",
            "default": 20
          },
          "includeReplies": {
            "title": "💬 Also fetch full reply threads ($) / 同时抓取完整楼中楼",
            "type": "boolean",
            "description": "Only for \"Video comments\". Off by default, each top-level comment still ships up to 3 reply previews for free. Turn ON to also fetch every reply (楼中楼) in each thread. Each reply is a comment, so it is billed as one comment ($0.008), and \"Max results\" caps the total (comments + replies). // 仅用于「视频评论」。默认关闭，每条评论仍免费附带最多 3 条楼中楼预览；开启后抓取每条评论下的全部楼中楼。回复即评论，按评论计费（$0.008/条），「最大结果数」限制总量（评论+回复）。",
            "default": false
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}