{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Comments Scraper: Replies, Danmaku (哔哩哔哩, B站评论)",
    "description": "Scrape Bilibili comments, replies and danmaku logged out: every comment of a video to the list's end, plus video stats. Give video links, BV ids, search words, creators or the popular board. One row per comment: text, likes, replies, the commenter's level and VIP. Misses free.",
    "version": "0.1",
    "x-build-id": "khuFhPS0WvW8nUEOI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hyperbach~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hyperbach-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/hyperbach~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hyperbach-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/hyperbach~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hyperbach-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": {
          "videoUrls": {
            "title": "Video links or ids",
            "maxItems": 5000,
            "type": "array",
            "description": "Bilibili videos whose comments you want: a link (www.bilibili.com/video/BV…, /video/av…, m.bilibili.com, a b23.tv short link) or a bare BV or av id. `?p=2` picks the part for the danmaku. A value that names no video gets a free row that says why.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search words",
            "maxItems": 500,
            "type": "array",
            "description": "Words to search Bilibili's videos for (one search per line). Each video found is a row; turn on `includeComments` to read each found video's comments too. The source serves at most 1,000 results a search.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "Creators (mid or space link)",
            "maxItems": 500,
            "type": "array",
            "description": "Creators whose videos you want, newest first: a numeric mid or a space.bilibili.com/<mid> link. Each video is a row; turn on `includeComments` to read their comments too.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "popular": {
            "title": "Popular board",
            "type": "boolean",
            "description": "Read Bilibili's popular board (the videos it lists now). Each video is a row; turn on `includeComments` to read their comments too.",
            "default": false
          },
          "maxComments": {
            "title": "Max comments per video",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "The most comment rows of one video, replies included. 0 = no comments (the video's row only). For every comment, give a number above the video's comment count: the input row then says COMPLETE or LIST_END against the source's own count.",
            "default": 100
          },
          "sortComments": {
            "title": "Comment order",
            "enum": [
              "hot",
              "newest",
              "time",
              "likes"
            ],
            "type": "string",
            "description": "Hot (the source's ranking, mostly by likes) or newest first. `time` and `likes` are read as newest and hot: the source has no likes order. A date window always reads the newest order.",
            "default": "hot"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Every reply as its own comment row, right after its comment, with `rootRpid` and `parentRpid`. Replies count toward `maxComments`.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "With `includeReplies`: the most replies of one comment. 0 = all of them.",
            "default": 0
          },
          "includeComments": {
            "title": "Comments of searched, creator and popular videos",
            "type": "boolean",
            "description": "Read the comments of every video a search, a creator or the popular board gives (up to `maxComments` each). Video links always get their comments.",
            "default": false
          },
          "maxVideos": {
            "title": "Max videos per search, creator or board",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most video rows of one search, one creator or the popular board (at most 1,000: the source serves no more a search).",
            "default": 50
          },
          "includeVideoDetails": {
            "title": "Video row for each video link",
            "type": "boolean",
            "description": "For a video link: read the video's own record, deliver its row (views, likes, coins, favorites, shares, danmaku and comment counts, parts) and put its title on every comment row. Off: comment rows only, `videoTitle` empty. A searched, creator or popular video's row comes from its list.",
            "default": true
          },
          "sortOrder": {
            "title": "Search order",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow",
              "scores"
            ],
            "type": "string",
            "description": "The order of a search's results, as the source sorts them.",
            "default": "totalrank"
          },
          "durationFilter": {
            "title": "Search video length",
            "enum": [
              "any",
              "short",
              "medium",
              "long",
              "verylong"
            ],
            "type": "string",
            "description": "Only videos of this length in a search.",
            "default": "any"
          },
          "pubtimeBegin": {
            "title": "Search: published from",
            "type": "string",
            "description": "Only videos published on or after this date in a search: 2026-11-01, 2026-11-01T08:00:00Z or 30 days."
          },
          "pubtimeEnd": {
            "title": "Search: published until",
            "type": "string",
            "description": "Only videos published on or before this date in a search (a bare date counts the whole day)."
          },
          "includeDanmaku": {
            "title": "Danmaku profile",
            "type": "boolean",
            "description": "One danmaku profile row per video: the danmaku kept of the video's total, unique senders, the rate per minute, the peak minute, the counts per minute, the most repeated texts and a sample over the timeline. The source serves its live pool (3,600 of 4,643 on our test video), not the whole history.",
            "default": false
          },
          "maxDanmaku": {
            "title": "Danmaku rows per video",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "With `includeDanmaku`: also deliver up to this many danmaku of each video as their own rows (the text, the second in the video, mode, colour, size, send time, the sender's hash). 0 = the profile only.",
            "default": 0
          },
          "danmakuSampleSize": {
            "title": "Danmaku sample size",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Texts in the profile's sample, spread evenly over the timeline.",
            "default": 25
          },
          "allParts": {
            "title": "Danmaku of every part",
            "type": "boolean",
            "description": "Read the danmaku of every part of a multi-part video (the rows and the profile in time order over every part). Off: the part the link names (`?p=`), else part 1.",
            "default": false
          },
          "danmakuStartSec": {
            "title": "Danmaku from second",
            "minimum": 0,
            "type": "integer",
            "description": "Only danmaku at or after this second of the video."
          },
          "danmakuEndSec": {
            "title": "Danmaku before second",
            "minimum": 0,
            "type": "integer",
            "description": "Only danmaku before this second of the video."
          },
          "commentsNewerThan": {
            "title": "Only comments from",
            "type": "string",
            "description": "Only comments posted on or after this date: 2026-11-01, 2026-11-01T08:00:00Z or 7 days. The walk reads the newest order and stops at the bound; a comment outside the window is free."
          },
          "commentsOlderThan": {
            "title": "Only comments until",
            "type": "string",
            "description": "Only comments posted on or before this date (a bare date counts the whole day)."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only comments with at least this many likes. A comment left out is free and takes no room.",
            "default": 0
          },
          "textContains": {
            "title": "Text contains",
            "type": "array",
            "description": "Only comments (and danmaku rows) whose text contains any of these words, case-insensitive. A row left out is free.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pseudonymizeAuthors": {
            "title": "Pseudonymize commenters",
            "type": "boolean",
            "description": "Replace each commenter's name, mid and avatar (and mentioned users, also as `@name` in the text) with `authorKey`, a stable hash for your account.",
            "default": false
          },
          "sentimentAnalysis": {
            "title": "Sentiment of each comment",
            "type": "boolean",
            "description": "Score each delivered comment from -1 (negative) to 1 (positive) with a confidence and a label. A model reads the Chinese text and its emote codes; on 20 real comments it read about 14 right by eye, weakest on sarcasm and teasing, so use the confidence to drop unsure answers.",
            "default": false
          },
          "mode": {
            "title": "Job type (optional, the leader's names)",
            "enum": [
              "search",
              "video_detail",
              "video_comments",
              "user_videos",
              "user_profile",
              "popular"
            ],
            "type": "string",
            "description": "Optional: the job names of the leading Bilibili scraper, so its saved inputs run here as they are. You do not need it: the inputs you fill decide the job. `popular` reads the popular board, `video_detail` gives each video's row with no comments (maxComments 0), `user_profile` is not read (a creator's videos come from userIds); the others follow your inputs."
          },
          "maxItems": {
            "title": "Max results (whole run)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "The most charged rows of the whole run (comments, videos, danmaku and profiles); 0 = no cap beyond your charge limit.",
            "default": 0
          },
          "feedback": {
            "title": "Feedback to the maintainers",
            "maxLength": 2000,
            "type": "string",
            "description": "A note to the people who maintain this Actor: what you needed and did not get. For example a missing field, a wrong or empty result, or the Actor you switch from or to, and why. The run does not read it: the rows and the charges stay the same. A person reads every note."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}