{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper (B站 / 哔哩哔哩)",
    "description": "Scrape Bilibili (B站 / 哔哩哔哩) without login or cookies: search videos by keyword, video stats (views, likes, coins, favorites, shares), tags, top comments, danmaku bullet comments, trending and top-100 lists, and creator (UP主) profiles with latest uploads. Pay per result.",
    "version": "0.1",
    "x-build-id": "qcelDU1cv3FoAaZ6C"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bossless~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bossless-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/bossless~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-bossless-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/bossless~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-bossless-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, in Chinese or English (e.g. 原神, minecraft). Each keyword returns up to 1,000 videos.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max videos per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop each keyword after this many videos. Bilibili serves at most 1,000 per keyword.",
            "default": 100
          },
          "searchSort": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "views",
              "newest",
              "danmaku",
              "favorites"
            ],
            "type": "string",
            "description": "Order of the search results.",
            "default": "relevance"
          },
          "videoUrls": {
            "title": "Video URLs or BV ids",
            "type": "array",
            "description": "Bilibili video links (https://www.bilibili.com/video/BV...) or bare BV ids. Each returns full stats.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "creatorUrls": {
            "title": "Creator URLs or user ids",
            "type": "array",
            "description": "Creator pages (https://space.bilibili.com/123456) or numeric user ids. Returns the creator profile with follower counts.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeLatestUploads": {
            "title": "Include creators' latest uploads",
            "type": "boolean",
            "description": "Also return each creator's most recent videos (roughly the last 10 posts; Bilibili hides older ones from logged-out visitors).",
            "default": true
          },
          "trending": {
            "title": "Trending videos",
            "enum": [
              "none",
              "popular",
              "ranking"
            ],
            "type": "string",
            "description": "Also scrape Bilibili's trending lists. 'Popular now' is the live hot list; 'Top 100 ranking' is the all-categories leaderboard.",
            "default": "none"
          },
          "maxTrendingResults": {
            "title": "Max trending videos",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of trending videos to return.",
            "default": 100
          },
          "fetchFullDetails": {
            "title": "Fetch full details for search results",
            "type": "boolean",
            "description": "Search results lack coins, shares and some tags. Turn on to fetch them (one extra request per video, slower). Video URLs, creators and trending always include full stats.",
            "default": false
          },
          "includeTopComments": {
            "title": "Include top comments",
            "type": "boolean",
            "description": "Attach the top comments to each video. Bilibili shows logged-out visitors at most 3 comments per video.",
            "default": false
          },
          "includeDanmaku": {
            "title": "Include danmaku (bullet comments)",
            "type": "boolean",
            "description": "Return the on-screen danmaku comments of each video as separate items (type 'danmaku'), sorted by video time.",
            "default": false
          },
          "maxDanmakuPerVideo": {
            "title": "Max danmaku per video",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum danmaku lines returned per video.",
            "default": 500
          },
          "danmakuDigest": {
            "title": "AI danmaku digest (paid add-on)",
            "type": "boolean",
            "description": "Adds a `danmakuDigest` to each video: when viewers reacted most (exact timestamps and counts), what they reacted to, overall sentiment, memes and slang explained in English, and themes. Reads all the video's danmaku (you don't need 'Include danmaku'). Charged once per digested video; skipped for videos with fewer than 20 danmaku. Free-plan runs include a 3-item AI trial.",
            "default": false
          },
          "aiEnrichment": {
            "title": "AI tags: sentiment, topics, entities, English summary (paid add-on)",
            "type": "boolean",
            "description": "Adds an `ai` field to each video: sentiment and score, topic labels, named entities and a one-sentence English summary, read from the title, description and tags. Charged once per tagged video. Free-plan runs include a 3-item AI trial.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}