Call it
curl https://api.peume.com/v1/call/bilibili-search-by-keyword-and-content-type \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"keyword": "原神",
"search_type": "video",
"page_size": 20,
"order": 0
}
}'const res = await fetch("https://api.peume.com/v1/call/bilibili-search-by-keyword-and-content-type", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"keyword": "原神",
"search_type": "video",
"page_size": 20,
"order": 0
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/bilibili-search-by-keyword-and-content-type",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"keyword": "原神",
"search_type": "video",
"page_size": 20,
"order": 0
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: bilibili-search-by-keyword-and-content-type.
Parameters
keywordRequiredstringSearch keyword
Example: 原神
search_typestringSearch type (video/bangumi/pgc/live/article/user)
Example: video
cursorstringPagination cursor, leave empty for the first page; for the next page pass back data.pagination.next from the previous response
page_sizeintegerPage size
Example: 20
orderinteger排序方式/Sort order (0=综合, 1=最新, 2=播放量, 3=弹幕数)
Example: 0
Other ways to do it
Same job, other sources, cheapest first.
Search videos by keywordBest sourceSearch videos by keyword. Checks the cheapest source first and moves to the next one until it finds an answer.Search Bilibili videos by keywordSearches Bilibili videos by keyword with page-based pagination and sorting by general ranking, play count, publish time, danmaku count, or favorites.
