{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper - Videos, Comments, Danmaku & Creators",
    "description": "[$2.00 / 1K videos] Scrape Bilibili without login: keyword search, full video stats, top comments, raw danmaku with timestamps, creator search by niche and full upload lists. No start fee.",
    "version": "0.1",
    "x-build-id": "wIJmj4RRSFaEhvGpn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/webdata_labs~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-webdata_labs-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/webdata_labs~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-webdata_labs-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/webdata_labs~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-webdata_labs-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 Bilibili videos for, for example \"原神\" or \"iPhone 17\". Chinese keywords return far more results than English ones. Each keyword is searched separately.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video links",
            "type": "array",
            "description": "Bilibili video links, BV ids (BV1xx411c7mD), av ids (av170001) or b23.tv short links. Each returns its full stats and, if switched on, its comments and danmaku.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "creatorIds": {
            "title": "Creators (UID or space link)",
            "type": "array",
            "description": "Creator UIDs (946974) or space.bilibili.com links. Each returns the creator's profile (followers, likes, video count, verification) plus their uploads, newest first.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "creatorSearchQueries": {
            "title": "Find creators by keyword",
            "type": "array",
            "description": "Keywords to search Bilibili creators (UP主) for, for example \"数码\" or \"美妆\". Returns one row per creator with followers, video count, level and verification.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "trending": {
            "title": "Trending board",
            "enum": [
              "none",
              "popular",
              "ranking"
            ],
            "type": "string",
            "description": "Also scrape one of Bilibili's trending boards. \"popular\" is the live 综合热门 feed, \"ranking\" is the top-100 排行榜.",
            "default": "none"
          },
          "maxVideosPerSource": {
            "title": "Maximum videos per keyword, creator or board",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many videos to return for each search keyword, each creator and the trending board. Bilibili serves at most about 1,000 per keyword.",
            "default": 20
          },
          "maxCreatorsPerQuery": {
            "title": "Maximum creators per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many creators to return for each creator-search keyword.",
            "default": 20
          },
          "creatorSortBy": {
            "title": "Sort creators by",
            "enum": [
              "fans",
              "relevance",
              "level"
            ],
            "type": "string",
            "description": "Order of creator search results. \"Most followers\" surfaces the established creators in a niche; \"Relevance\" favours exact name matches.",
            "default": "fans"
          },
          "sortBy": {
            "title": "Sort videos by",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow"
            ],
            "type": "string",
            "description": "Order of keyword search results.",
            "default": "totalrank"
          },
          "durationFilter": {
            "title": "Video length",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "4"
            ],
            "type": "string",
            "description": "Only return keyword search results of this length.",
            "default": "0"
          },
          "publishedAfter": {
            "title": "Published on or after",
            "type": "string",
            "description": "Only return keyword search results published on or after this date (YYYY-MM-DD, China time). Also the way to reach past the ~1,000-per-keyword cap: split a long period into several windows."
          },
          "publishedBefore": {
            "title": "Published on or before",
            "type": "string",
            "description": "Only return keyword search results published on or before this date (YYYY-MM-DD, China time)."
          },
          "fetchVideoDetails": {
            "title": "Fetch full video stats",
            "type": "boolean",
            "description": "Open each video for likes, coins, shares, exact favourites, originality and part count, and compute an engagement rate. One extra request per video; turn off for a faster, search-fields-only pull.",
            "default": true
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Return each video's top comments, ranked the way Bilibili ranks them, with likes, reply count, author level and whether the uploader wrote or pinned it. Each comment is a billed row.",
            "default": false
          },
          "maxCommentsPerVideo": {
            "title": "Maximum comments per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Caps the comment rows for each video. Comments come 20 per page.",
            "default": 20
          },
          "includeDanmaku": {
            "title": "Include danmaku (弹幕)",
            "type": "boolean",
            "description": "Return the on-screen danmaku comments, each with the second of the video it was sent at, and add a reaction profile to the video row (danmaku fetched, unique senders, peak minute).",
            "default": false
          },
          "maxDanmakuPerVideo": {
            "title": "Maximum danmaku rows per video",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Caps the danmaku rows for each video, sampled evenly across the whole timeline. Set 0 to get only the reaction profile on the video row, with no danmaku rows.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}