{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Transcript & Subtitles for AI Agents – B站视频转文字 字幕",
    "description": "Bilibili (B站) transcript & speech to text: timestamped transcripts, SRT/VTT subtitles (字幕、文字稿), AI English summary & optional English translation, video metadata. Public videos only. API & MCP ready. $0.005/audio min.",
    "version": "1.1",
    "x-build-id": "vld668qScoPbllVwj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lone_fascia~bilibili-video-transcriber/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lone_fascia-bilibili-video-transcriber",
        "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/lone_fascia~bilibili-video-transcriber/runs": {
      "post": {
        "operationId": "runs-sync-lone_fascia-bilibili-video-transcriber",
        "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/lone_fascia~bilibili-video-transcriber/run-sync": {
      "post": {
        "operationId": "run-sync-lone_fascia-bilibili-video-transcriber",
        "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": [
          "videos"
        ],
        "properties": {
          "videos": {
            "title": "Bilibili videos / B站视频",
            "type": "array",
            "description": "Public videos only: charge-exclusive (充电专属), paid course (课堂), paid and bangumi content is skipped for free. Video URLs, BV ids, av ids or b23.tv short links, one per line. Examples: https://www.bilibili.com/video/BV1Eapz6PErV , BV1Eapz6PErV , av170001 , https://b23.tv/xxxx . Add ?p=N to a URL to pick a specific part. 支持完整链接、BV号、av号、b23.tv 短链。",
            "items": {
              "type": "string"
            }
          },
          "parts": {
            "title": "Multi-part videos (分P)",
            "enum": [
              "first",
              "all"
            ],
            "type": "string",
            "description": "For videos with several parts (分P): transcribe only the first part (or the part given by ?p=N), or all parts. Each part is billed separately by its audio length.",
            "default": "first"
          },
          "language": {
            "title": "Spoken language",
            "enum": [
              "zh",
              "auto",
              "en",
              "yue",
              "ja",
              "ko"
            ],
            "type": "string",
            "description": "Default Mandarin (zh): recommended for Chinese videos; auto-detect tends to leak Japanese/Korean characters into accented Mandarin. If a part is clearly English/Japanese/Korean/Cantonese, the Actor detects it and switches automatically (flag LANGUAGE_SWITCHED). Choose Auto-detect for mixed-language content.",
            "default": "zh"
          },
          "outputFormats": {
            "title": "Transcript formats",
            "type": "array",
            "description": "What to include in each dataset item. text = full plain text; segments = sentence-level [{start,end,text}] with seconds; srt / vtt = ready-to-use subtitle files as strings, built from the speech-recognition segment timestamps (off by default, no extra charge).",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "Plain text",
                "Timestamped segments",
                "SRT subtitles",
                "WebVTT subtitles"
              ]
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "saveSubtitleFiles": {
            "title": "Also save .srt and .txt files to the key-value store",
            "type": "boolean",
            "description": "Saves <BVID>_p<N>.srt and .txt to the run's key-value store so you can download them directly.",
            "default": false
          },
          "englishSummary": {
            "title": "English summary (AI)",
            "type": "boolean",
            "description": "Adds a short English bullet-point summary of each transcribed part (englishSummary.text), written by an LLM (DeepSeek) from the transcript. When on, the transcript text (not the audio) is sent to Alibaba Cloud Model Studio (servers in mainland China) for processing; turn this off if you don't want that. Included in the audio-minute price, no extra charge. If the LLM fails, the transcript is still returned and the item is flagged SUMMARY_FAILED. 英文摘要，默认开启，不额外收费；开启时文字稿会发送到阿里云百炼（服务器在中国大陆）处理，不需要可关闭。",
            "default": true
          },
          "translateToEnglish": {
            "title": "Full English translation (AI, extra charge)",
            "type": "boolean",
            "description": "Translates the whole transcript into English (englishTranslation.text) with an LLM, in chunks. The transcript text is sent to Alibaba Cloud Model Studio (servers in mainland China). Charged separately per audio minute (event translation-minute) and ONLY when the translation succeeds; failed translations are flagged TRANSLATION_FAILED and are free. English transcripts are not translated or charged. 全文英文翻译，文字稿会发送到阿里云百炼（中国大陆）处理，按音频分钟另行收费，失败不收费。",
            "default": false
          },
          "maxLlmCharsPerVideo": {
            "title": "Max transcript characters sent to the LLM per part",
            "minimum": 500,
            "maximum": 30000,
            "type": "integer",
            "description": "Safety cap for summary and translation. Longer transcripts are cut to this length (about 60-75 minutes of Chinese speech at 30000) and flagged LLM_INPUT_TRUNCATED; a truncated translation is only charged for the translated share of the audio minutes. Max 30000.",
            "default": 30000
          },
          "includeMetadata": {
            "title": "Include full video metadata",
            "type": "boolean",
            "description": "Description, stats (views/likes/coins/favorites/shares/danmaku/replies), category, publish time and cover URL. Title, BV id, creator and duration are always included.",
            "default": true
          },
          "qualityCheck": {
            "title": "Quality check (dialect / accent / noise warnings)",
            "type": "boolean",
            "description": "Re-decodes a small sample (about 20-90 s of speech) to detect the spoken language and flag likely dialect, accent, noisy or low-confidence audio in transcript.flags and transcript.quality. Adds roughly 10-30% processing time and costs nothing extra.",
            "default": true
          },
          "maxVideos": {
            "title": "Max videos (parts) per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap on the number of video parts transcribed in one run.",
            "default": 50
          },
          "maxAudioMinutesPerVideo": {
            "title": "Skip parts longer than (minutes)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Parts longer than this are skipped (not charged) and reported as TOO_LONG. Max 300.",
            "default": 120
          },
          "minRequestIntervalSecs": {
            "title": "Min seconds between Bilibili API requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Politeness delay between requests to Bilibili.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}