{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper - Videos, Comments, Danmaku & Search",
    "description": "Scrape Bilibili videos, comments and danmaku: search Bilibili (B站) by keyword, get video stats (views, likes, coins, favorites), comments, bullet comments (弹幕) and creator uploads. No login. $5 per 1,000 videos or comments, $0.10 per 1,000 danmaku; failures are free.",
    "version": "1.0",
    "x-build-id": "a9eeP3WjDCM5Ygz5Y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tenfoldfleet~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tenfoldfleet-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/tenfoldfleet~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tenfoldfleet-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/tenfoldfleet~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tenfoldfleet-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",
        "properties": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords to search on Bilibili, in Chinese or English, e.g. 原神 or minecraft. Each keyword returns up to \"Max videos per search or creator\" videos with views, likes, danmaku and comment counts.",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video URLs or IDs",
            "type": "array",
            "description": "Bilibili video links (https://www.bilibili.com/video/BV...), b23.tv short links, BV ids (BV17x411w7KC) or av ids (av170001). Choose below what to get for each video: details, comments and/or danmaku. Add ?p=2 to a URL to get the danmaku of another part of a multi-part video.",
            "items": {
              "type": "string"
            }
          },
          "creatorIds": {
            "title": "Creator ids or space URLs",
            "type": "array",
            "description": "Creator UIDs (mid), e.g. 401742377, or links like https://space.bilibili.com/401742377. Returns the creator's videos, newest first. Creator profiles and follower lists are not scraped.",
            "items": {
              "type": "string"
            }
          },
          "scrapeVideoDetails": {
            "title": "Video details",
            "type": "boolean",
            "description": "For each video URL: title, description, views, likes, coins, favorites, shares, danmaku and comment counts, duration, parts and uploader.",
            "default": true
          },
          "scrapeComments": {
            "title": "Comments",
            "type": "boolean",
            "description": "For each video URL: top-level comments with text, likes, reply count, author name, author level, IP region and date.",
            "default": false
          },
          "scrapeDanmaku": {
            "title": "Danmaku (bullet comments)",
            "type": "boolean",
            "description": "For each video URL: the danmaku (弹幕) shown over the video, with text, video time, mode, color and send time. Billed per danmaku at a lower price.",
            "default": false
          },
          "maxResults": {
            "title": "Max videos per search or creator",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum videos per search keyword or creator. Search returns at most about 1,000 videos per keyword.",
            "default": 50
          },
          "maxComments": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum top-level comments per video (when Comments is on).",
            "default": 100
          },
          "sortOrder": {
            "title": "Search sort order",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow",
              "scores"
            ],
            "type": "string",
            "description": "How to sort search results (Search mode).",
            "default": "totalrank"
          },
          "durationFilter": {
            "title": "Search duration filter",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "4"
            ],
            "type": "string",
            "description": "Only videos of this length (search only).",
            "default": "0"
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "hot",
              "newest"
            ],
            "type": "string",
            "description": "Most liked (hot) or newest first.",
            "default": "hot"
          },
          "maxDanmakuPerVideo": {
            "title": "Max danmaku per video",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum danmaku per video (when Danmaku is on), in video-time order. Bilibili serves up to a few thousand of the most recent danmaku per video.",
            "default": 2000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many inputs to process in parallel. Keep it low: Bilibili rate-limits fast clients.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Leave empty for automatic proxies (direct first, then Apify datacenter, then residential when Bilibili blocks a request)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}