{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper — Videos, Comments, Danmaku & Creators",
    "description": "Bilibili (B站) data, no login: keyword search with sort and date filters, full video stats, comments with replies, danmaku, Popular and category top-100 lists, creator profiles and uploads. One row per item. Part of NexGen Signal — data tools and official-source data products",
    "version": "0.1",
    "x-build-id": "6YHuGTkXAhB3Pb9Vi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexgensignal~bilibili-video-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexgensignal-bilibili-video-data-api",
        "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/nexgensignal~bilibili-video-data-api/runs": {
      "post": {
        "operationId": "runs-sync-nexgensignal-bilibili-video-data-api",
        "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/nexgensignal~bilibili-video-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-nexgensignal-bilibili-video-data-api",
        "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": "What to collect",
            "enum": [
              "search",
              "video_detail",
              "comments",
              "danmaku",
              "popular",
              "ranking",
              "creator_profile",
              "creator_videos",
              "video",
              "creator"
            ],
            "type": "string",
            "description": "search uses Keyword. video_detail, comments and danmaku use Video links. creator_profile and creator_videos use Creators. popular and ranking need nothing else.",
            "default": "search"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Search words, in Chinese or English (search mode).",
            "default": "游戏"
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "video",
              "creator"
            ],
            "type": "string",
            "description": "video = video search; creator = creator (UP主) channel search.",
            "default": "video"
          },
          "sortOrder": {
            "title": "Video sort",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow",
              "scores"
            ],
            "type": "string",
            "description": "Order of video search results.",
            "default": "totalrank"
          },
          "creatorSortOrder": {
            "title": "Creator sort",
            "enum": [
              "default",
              "fans",
              "level"
            ],
            "type": "string",
            "description": "Order of creator search results.",
            "default": "default"
          },
          "durationFilter": {
            "title": "Video length",
            "enum": [
              "any",
              "under10",
              "10to30",
              "30to60",
              "over60"
            ],
            "type": "string",
            "description": "Video search only.",
            "default": "any"
          },
          "publishedAfter": {
            "title": "Published on or after",
            "type": "string",
            "description": "Video search only. Date like 2026-09-01."
          },
          "publishedBefore": {
            "title": "Published on or before",
            "type": "string",
            "description": "Video search only. Date like 2026-09-30."
          },
          "videoUrls": {
            "title": "Video links",
            "type": "array",
            "description": "BV ids, av ids, bilibili.com/video links or b23.tv short links (video_detail, comments, danmaku modes).",
            "items": {
              "type": "string"
            }
          },
          "creators": {
            "title": "Creators",
            "type": "array",
            "description": "Creator names, UIDs or space.bilibili.com links. creator_videos needs the name (uploads are found through search by name).",
            "items": {
              "type": "string"
            }
          },
          "rankingCategory": {
            "title": "Ranking category",
            "enum": [
              "all",
              "animation",
              "music",
              "games",
              "entertainment",
              "knowledge",
              "tech",
              "kichiku",
              "dance",
              "fashion",
              "life",
              "food",
              "animals",
              "film_tv",
              "cars",
              "sports"
            ],
            "type": "string",
            "description": "Bilibili's daily top-100 list for this category (ranking mode).",
            "default": "all"
          },
          "max_results": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum records delivered in total (videos, creators, comments and danmaku all count).",
            "default": 30
          },
          "fetchFullDetails": {
            "title": "Full video details",
            "type": "boolean",
            "description": "For search, popular, ranking and creator videos: also read each video's page for likes, coins, shares, tags and the creator's follower count (slower).",
            "default": false
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Also deliver each video's comments as separate rows (with username and user ID).",
            "default": false
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Deliver replies under each comment too.",
            "default": true
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "hot",
              "time"
            ],
            "type": "string",
            "description": "Order of comments.",
            "default": "hot"
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Comments plus replies per video. Logged-out Bilibili shows the top comments (usually 3) and up to 20 replies under each.",
            "default": 50
          },
          "includeDanmaku": {
            "title": "Include danmaku",
            "type": "boolean",
            "description": "Also deliver each video's danmaku (on-screen comments) as rows, sampled evenly across the video.",
            "default": false
          },
          "danmakuSampleSize": {
            "title": "Danmaku per video",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Danmaku rows per video, spread evenly over the timeline.",
            "default": 200
          },
          "includeDanmakuSummary": {
            "title": "Danmaku summary on each video",
            "type": "boolean",
            "description": "Free: add busiest minute, most repeated lines and positive/negative share to each video row.",
            "default": false
          },
          "addonSentimentScored": {
            "title": "Add-on: sentiment scored",
            "type": "boolean",
            "description": "Add a sentiment score to each row: title and description for videos, the text for comments and danmaku (billed per record).",
            "default": false
          },
          "addonSocialHandlesExtracted": {
            "title": "Add-on: social handles extracted",
            "type": "boolean",
            "description": "Extract public social handles/links from video and creator descriptions, never emails or phones (billed per video or creator record only).",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}