Your bilingual research library contains slightly different display text for the same YouTube video. Before treating those records as different material, fix the video identity and language preference used for retrieval.

Record the video and language together

Identify the video from its source URL and retain the requested language. The contract supports language preferences and defaults to Chinese. A preference does not guarantee every field changes or that all content receives a human-quality translation. Keep the conditions when comparing responses.

Select fields from the original structure

V2 returns full raw data including playerResponse and initialData, rather than a finished research card. Inspect actual fields before extracting them. Preserve missing values instead of inventing paths or meanings. Player-related information is not automatically a transcript, comment set, or record of audience behavior.

Maintain one source relationship across languages

Associate different language displays with the same confirmed video and preserve the original link and retrieval date. Watch or read the relevant material before summarizing, particularly when quoting. Separate platform display information, your translation, and your research conclusions. The library should present different views of one source rather than count them as two independent pieces of evidence.

Request URL and parameters

GET https://api.trmesh.com/openapi/api/v1/youtube/web_v2/get_video_info

Parameter Type Required Meaning
video_id string Yes Video ID
language_code string No Language code
need_format boolean No Whether to clean and format the data

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/youtube/web_v2/get_video_info"
params = {
    "video_id": "oaSNBz4qMQY",
    "language_code": "zh-CN"
}
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.