How to fetch a Bilibili video's subtitle info by ID and CID
Get the subtitle metadata and subtitle URLs for a Bilibili video by its video ID and CID
On this page
You have five Bilibili videos with a video ID and CID for each one, and you need to record which subtitle tracks exist before planning a transcript review. The deliverable is a table with one row per subtitle item and the URL fields that the next step would use. This guide designs that table and shows the call, the fields and the cost. The table values below are placeholders
Example input and deliverable design
Example input, with the public video used for the real call described later:
| Label | query.a_id | query.c_id |
|---|---|---|
| Example | 117601606896989 | 43538251892 |
Replace both values with the video you are checking. The tool takes both values as strings. The table design is one row per item in data.subtitles. Values here are placeholders showing the shape:
| Video ID | data.lan | data.lan_doc | subtitles.lan | subtitles.lan_doc | subtitles.ai_status | subtitles.is_lock | subtitles.subtitle_url | subtitles.subtitle_url_v2 |
|---|---|---|---|---|---|---|---|---|
| 117601606896989 | (empty or code) | (empty or label) | (empty or code) | (empty or label) | (integer) | true or false | (URL or empty) | (URL or empty) |
For a video with no subtitle item, keep one row with the video ID and empty subtitle fields. The table records the track metadata and the URLs. The transcript review is a separate step
Pass the video ID and CID
tikhub.bilibili.web.fetch_video_subtitle takes a query object with a_id and c_id, both strings. The price block lists the call at $0.001 per call; the tool is called through POST /v1/runs with toolId tikhub.bilibili.web.fetch_video_subtitle. You get both values from the Bilibili video being inspected. A successful empty result is still charged
Read the current input schema and price before running, because the prompt below tells the agent to do that check. The call does not need a transcript or a separate subtitle file from you. It returns subtitle info for the ID and CID pair
Read the returned fields
The output is the supplier's raw JSON with no fixed schema. The field names below were observed on a single run, so the agent should read the field names from the first response
data.subtitlesis the array you loop over. Each item becomes a rowdata.lananddata.lan_docare top-level fields. Put them on each row for the videosubtitles.lanandsubtitles.lan_docidentify the track language in the tablesubtitles.ai_statusis the AI status codesubtitles.is_lockis the lock statesubtitles.subtitle_urlandsubtitles.subtitle_url_v2are the URL fields to record
Use the row to decide what to review next. A video with at least one item in data.subtitles has a track entry. A video with an empty array has no track entry from this call. Keep is_lock visible because a locked track and an unlocked track are different states in the table. If a URL is empty, leave the cell empty and keep the other fields
For comment data on the same videos, see the companion guide at https://purrkey.app/blog/fetch-bilibili-video-comments
What one real call returned
One real call was made on 2026-11-13 for the Example input. Input sent: {"query": {"a_id": "117601606896989", "c_id": "43538251892"}}. Billing: status SETTLED, charged 0.001 USD against a ceiling of 0.001 USD. Top-level keys of data: lan, lan_doc, subtitles, allow_submit, font_size_type, subtitle_position. data.lan was ""; data.lan_doc was ""; data.subtitles had 1 item; the first item had keys id, lan, type, id_str, ai_type, is_lock, lan_doc, ai_status, subtitle_url, subtitle_url_v2. data.allow_submit was false; data.font_size_type was 0
The agent prompt
Use this prompt with the five video ID and CID pairs you have. Replace the example row and add four more rows
Set up https://purrkey.app/SKILL.md, then use Purrkey to fetch subtitle info for the five Bilibili videos in the list below. Check the current inputs and price of tikhub.bilibili.web.fetch_video_subtitle before running anything. Call the tool once per video with query.a_id and query.c_id as strings. Read the field names from the first response before filling the table. Return a table with Video ID, data.lan, data.lan_doc, subtitles.lan, subtitles.lan_doc, subtitles.ai_status, subtitles.is_lock, subtitles.subtitle_url, subtitles.subtitle_url_v2. Use one row per subtitle item. If a video has no subtitle item, keep one row for that video with empty subtitle fields. Do not guess values.
Example row:
117601606896989, 43538251892
Add four more rows here:Estimated tool cost
The price block gives $0.001 per call. The totals below are ceilings: under the max_call rule, "Maximum per call. Successful runs settle at the actual AnyAPI charge." Model fees for the agent are not counted
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| Check 5 videos | 5 calls x $0.001 per call | $0.001 per call | 5 calls | $0.005 |
| Check 20 videos | 20 calls x $0.001 per call | $0.001 per call | 20 calls | $0.020 |
A successful empty result counts as a call in these totals
Next action
Open https://purrkey.app/tools/bilibili?q=fetch_video_subtitle to run tikhub.bilibili.web.fetch_video_subtitle for the first five videos
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Bilibili.FAQ
How do I fetch a Bilibili video's subtitle info by ID and CID?
Call tikhub.bilibili.web.fetch_video_subtitle with query.a_id and query.c_id as strings. The output includes data.lan, data.lan_doc and a data.subtitles array with lan, lan_doc, ai_status, is_lock, subtitle_url and subtitle_url_v2 fields.
What inputs does tikhub.bilibili.web.fetch_video_subtitle take?
It takes a query object with a_id and c_id, both strings. You get both values from the Bilibili video being inspected.
Are empty subtitle results charged?
Yes. The price rule says successful empty results are charged at the fixed per-call price.
How much does it cost to check five Bilibili videos?
Five calls at $0.001 per call come to $0.005 at the ceiling. Model fees for the agent are not counted.
What fields should I record from the subtitle response?
Record data.lan, data.lan_doc, subtitles.lan, subtitles.lan_doc, subtitles.ai_status, subtitles.is_lock, subtitles.subtitle_url and subtitles.subtitle_url_v2. One row per subtitle item is the design.
What does one real call to this tool return?
The run on 2026-11-13 sent a_id 117601606896989 and c_id 43538251892, settled at 0.001 USD against a 0.001 USD ceiling, and returned data.subtitles with 1 item. The top-level data keys were lan, lan_doc, subtitles, allow_submit, font_size_type and subtitle_position.
Next step
Try this with Bilibili
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.