# Bilibili Comments: Export Comments and Replies

Reads the comments of a Bilibili video from its link or BV id and returns each comment's text, likes, author and time; includeReplies adds the replies under comments that have 3 or more. Useful for audience research and sentiment analysis.

- Actor: openclawai/bilibili-scraper (Bilibili Scraper), https://datapika.com/actors/bilibili-scraper
- Run on Apify: https://apify.com/openclawai/bilibili-scraper
- Tested: 2026-11-26, 5 rows in 3 seconds, $0.0050 at free-plan prices

## Input

```json
{
  "mode": "video_comments",
  "urls": [
    "BV1M1421t7hT"
  ],
  "maxItems": 500,
  "includeReplies": true
}
```

## Output fields

- `comment_text`: Comment
- `author_name`: Author
- `like_count`: Likes
- `comment_count`: Replies
- `created_at`: Posted
- `reply_to_id`: Reply to

## Sample rows (personal data masked)

```json
[
  {
    "comment_text": "惩治谣言，任重道远啊。现在造谣的成本还是有点低",
    "author_name": "笑chu腹肌",
    "like_count": 2301,
    "comment_count": 34,
    "created_at": "2024-08-11T10:53:41+00:00",
    "reply_to_id": null
  },
  {
    "comment_text": "那是相当低，很多都是法不责众，真的恶心！",
    "author_name": "喜欢孤独的滋味",
    "like_count": 18,
    "comment_count": 0,
    "created_at": "2024-08-11T10:55:31+00:00",
    "reply_to_id": "237107365072"
  },
  {
    "comment_text": "是啊 就算起诉了 法律判赢了 最多也就赔点钱 然后公开道歉",
    "author_name": "star小炮",
    "like_count": 83,
    "comment_count": 0,
    "created_at": "2024-08-11T10:57:59+00:00",
    "reply_to_id": "237107365072"
  }
]
```

Full sample: https://datapika.com/data/tasks/bilibili-video-comments-export.json

## How to run it

1. **Open the actor on Apify.** Click Copy input, then Run on Apify to open the Bilibili Scraper. Sign in or create a free account, open the JSON tab of the input form and paste the input.
2. **Start the "Bilibili Comments: Export Comments and Replies" task.** Press Start. Change any input field first if you need a different topic, account or size; the fields are listed above.
3. **Get the results.** Rows arrive in a dataset while the run works. Our test returned 5 rows in 3 seconds.
4. **Use the data.** Download JSON, CSV or Excel, call the run from the API, schedule it, or let an AI agent run it through MCP.

API (replace the token):

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/openclawai~bilibili-scraper/run-sync-get-dataset-items?maxTotalChargeUsd=1" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"video_comments","urls":["BV1M1421t7hT"],"maxItems":500,"includeReplies":true}'
```

## Change it

- mode picks the job: search_videos, video_detail, video_comments, danmaku, subtitles, user_posts, trending and more.
- Paste bilibili.com video links, BV ids or b23.tv short links in urls, one per line.
- Raise maxItems for a bigger dataset; you pay per result delivered.
- includeReplies adds the replies under each comment.

## FAQ

### Which links work?

A bilibili.com/video/BV... link, a bare BV id or a b23.tv short link. Each link runs on its own, so you can export several videos in one run.

### Are replies included?

With includeReplies on, replies are fetched for comments that have 3 or more, and reply_to_id links each reply to its parent comment.

### Do I need a Bilibili account?

No. It reads public Bilibili data with no login, cookie, Chinese phone number or API key. Run it from the Apify Console, the API, or an AI agent through MCP.

### How much does it cost?

You pay per result delivered to your dataset: a video, a comment or a danmaku line. There is no start fee. The current prices are on the Pricing tab.
