# Bilibili Popular API (bilibili.popular)

- Canonical page: https://everyinfra.com/en/bilibili-api/popular
- Endpoint: POST /api/v1/social with {"platform": "bilibili", "action": "popular", "params": {...}}
- Price: $0.000806 per call ($0.81 per 1,000 requests); failed and empty results are not charged
- Returns: list, one page of 20 per call (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=bilibili&action=popular

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| page_token | not declared | no | not declared | Page token for `popular`: pass back the previous response's `next_page_token` exactly as received to get the next 20 videos; leave it out to start at the first page. Tokens last 24 hours and each page is one call. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| aid | The video's numeric av ID (popular); it names the same video as the BV ID in id. |
| url | Link to the record on the platform. |
| title | Title. null when the platform has no titles (for example text-only posts). |
| text | Body 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_seconds | Duration in seconds. null for content that is not video or audio. |
| duration_sec | platform-native meaning |
| view_count | Views or plays. null means not disclosed, not 0. |
| like_count | Likes. null means the platform or this capability does not disclose it; it is not 0. |
| comment_count | Comments. null means not disclosed, not 0. |
| danmaku_count | Danmaku (on-screen comment) count. **A Bilibili-specific engagement signal; read it alongside comment_count.** |
| favorite_count | Favorites. |
| coin_count | Coins given. Coins are a paid form of approval on Bilibili and weigh more than likes. |
| share_count | Shares. null means not disclosed, not 0. |
| thumbnail_url | Thumbnail link, lower resolution than image_url. |
| posted_at | Publish 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. |
| category | Category name in the platform's own taxonomy, not normalized across platforms. |
| author_name | Author's display name. |
| author_id | Author's unique ID on the platform. |
| author_url | Link to the author's profile on the platform. |
| author_avatar_url | Uploader avatar link (popular). |
| recommend_reason | The tag Bilibili puts on a Popular video, as shown (popular), for example for passing a million views or many shares; absent when there is none. |
| ip_location | Upload location (popular): the IP region Bilibili shows on the video page, a province or country. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```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": "popular",
  "params": {}
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "bilibili",
        "action": "popular",
        "params": {},
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "bilibili",
  "action": "popular",
  "results": [
    {
      "id": …,
      "aid": …,
      "url": …,
      "title": …,
      "text": …,
      "duration_seconds": …,
      "duration_sec": …,
      "view_count": …,
      "like_count": …,
      "comment_count": …,
      "danmaku_count": …,
      "favorite_count": …,
      "coin_count": …,
      "share_count": …,
      "thumbnail_url": …,
      "posted_at": …,
      "category": …,
      "author_name": …,
      "author_id": …,
      "author_url": …,
      "author_avatar_url": …,
      "recommend_reason": …,
      "ip_location": …,
      "platform": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=bilibili
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
