A work and its segment are different targets
When a multi-part tutorial opens the wrong section, the player may not be at fault. This request needs bv_id and cid: the work identifier and the specific content segment. Confirm their relationship from reliable video information before requesting a stream. Do not substitute a collection identifier or a cid belonging to a different part. Knowing which lesson you intended to watch is more useful than repeatedly refreshing an incorrect address.
Verify playback after retrieving the address
The operation returns video-stream address information. Inspect what the response actually provides; it does not choose the intended segment for you or guarantee identical behaviour in every client. If a hypothetical installation lesson is requested with the introduction’s cid, correct the identifier mapping first. Separating retrieval from playback testing makes the source of a problem easier to identify.
Keep the source mapping in your notes
Record the BV, cid, intended section, check time, and observation in your own troubleshooting notes. A stream address should not become a permanent citation; retain the original work link for provenance. Accessibility does not grant downloading, editing, or redistribution rights. When reporting completion, distinguish obtaining information from testing it in the target environment. Without that second step, do not claim that every device can play the result.
Request URL and parameters
GET https://api.trmesh.com/openapi/api/v1/bilibili/web/fetch_video_playurl
| Parameter | Type | Required | Meaning |
|---|---|---|---|
bv_id |
string | Yes | Video id |
cid |
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_playurl"
params = {
"bv_id": "BV1y7411Q7Eq",
"cid": "171776208"
}
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.