{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper | Videos, Comments, Profiles, Danmaku",
    "description": "Bilibili scraper for videos, comments, real danmaku text, creators and live status. Search by keyword or paste video URLs or creator IDs. 58 rows in 29 seconds, 45 fields per video: views, likes, coins, favorites, reply threads, creator followers, sentiment. No login, no API key. Export JSON or CSV.",
    "version": "1.0",
    "x-build-id": "AEggCEYL0nbKAYCGV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/silentflow~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-silentflow-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/silentflow~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-silentflow-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/silentflow~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-silentflow-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "search_users",
              "video_detail",
              "video_comments",
              "video_danmaku",
              "user_videos",
              "user_profile",
              "live_info",
              "popular"
            ],
            "type": "string",
            "description": "What to scrape from Bilibili. Search videos and Search creators use the search query; Video details, Video comments and Video danmaku use the video URLs; Creator videos, Creator profiles and Live status use the creator IDs.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword to search. Works in Chinese (人工智能) and English (AI tutorial). Used in 'Search videos' and 'Search creators' modes."
          },
          "videoUrls": {
            "title": "Video URLs or BVIDs",
            "type": "array",
            "description": "Bilibili video URLs or BV IDs. Used in 'Video details', 'Video comments', and 'Video danmaku' modes. Example: https://www.bilibili.com/video/BV1bx411M7Zx or BV1bx411M7Zx",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "Creator IDs (mid)",
            "type": "array",
            "description": "Bilibili creator numeric IDs (mid). Used in 'Creator videos', 'Creator profiles' and 'Live status' modes. Find a creator's mid in their profile URL: space.bilibili.com/{mid}",
            "items": {
              "type": "string"
            }
          },
          "sortOrder": {
            "title": "Sort order (search)",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow",
              "scores"
            ],
            "type": "string",
            "description": "How to sort video search results.",
            "default": "totalrank"
          },
          "creatorSort": {
            "title": "Sort creators (creator search)",
            "enum": [
              "relevance",
              "followers"
            ],
            "type": "string",
            "description": "How to order a 'Search creators' run. 'Most followers first' lists the biggest creators of a topic first, the way Bilibili's creator search sorts by followers: the quickest way to a KOL shortlist.",
            "default": "relevance"
          },
          "durationFilter": {
            "title": "Duration filter (search)",
            "enum": [
              "any",
              "short",
              "medium",
              "long",
              "verylong"
            ],
            "type": "string",
            "description": "Filter video search results by length.",
            "default": "any"
          },
          "pubtimeBegin": {
            "title": "Published after (search)",
            "type": "string",
            "description": "Only videos published on or after this date (YYYY-MM-DD). Leave empty for no filter."
          },
          "pubtimeEnd": {
            "title": "Published before (search)",
            "type": "string",
            "description": "Only videos published on or before this date (YYYY-MM-DD). Leave empty for no filter."
          },
          "category": {
            "title": "Category (popular)",
            "enum": [
              "all",
              "anime",
              "chinese_anime",
              "documentary",
              "movie",
              "tv_series",
              "variety",
              "animation",
              "game",
              "kichiku",
              "music",
              "dance",
              "film_tv",
              "entertainment",
              "knowledge",
              "tech",
              "food",
              "car",
              "fashion",
              "sports",
              "animal",
              "life"
            ],
            "type": "string",
            "description": "Which Bilibili ranking to return in 'Popular / trending' mode, the same tabs as bilibili.com's ranking page. 'All categories' is the trending list. Anime, Chinese animation, documentaries, movies, TV series and variety shows rank whole series and films: one row per series with its rank, score, followers and newest episode.",
            "default": "all"
          },
          "autoLocalize": {
            "title": "Auto-localize brand names",
            "type": "boolean",
            "description": "When on, a Latin brand name (e.g. 'Nike') also searches its Chinese name ('耐克') and results are merged, so you get full native recall even when searching in English. Add your own variants below.",
            "default": true
          },
          "searchAliases": {
            "title": "Search aliases",
            "type": "array",
            "description": "Extra term variants to also search and merge with your query (e.g. add '耐克' for Nike).",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of results. A keyword search goes past Bilibili's ~1,000 results per query: it keeps going by publish date, newest first, up to 5,000 videos. Comments added with 'Add comments' come on top, up to the per-video limit.",
            "default": 100
          },
          "maxComments": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Comments per video, in 'Video comments' mode and for every video when 'Add comments' is on. Replies count in it. Raise it for full threads (up to 1,000).",
            "default": 20
          },
          "sortComments": {
            "title": "Sort comments by",
            "enum": [
              "hot",
              "likes",
              "time"
            ],
            "type": "string",
            "description": "How to sort comments (Hot recommended). Used in 'Video comments' mode.",
            "default": "hot"
          },
          "maxDanmaku": {
            "title": "Max danmaku per video",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum danmaku (弹幕) to return per video. Used in 'Video danmaku' mode. 0 uses a sensible default.",
            "default": 0
          },
          "includeComments": {
            "title": "Add comments",
            "type": "boolean",
            "description": "Also get the comments of every video a run returns (Search videos, Video details, Creator videos, Popular), each one its own row linked to its video by <code>videoBvid</code>, up to <b>Max comments per video</b>. With <b>Delta mode</b> and <b>Follow-up comments</b>, later runs also bring the new comments of videos already delivered.",
            "default": false
          },
          "includeReplies": {
            "title": "Full reply threads",
            "type": "boolean",
            "description": "Bilibili shows only the top few comments of a video publicly; most of the conversation sits in their reply threads. Turn this on to read every reply, each its own row with <code>isThreadReply</code> and its root in <code>parentCommentId</code>, up to <b>Max comments per video</b>.",
            "default": false
          },
          "includeDanmaku": {
            "title": "Danmaku reaction metrics",
            "type": "boolean",
            "description": "Add danmaku (弹幕) metrics to each video row at no extra row: danmaku read, unique senders, danmaku per minute, the peak minute, first and last danmaku, a minute-by-minute curve and a sample of texts spread over the video.",
            "default": false
          },
          "danmakuSampleSize": {
            "title": "Danmaku sample size",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "How many danmaku texts each video row carries with <b>Danmaku reaction metrics</b>, spread evenly over the video (not the first ones). Up to 500. Every danmaku of a video, one row each, is the 'Video danmaku' mode.",
            "default": 20
          },
          "sentimentAnalysis": {
            "title": "Sentiment analysis",
            "type": "boolean",
            "description": "Tag each video, comment, and danmaku with Chinese sentiment: polarity (positive / neutral / negative) and a score from -1.0 to +1.0.",
            "default": false
          },
          "deltaMode": {
            "title": "Delta mode (only new videos since last run)",
            "type": "boolean",
            "description": "Turn a keyword search or a Popular / trending list into a recurring monitor: each run returns only the videos (or series) no earlier run delivered. On a trending list or ranking, that is what newly entered it. Pair with an Apify Schedule for a hands-off daily feed. Used in 'Search videos' and 'Popular / trending' modes.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Names the saved 'already-seen' list so independent monitors do not collide. Use a distinct name per query you track (for example 'genshin'); a trending monitor keeps one list per category. The list is kept in your account between runs. Only used when Delta mode is on.",
            "default": "default"
          },
          "followUpComments": {
            "title": "Follow-up comments",
            "type": "boolean",
            "description": "For a <b>Delta mode</b> search with <b>Add comments</b>: each run also returns the comments posted since the last run on the videos delivered in the last 7 days, marked <code>isFollowUp</code>, up to <b>Max comments per video</b> each.",
            "default": false
          },
          "debugMode": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Enable verbose diagnostic logging.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}