{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper",
    "description": "Bilibili Scraper SD - Bilibili Scraper is a social media data tool that extracts public Bilibili (哔哩哔哩) videos from search, video details, full comment threads, creator videos and profiles, popular and zone rankings and hot searches, with views, likes, coins, danmaku and tags. No login.",
    "version": "1.0",
    "x-build-id": "HGvVEeb1nuDYiufyy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-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/neuro-scraper~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-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/neuro-scraper~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "video_detail",
              "video_comments",
              "user_videos",
              "user_profile",
              "popular",
              "hot_searches"
            ],
            "type": "string",
            "description": "What to scrape. Search uses 'Search keywords'; video details and video comments use 'Video URLs or BV ids'; user videos and user profiles use 'User IDs or space URLs'; popular uses 'Category'; hot searches needs no input.",
            "default": "search"
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Mode 'search': one keyword per line, Chinese or English (e.g. 原神, 人工智能教程, python). Bilibili returns up to 50 pages of 20 videos (about 1,000) per keyword; the Actor follows the pages until Max items.",
            "items": {
              "type": "string"
            }
          },
          "sortOrder": {
            "title": "Sort order (search)",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow",
              "scores"
            ],
            "type": "string",
            "description": "Mode 'search': Bilibili's own sort order (sent to the search, as on search.bilibili.com).",
            "default": "totalrank"
          },
          "durationFilter": {
            "title": "Video length (search)",
            "enum": [
              "any",
              "short",
              "medium",
              "long",
              "verylong"
            ],
            "type": "string",
            "description": "Mode 'search': Bilibili's own length filter.",
            "default": "any"
          },
          "pubtimeBegin": {
            "title": "Published on/after",
            "type": "string",
            "description": "Only videos published on or after this date (YYYY-MM-DD, China time). In 'search' it is sent to Bilibili's search (both bounds are always sent - the missing one becomes 2009-06-26 / today); in the other video lists it is applied by the Actor."
          },
          "pubtimeEnd": {
            "title": "Published on/before",
            "type": "string",
            "description": "Only videos published on or before this date (YYYY-MM-DD, China time). Same handling as 'Published on/after'."
          },
          "videoUrls": {
            "title": "Video URLs or BV ids",
            "type": "array",
            "description": "Modes 'video_detail' and 'video_comments': one per line - a video link (https://www.bilibili.com/video/BV1DRHU6LELy), a BV id (BV1DRHU6LELy), an av id (av117403820230630) or a b23.tv short link.",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "User IDs or space URLs",
            "type": "array",
            "description": "Modes 'user_videos' and 'user_profile': one per line - a numeric user id (mid, e.g. 178778949) or a space link (https://space.bilibili.com/178778949). 'user_videos' gives one profile row and then the creator's uploads, newest first, page by page (30 per page) until Max items.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category (popular)",
            "enum": [
              "all",
              "douga",
              "game",
              "kichiku",
              "music",
              "dance",
              "cinephile",
              "ent",
              "knowledge",
              "tech",
              "information",
              "food",
              "shortplay",
              "car",
              "fashion",
              "sports",
              "animal",
              "vlog",
              "painting",
              "ai",
              "home",
              "outdoors",
              "gym",
              "handmake",
              "travel",
              "rural",
              "parenting",
              "health",
              "emotion",
              "life_joy",
              "life_experience"
            ],
            "type": "string",
            "description": "Mode 'popular': 'All' = the 综合热门 popular list (paged, 20 per page). A category = that zone's ranking list (排行榜, up to 100 videos). Zone ids are read from Bilibili's own site menu on every run.",
            "default": "all"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stops after this many rows in total (videos, comments, profiles). Every list follows Bilibili's own next page / cursor until this number or the end of the list. 'maxResults' is accepted as the same setting.",
            "default": 40
          },
          "includeComments": {
            "title": "Also scrape comments for each video",
            "type": "boolean",
            "description": "Adds comment rows (type 'comment') after each video row in search, video details, user videos and popular.",
            "default": false
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Top-level comments per video, 20 per page following Bilibili's comment cursor (also used by mode 'video_comments').",
            "default": 20
          },
          "sortComments": {
            "title": "Sort comments by",
            "enum": [
              "hot",
              "time"
            ],
            "type": "string",
            "description": "Order of the top-level comments (Bilibili's own sort).",
            "default": "hot"
          },
          "includeReplies": {
            "title": "Expand comment threads (replies)",
            "type": "boolean",
            "description": "Adds the replies of every top-level comment (楼中楼) as rows with rootCommentId set, 20 per page.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Replies per top-level comment when 'Expand comment threads' is on.",
            "default": 20
          },
          "fetchDetails": {
            "title": "Full video details for list rows",
            "type": "boolean",
            "description": "One extra request (plus one for tags) per video in search, user videos and popular, to fill coins, shares, tags, cid and all counters. Search rows already carry views, likes, favorites, danmaku and comments; user-video rows carry views only.",
            "default": false
          },
          "includeDanmaku": {
            "title": "Add a danmaku profile per video",
            "type": "boolean",
            "description": "Reads each video's public danmaku (弹幕) pool (1,200 per video on 2026-10-09; on long videos it can cover only part of the timeline) and adds: danmaku fetched, unique senders, danmaku per minute of the covered span, peak minute, first/last time and a text sample.",
            "default": false
          },
          "danmakuSampleSize": {
            "title": "Danmaku text samples per video",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many danmaku texts (spread over the video timeline) go into danmakuSample.",
            "default": 25
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies (the default) are recommended. Bilibili answered from a home connection in Bangladesh and from residential IPs in the US and Hong Kong (measured 2026-10-09).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}