POST

API health

24h health
Normal
  • Healthy / normal
  • Available
Normal

Last 24 hours

Last 30 days

Search Bilibili the way its All tab does: videos, accounts, anime series, films and live rooms mixed in one list, each row tagged with type. The first page holds about 20 videos plus related accounts, anime series and films; later pages are videos only. Pass next_page_token back as page_token for more.

Send POST https://api.everyinfra.com/api/v1/social with platform set to bilibili and action set to general_search. Price $0.79 per 1,000 requests ($0.000792 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.

AI prompt

#
Please help me write a data collection script with the EveryInfra Bilibili General search endpoint (bilibili/general_search).

How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to bilibili and action to general_search, and put the parameters inside params.
- Required parameters:
  - keyword: Search term. Results are mixed like Bilibili's All tab; each row's type is video, user, bangumi, movie or live. Use search for videos only and user_search for accounts only.
- Optional parameters:
  - page_token: Page token. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, with the other parameters unchanged.
- Returns a list of records. Main fields of each record: type, id, url, title, text, duration_seconds, duration_sec, duration_text (Duration as displayed text (for example…), view_count, like_count, comment_count, danmaku_count (Danmaku (on-screen comment) count); 39 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=bilibili.
- Example request body:
{
  "platform": "bilibili",
  "action": "general_search",
  "params": {
    "keyword": "编程"
  }
}
- Price: $0.79 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.

Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.

Request parameters

#
NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYesbilibiliPlatform identifier, fixed value.
actionbodystringYesgeneral_searchCapability identifier, fixed value.
keywordbody.paramsstringYes-Search term. Results are mixed like Bilibili's All tab; each row's type is video, user, bangumi, movie or live. Use search for videos only and user_search for accounts only.
page_tokenbody.paramsstringNo-Page token. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, with the other parameters unchanged. The first page holds about 20 videos plus related accounts, anime series and films; later pages hold videos only, up to 20. Each page is one call and limit has no effect. Tokens last 24 hours, and the last page has no next_page_token.

Code samples

#
bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "bilibili",
  "action": "general_search",
  "params": {
    "keyword": "编程"
  }
}'

OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

Response example

#
Captured November 21, 2026 at 07:17 (UTC) by calling this API with the parameters in the code sample above. results and count are that call's real response with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2. id, billing and quota differ on every call, so only their shape is shown.
json
{  "id": "req_…",  "platform": "bilibili",  "action": "general_search",  "results": [    {      "type": "video",      "id": "BV1rpWjevEip",      "url": "https://www.bilibili.com/video/BV1rpWjevEip",      "title": "【全748集】目前B站最全最细的Python零基础全套教程,2026最新版,包含所有干货!七天就能从小白到大神!少走99%的弯路!存下吧!很难找全的!",      "text": "【视频配套籽料、开发环境搭建安装包教程、电子书+问题解答请看 ”置顶平论” 自取哦】\r\n本套教程从零开始讲解,手把手教学,包含基础语法、进阶语法、爬虫、自动化办公、数据分析\r\n无论是新手小白,还是有一定编码经验的选手,皆可学习\r\n如果视频对你有用的话请 一键三连【长按点赞】支持一下UP哦,拜托,这对我真的很重要!",      "duration_seconds": 143894,      "duration_text": "39:58:14",      "view_count": 21931770,      "like_count": 605744,      "comment_count": 373418,      "danmaku_count": 137244,      "favorite_count": 927710,      "thumbnail_url": "https://i2.hdslb.com/bfs/archive/a979056b1a32012cdd00d48fbc3732d253e30620.jpg",      "posted_at": "2024-08-22T14:59:18+00:00",      "category": "计算机技术",      "author_name": "P•••程",      "author_id": "•••",      "author_url": "https://space.bilibili.com/•••",      "platform": "bilibili",      "tags": [        "程序员",        "Python教程",        "Python入门零基础"      ],      "duration_sec": 143894    },    {      "type": "video",      "id": "BV12J411X7tY",      "url": "https://www.bilibili.com/video/BV12J411X7tY",      "title": "少儿编程scratch3.0基础入门(大龙老师)",      "text": "这个教程是简单的基础入门课,想要系统的,完整的学习scratch请选择《新版scratch从入门到精通系统课》,点击评论区置顶链接进入课程,了解详情。",      "duration_seconds": 11349,      "duration_text": "3:09:09",      "view_count": 1373367,      "like_count": 15518,      "comment_count": 2142,      "danmaku_count": 9959,      "favorite_count": 46757,      "thumbnail_url": "https://i2.hdslb.com/bfs/archive/45a0b5a218de8fff3b7f4cf02e130179b1be470c.jpg",      "posted_at": "2019-11-27T10:20:37+00:00",      "category": "校园学习",      "author_name": "大•••程",      "author_id": "•••",      "author_url": "https://space.bilibili.com/•••",      "platform": "bilibili",      "tags": [        "scratch",        "少儿编程",        "原创"      ],      "duration_sec": 11349    }  ],  "next_page_token": …,  "pagination": { … },  "count": 17,  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

Response fields

#

Business data is in results. The table lists the fields a record can contain. Values the platform does not show are never made up.

FieldMeaning
typeRecord type; values depend on the capability (for example video / image / text).
idThe record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms.
urlLink to the record on the platform.
titleTitle. null when the platform has no titles (for example text-only posts).
textBody text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so).
duration_secondsDuration in seconds. null for content that is not video or audio.
duration_secKeeps the platform's own meaning
duration_textDuration as displayed text (for example 12:34).
view_countViews or plays. null means not disclosed, not 0.
like_countLikes. null means the platform or this capability does not disclose it; it is not 0.
comment_countComments. null means not disclosed, not 0.
danmaku_countDanmaku (on-screen comment) count. A Bilibili-specific engagement signal; read it alongside comment_count.
favorite_countFavorites.
coin_countCoins given. Coins are a paid form of approval on Bilibili and weigh more than likes.
share_countShares. null means not disclosed, not 0.
thumbnail_urlThumbnail link, lower resolution than image_url.
posted_atPublish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it.
categoryCategory name in the platform's own taxonomy, not normalized across platforms.
author_nameAuthor's display name.
author_idAuthor's unique ID on the platform.
author_urlLink to the author's profile on the platform.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).
tagsArray of tags. An empty array, not null, when there are none.
user_idUser's unique ID on the platform.
nameName of the object itself, for account, product and business capabilities.
bioProfile bio written by the account; may contain line breaks and emoji.
avatar_urlAvatar image link. Some platforms return sized CDN links that can expire.
levelKeeps the platform's own meaning
follower_countFollowers. null means not disclosed, not 0.
video_countKeeps the platform's own meaning
is_verifiedWhether the platform verified the account. null means it cannot be determined.
verified_typeKeeps the platform's own meaning
verified_titleKeeps the platform's own meaning
is_liveKeeps the platform's own meaning
live_room_idKeeps the platform's own meaning
is_senior_memberKeeps the platform's own meaning
recent_video_idsKeeps the platform's own meaning
episode_countKeeps the platform's own meaning
ratingRating. The scale varies by platform: rating_scale on the same row gives the maximum (usually 5; Booking, Douban, iQIYI and NAVER use 10). Convert with rating_scale before comparing across platforms, or the comparison can come out backwards.
rating_scaleMaximum of rating in the same row: 5 for five-star scales, 10 for ten-point scales. Present only when the row has a rating.

Errors and billing

#
401
Missing or invalid key.
402
Insufficient balance. Top up first.
422
Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
429
Per-minute request limit reached. Wait for Retry-After, then try again.
503
Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
200 empty
No data. No charge.

Errors

Google Analytics needs consent. Privacy