{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper: videos, comments, creators (no login)",
    "description": "Bilibili videos by keyword or link: plays, likes, comments, favourites, tags, creator. Optional top comments per video and creator profiles with followers and verified title. Plain HTTP, no login, no cookie. Counts as Bilibili reports them. Not affiliated with Bilibili.",
    "version": "0.1",
    "x-build-id": "hQruZEQ9Ow22FEhw6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leadharbor~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leadharbor-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/leadharbor~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-leadharbor-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/leadharbor~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-leadharbor-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 words (videos)",
            "type": "array",
            "description": "Keywords to search Bilibili videos with, one per entry, in any language (Chinese words work as well as English ones). Each search returns video rows in the order Bilibili ranks them, up to Max videos per search word (Bilibili lists at most 1,000 results for a word, 50 pages of 20). The characters ! ' ( ) * are dropped from a search word before it is sent. The same video found twice in one run is delivered once.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort search results by",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow"
            ],
            "type": "string",
            "description": "How Bilibili orders the video search results. totalrank is Bilibili's default relevance order, click is most played, pubdate is newest first, dm is most bullet comments, stow is most favourited. Applies to Search words only.",
            "default": "totalrank"
          },
          "maxVideosPerQuery": {
            "title": "Max videos per search word",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many video rows to deliver for each search word, 1 to 1000. Bilibili lists at most 1,000 results (50 pages of 20) for a keyword. In relevance order about a quarter of them repeat a video seen on an earlier page (two tests: 737 and 726 different videos in 1,000 results), and repeats are delivered once, so you get fewer rows than the number you set. The most played and newest orders had far fewer repeats (1,000 and 362 different videos in 1,000 and 362 results). Applies to Search words only.",
            "default": 20
          },
          "videoUrls": {
            "title": "Video links or BV ids",
            "type": "array",
            "description": "Bilibili video links (bilibili.com/video/BV...) or bare BV ids such as BV1Dbsn6gEPz, one per entry. BV ids are case-sensitive: copy them exactly. b23.tv short links and old av links are not followed and get a free error row. Each video returns one row, including coins and shares, which search rows do not have. A missing, removed or paid-only video gets a free error row.",
            "items": {
              "type": "string"
            }
          },
          "creatorIds": {
            "title": "Creator ids or space links",
            "type": "array",
            "description": "Bilibili creator ids (the number in space.bilibili.com/<id>) or the space link itself. Each creator returns one profile row: name, bio, followers, following, level, verified title and video count. A missing creator gets a free error row.",
            "items": {
              "type": "string"
            }
          },
          "creatorSearchQueries": {
            "title": "Search words (creators)",
            "type": "array",
            "description": "Keywords to search Bilibili creators with, one per entry. Each search returns creator rows in the order Bilibili ranks them, up to Max creators per search word.",
            "items": {
              "type": "string"
            }
          },
          "maxCreatorsPerQuery": {
            "title": "Max creators per search word",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many creator rows to deliver for each creator search word, 1 to 1000. Applies to Search words (creators) only.",
            "default": 20
          },
          "maxCommentsPerVideo": {
            "title": "Comments per video",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "0 (default) returns no comments. A number from 1 to 1000 also returns that many top-level comments for every delivered video, as separate rows with type comment, each charged as one comment event. Replies under a comment are not returned (replyCount tells how many there are). Applies to every video row from search words and video links.",
            "default": 0
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "hot",
              "newest"
            ],
            "type": "string",
            "description": "hot returns the comments Bilibili ranks highest (most liked first, as its page shows them). newest returns the latest comments first. Only matters when Comments per video is above 0.",
            "default": "hot"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}