{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper - Videos, Danmaku, Comments & Translation",
    "description": "Bilibili scraper (哔哩哔哩, B站) with no login: keyword search, video stats and tags, creator channels, related videos and every stored danmaku (bullet comment) as its own row with a reaction profile. Paid plans add English translation and AI summaries of what viewers said.",
    "version": "1.0",
    "x-build-id": "N1FExY004bMnoWYQU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ntriqpro~bilibili-video-danmaku-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ntriqpro-bilibili-video-danmaku-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/ntriqpro~bilibili-video-danmaku-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ntriqpro-bilibili-video-danmaku-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/ntriqpro~bilibili-video-danmaku-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ntriqpro-bilibili-video-danmaku-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": "Keywords (Bilibili search)",
            "maxItems": 200,
            "type": "array",
            "description": "Video searches, one per entry. Chinese keywords find far more than English ones (特斯拉 rather than Tesla, 泡泡玛特 rather than Pop Mart). Each keyword gives video rows, the danmaku and comments of those videos, and one keyword result row (totals, date range, top channels). Paid Apify plans read up to 200 targets per run and up to 1,000 videos per search (more with date windows). Free plan runs are a preview: 2 targets, 5 videos each, 20 danmaku and 1 comment per video. Charged per keyword checked ($0.004), per video ($0.003 + $0.004 for its detail) and per danmaku row ($0.0005).",
            "items": {
              "type": "string"
            }
          },
          "videos": {
            "title": "Videos",
            "maxItems": 200,
            "type": "array",
            "description": "Single videos: a BV number (BV1GJ411x7h7), an av number (av170001) or a bilibili.com video address. Only the id is taken from an address — the Actor builds its own requests. b23.tv short links are not accepted. A video that does not exist is answered with a row saying so.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channels (creators)",
            "maxItems": 200,
            "type": "array",
            "description": "Creator channels: a mid (491190876) or a space.bilibili.com address. Each gives one channel row (followers, video count, posting rhythm, average and median views, top videos) and the channel's videos, newest first, with their danmaku and comments.",
            "items": {
              "type": "string"
            }
          },
          "includeTrending": {
            "title": "Also read the popular list",
            "type": "boolean",
            "description": "Adds the videos of Bilibili's popular list (site-wide, newest ranking) as video rows marked discoveredVia: trending, up to the videos-per-source limit. Default: off."
          },
          "include": {
            "title": "Row kinds",
            "type": "array",
            "description": "Which kinds of rows to return. Default: videos, details, danmaku, danmakuProfile and comments. details adds coins, shares, tags and parts to each video row ($0.004 per video, charged once per video even when video rows are off — then with the first danmaku, profile, comment or related row of that video; read anyway when danmaku or comments are asked for). danmakuProfile is one counted reaction profile per video with danmaku ($0.02). related adds up to 40 related-video rows per video ($0.001 each). Free plan runs show 20 danmaku, 1 comment and 3 related videos per video.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "details",
                "danmaku",
                "danmakuProfile",
                "comments",
                "related"
              ],
              "enumTitles": [
                "Video rows",
                "Video detail (coins, shares, tags, parts)",
                "Danmaku rows",
                "Danmaku reaction profile",
                "Comments (as many as Bilibili shows without login)",
                "Related videos"
              ]
            }
          },
          "maxVideosPerSource": {
            "title": "Videos per keyword or channel",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Default 20 through the API; the Console form is pre-filled with 5 (the free-plan size). How many videos to read per keyword, per channel and from the popular list. One Bilibili search answers 1,000 at most; above 1,000 the run splits the search into date windows, newest first. More than 5 (paid Apify plans only — free plan runs ignore this and say so)."
          },
          "maxDanmakuPerVideo": {
            "title": "Danmaku rows per video",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Default 500 through the API; the Console form is pre-filled with 100. Upper limit of danmaku rows per video, spread evenly over the video's length. 500 rows cost at most $0.25 per video at the Free-tier price; 0 returns every danmaku Bilibili stores for the video (it stores 100 to 6,000 depending on the video's length, and returns up to 1.2 times that). The reaction profile is always counted from all of them. More than 20 (paid Apify plans only — free plan runs ignore this and say so)."
          },
          "sortOrder": {
            "title": "Search order",
            "enum": [
              "relevance",
              "views",
              "newest",
              "danmaku",
              "favorites"
            ],
            "type": "string",
            "description": "Order of keyword search results (paid Apify plans only — free plan runs ignore this and say so). Default: relevance."
          },
          "since": {
            "title": "Published since",
            "type": "string",
            "description": "Only videos published on or after this date (YYYY-MM-DD), for keyword searches (paid Apify plans only — free plan runs ignore this and say so)."
          },
          "until": {
            "title": "Published until",
            "type": "string",
            "description": "Only videos published before this date (YYYY-MM-DD), for keyword searches (paid Apify plans only — free plan runs ignore this and say so)."
          },
          "ai": {
            "title": "AI layers",
            "type": "array",
            "description": "Optional, off by default (paid Apify plans only — free plan runs ignore this and say so). danmakuTranslation: every distinct danmaku line of a video translated ($0.0002 per distinct line, counted per video). translation: video title + description and comments translated ($0.002 each). videoSummary: one row per video on what viewers reacted to, with the danmaku it is based on ($0.03). keywordInsight: how the keyword is covered, on the keyword result row ($0.03). Charged only for answers that passed our checks. Turning a layer on sends the public texts involved (danmaku, comments, titles, descriptions) to Anthropic's API (Claude, a company based in the United States); leave it off to send nothing.",
            "items": {
              "type": "string",
              "enum": [
                "danmakuTranslation",
                "translation",
                "videoSummary",
                "keywordInsight"
              ],
              "enumTitles": [
                "Translate danmaku",
                "Translate titles, descriptions and comments",
                "Summarize viewer reactions per video",
                "Keyword insight"
              ]
            }
          },
          "aiLanguage": {
            "title": "AI output language",
            "type": "string",
            "description": "Language code for translations and summaries (en, ja, ko, de, …). Default en."
          },
          "aiMaxItems": {
            "title": "AI items per run",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Default 5,000. Upper limit of texts sent to the language model in one run (a danmaku line, a comment, a video and a summary each count as one). The AI layers stop there; the collection goes on."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. Keep Apify Proxy on; the default datacenter proxy is what the Actor was measured with."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}