{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper | Videos, Comments, Danmaku & Uploaders",
    "description": "Get Bilibili videos with views, likes, coins, tags and uploader, UP主 profiles with follower counts, comments with replies, danmaku, the top 100 ranking, popular feed and hot searches. Mix keywords, video and uploader URLs in one run, no login.",
    "version": "0.0",
    "x-build-id": "UtqKaeMbpRb59VAIJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/genial_candlestand~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-genial_candlestand-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/genial_candlestand~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-genial_candlestand-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/genial_candlestand~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-genial_candlestand-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": {
          "queries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords to search on Bilibili, one per line, in Chinese or English (e.g. 原神, minecraft). Each keyword is searched once per value of 'Search for', up to 1000 results per keyword (Bilibili's cap). Leave empty if you only scrape videos, uploaders or charts.",
            "items": {
              "type": "string"
            }
          },
          "searchTypes": {
            "title": "Search for",
            "type": "array",
            "description": "What the keywords find: videos, uploader (UP) profiles, or both. Applies only to 'Search keywords'.",
            "items": {
              "type": "string",
              "enum": [
                "video",
                "user"
              ],
              "enumTitles": [
                "Videos",
                "Uploaders (users)"
              ]
            },
            "default": [
              "video"
            ]
          },
          "searchSort": {
            "title": "Video search sort",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow",
              "scores"
            ],
            "type": "string",
            "description": "Order of video search results. Applies only to video search; uploader search always uses Bilibili's relevance order.",
            "default": "totalrank"
          },
          "searchDuration": {
            "title": "Video length filter",
            "enum": [
              "any",
              "under10",
              "10to30",
              "30to60",
              "over60"
            ],
            "type": "string",
            "description": "Keep only videos of this length. Applies only to video search.",
            "default": "any"
          },
          "dateFrom": {
            "title": "Published after",
            "type": "string",
            "description": "Video search only: keep videos published on or after this date (YYYY-MM-DD, or relative like '30 days'). Leave empty for no lower bound. Must not be later than 'Published before'."
          },
          "dateTo": {
            "title": "Published before",
            "type": "string",
            "description": "Video search only: keep videos published on or before this date (YYYY-MM-DD, or relative like '1 day'). Leave empty for 'now'."
          },
          "maxResultsPerQuery": {
            "title": "Max results per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many results to take for each keyword and search type (20 per page). Bilibili never returns more than 1000 per keyword; use different sorts or date ranges to get more.",
            "default": 20
          },
          "videos": {
            "title": "Video URLs or IDs",
            "type": "array",
            "description": "Videos to scrape with full stats and tags: bilibili.com/video/BV… or …/video/av… URLs, bare BV ids (BV1tKWu6YEka), av ids (av170001) or b23.tv short links. Comments and danmaku are fetched for these videos.",
            "items": {
              "type": "string"
            }
          },
          "uploaders": {
            "title": "Uploader URLs or IDs",
            "type": "array",
            "description": "Uploaders (UP主) to scrape: space.bilibili.com/<id> URLs or numeric user ids. Each gives one profile row (followers, likes, video count) plus their latest uploads, see 'Max videos per uploader'.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerUploader": {
            "title": "Max videos per uploader",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Latest uploads to list for each uploader, newest first (all pages are walked, so the full catalogue is reachable). 0 = profile row only.",
            "default": 20
          },
          "charts": {
            "title": "Charts and trending",
            "type": "array",
            "description": "Site-wide lists to add: the all-site top 100 ranking, the popular (trending) feed and the current hot search keywords.",
            "items": {
              "type": "string",
              "enum": [
                "ranking",
                "popular",
                "hotSearch"
              ],
              "enumTitles": [
                "Top 100 ranking",
                "Popular videos",
                "Hot search keywords"
              ]
            },
            "default": []
          },
          "maxPopularVideos": {
            "title": "Max popular videos",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many videos to take from the popular feed (20 per page). Applies only when 'Popular videos' is selected in 'Charts and trending'.",
            "default": 20
          },
          "videoDetails": {
            "title": "Full details for found videos",
            "type": "boolean",
            "description": "Also open every video found by search, uploader lists and charts to add coins, shares, likes, tags and parts (2 extra requests per video, slower). Needed for comments and danmaku of found videos. Videos from 'Video URLs or IDs' always get full details.",
            "default": false
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Comments per video, top comments first, each followed by its replies. 0 = none. Logged-out visitors see only 3 top comments per sort and 20 replies to each, so expect at most about 63 per sort. Applies to 'Video URLs or IDs', and to found videos when full details are on.",
            "default": 0
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "hot",
              "newest",
              "both"
            ],
            "type": "string",
            "description": "Which top comments to take: hottest, newest, or both (about twice as many, duplicates removed). Applies only when 'Max comments per video' is above 0.",
            "default": "hot"
          },
          "maxDanmakuPerVideo": {
            "title": "Max danmaku per video",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Danmaku (bullet comments over the video) to fetch per video from its first part, with video time, colour and send time. 0 = none. Bilibili serves the latest pool only, usually 600–3600 per video. Applies like comments.",
            "default": 0
          },
          "maxItems": {
            "title": "Max rows in total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the whole run after this many dataset rows of any type (videos, uploaders, comments, danmaku, hot keywords). Every row is charged.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy is the default and works best on Bilibili (blocked requests move to a new IP automatically). Residential is slower here and not needed.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}