You want a study outline from a Bilibili course video with several segments. Subtitle availability can differ between segments. Establish the correct relationship before using text as the basis for your notes.
Check the work and segment together
The contract requires the work identifier and cid. Preserve both with the original video reference. Do not reuse another segment's cid merely because it belongs to the same course. Resolve missing segment information before constructing a request from guesses.
Inspect what subtitle information is available
The response is described as subtitle information, not a guarantee that every video has subtitles or that the full transcript is already returned. Confirm the available language and material. If another reading step is needed, follow the actual information supplied. Missing subtitles do not mean there is no spoken content or that the lesson lacks value.
Verify the outline against speech and visuals
Check important terminology, numbers, and demonstrations against the video. Subtitles may omit visual information needed to understand an operation. Separate the speaker's explanation from your own summary and retain the segment reference. The capability does not automatically correct every subtitle error or replace comprehension. Produce a traceable learning aid rather than claiming a flawless, complete course handout.
Request URL and parameters
GET https://api.trmesh.com/openapi/api/v1/bilibili/web/fetch_video_subtitle
| Parameter | Type | Required | Meaning |
|---|---|---|---|
a_id |
string | Yes | Video id |
c_id |
string | Yes | Video cid |
Run the Python example
Install requests and set TRMESH_API_TOKEN in your environment. Replace the sample identifiers with the public object you intend to inspect. Example IDs may no longer be available.
import os
import requests
# Read your own developer key from the server environment.
url = "https://api.trmesh.com/openapi/api/v1/bilibili/web/fetch_video_subtitle"
params = {
"a_id": "114006081739452",
"c_id": "28400484458"
}
response = requests.get(
url, params=params, timeout=30,
headers={"Authorization": f"Bearer {os.environ['TRMESH_API_TOKEN']}"},
)
response.raise_for_status()
payload = response.json()
print(payload) # Inspect the actual response before mapping fields
Endpoint documentation · Free profile tool
API calls use your TRMesh account allowance. Check the endpoint price before running a script.