You need to merge duplicate spreadsheet rows, but search results keep offering hours-long courses. More results may not help. Describe the action and the expected output more precisely.
Combine an action with its object
Start with merging duplicate rows and add the relevant goal, such as summing amounts, plus the software if needed. Supply keyword, order, page and page_size as documented. Record any duration or date filters so an unexpectedly small result set remains explainable.
Check relevance before paging further
Inspect a few original videos. Removing duplicate rows, deduplicating one column and aggregating totals are different tasks. Use aid for the bound detail lookup rather than a BV parameter. Prefer demonstrations that show both input and output instead of relying on keyword overlap.
Test with a small invented dataset
Write a few sample rows and define the expected total and row count before following the method. Your notes can include source, software version, method, test input, actual result and limitations. Leave the result blank until you perform the exercise. If a menu differs, investigate version differences before assuming the explanation is wrong.
Keep distinctions between useful methods
If two methods work, note which suits a one-time cleanup and which is easier to repeat. The search endpoint does not verify formulas or edit your file. Retain a primary reference, an alternative and your test notes. Recheck their conditions next time rather than treating a simple title as proof that every data case is covered.
Requests used in this project
- Get general search data:https://api.trmesh.com/openapi/api/v1/bilibili/web/fetch_general_search · Documentation
- Get single video detail:https://api.trmesh.com/openapi/api/v1/bilibili/web/fetch_video_detail · Documentation
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.