{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper – B站 Videos, Creators, Rankings & Comments",
    "description": "Get Bilibili (哔哩哔哩) data from keywords, video links, creator (UP主) links, the popular board or top-100 ranking. Returns video stats, tags, creator followers and likes; optional comments and danmaku. No login. $3 per 1,000 results; failures are free. · by TubeText",
    "version": "1.0",
    "x-build-id": "IvNCEfXATV3IOJECw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tubetext~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tubetext-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/tubetext~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tubetext-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/tubetext~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tubetext-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": {
          "keywords": {
            "title": "Search videos by keyword",
            "type": "array",
            "description": "One search per line, in Chinese or English (瑜伽, 原神, iPhone 17). Each keyword returns up to 1,000 videos.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "newest",
              "most_viewed",
              "most_favorited",
              "most_danmaku"
            ],
            "type": "string",
            "description": "Order of keyword search results.",
            "default": "relevance"
          },
          "duration": {
            "title": "Video length",
            "enum": [
              "any",
              "under_10_min",
              "10_30_min",
              "30_60_min",
              "over_60_min"
            ],
            "type": "string",
            "description": "Only return videos of this length (keyword search).",
            "default": "any"
          },
          "maxResultsPerKeyword": {
            "title": "Max videos per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Bilibili's search returns up to 1,000 videos per keyword (50 pages of 20).",
            "default": 50
          },
          "urls": {
            "title": "Video or creator links",
            "type": "array",
            "description": "Video links (bilibili.com/video/BV…, b23.tv links are not supported – paste the full link) for full stats and tags, or creator (UP主) links (space.bilibili.com/<id>) or numeric IDs for follower, like and video counts.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxUploadsPerCreator": {
            "title": "Uploads per creator link",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "For creator links (space.bilibili.com/<id>): also list up to this many of the creator's videos as Bilibili lists them on the creator page (recent uploads first, sorted by date within each page): views, danmaku, comments, duration, date. Co-created videos are marked isCollab. Each video is one result. 0 = creator row only.",
            "default": 0
          },
          "creatorKeywords": {
            "title": "Search creators (UP主) by keyword",
            "type": "array",
            "description": "Find creators by name or topic. Returns name, followers, video count, level and verification.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxCreatorsPerKeyword": {
            "title": "Max creators per keyword",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Up to 200 creators per keyword.",
            "default": 20
          },
          "includePopular": {
            "title": "Popular board (热门)",
            "type": "boolean",
            "description": "Videos on Bilibili's Popular page right now, with Bilibili's recommendation reason.",
            "default": false
          },
          "maxPopular": {
            "title": "Max popular videos",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many videos to take from the Popular board.",
            "default": 100
          },
          "includeRanking": {
            "title": "Site-wide ranking (排行榜)",
            "type": "boolean",
            "description": "Bilibili's top 100 videos of the last days, with full stats (views, likes, coins, favorites, shares).",
            "default": false
          },
          "commentsPerVideo": {
            "title": "Top comments per video",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Adds the top comments to each video (text, likes, replies, time; commenter names are not collected). Bilibili shows visitors who are not logged in at most 3 top comments per video, so expect up to 3. Charged only per comment delivered.",
            "default": 0
          },
          "danmakuPerVideo": {
            "title": "Danmaku (弹幕) per video",
            "minimum": 0,
            "maximum": 3000,
            "type": "integer",
            "description": "Adds up to this many danmaku (bullet comments) per video: text, time in the video and when it was sent (newest kept, sorted by video time). Sender IDs are not collected. Each danmaku is billed like a comment ($0.0005); 0 = off.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests run at the same time.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}