You want several Bilibili tutorials available for a training session. Downloading everything from a search would include duplicates, old software versions and superficially related videos. First establish which references the lesson actually needs.

Search around the training task

Define the operation, software and version, then use the documented general search. Preserve keyword, order, page, page_size and filters. Review one page for relevance before expanding instead of treating every result as required material.

Verify candidates before keeping them

Use aid for details and inspect the original where necessary. Deduplicate by video identifier and retain source, version conditions, intended use and unresolved questions. Similar demonstrations may add little, while old and new versions can contain incompatible steps.

Recognize the missing download step

This workflow binds search and video details, not downloading or playback-address retrieval. A candidate list is not a completed download or an offline package. If files are needed later, establish an appropriate saving method and usage conditions separately. Search results do not guarantee a directly savable media address.

Deliver a list ready for the next decision

Your index can contain original link, identifier, topic, version, intended place in training and saving status. Fill the last column only after an actual action. AI may arrange verified references into a lesson sequence but should not invent downloaded filenames or paths. The useful first deliverable is a small accurate list showing what is relevant and what remains to be done.

Requests used in this project

Request URL and parameters

GET https://api.trmesh.com/openapi/api/v1/bilibili/web/fetch_general_search

Parameter Type Required Meaning
keyword string Yes Search keyword
order string Yes Order method
page integer Yes Page number
page_size integer Yes Number per page
duration integer No Duration filter
pubtime_begin_s integer No Start date (10-digit timestamp)
pubtime_end_s integer No End date (10-digit timestamp)

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_general_search"
params = {
    "keyword": "火影忍者",
    "order": "totalrank",
    "page": "1",
    "page_size": "42"
}
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.