# Bilibili Bullet Comments: Export Danmaku with Timestamps

Reads the danmaku, the bullet comments that fly across a Bilibili video, from a video link and returns each line's text, the second of the video it appears at and when it was posted, so you can see which moments get the strongest reactions.

- 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 4 seconds, $0.0050 at free-plan prices

## Input

```json
{
  "mode": "danmaku",
  "urls": [
    "https://www.bilibili.com/video/BV1M1421t7hT"
  ],
  "maxItems": 2000
}
```

## Output fields

- `comment_text`: Danmaku
- `time_sec`: Second in video
- `created_at`: Posted
- `comment_id`: ID

## Sample rows (personal data masked)

```json
[
  {
    "comment_text": "真有这样的魔法就好了",
    "time_sec": 237.739,
    "created_at": "2024-08-11T10:50:24+00:00",
    "comment_id": "1646534636098445312"
  },
  {
    "comment_text": "《对》",
    "time_sec": 206.428,
    "created_at": "2024-08-11T10:51:16+00:00",
    "comment_id": "1646535078077362944"
  },
  {
    "comment_text": "最支持的一集！",
    "time_sec": 335.288,
    "created_at": "2024-08-11T11:02:38+00:00",
    "comment_id": "1646540795358250240"
  }
]
```

Full sample: https://datapika.com/data/tasks/bilibili-danmaku-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 Bullet Comments: Export Danmaku with Timestamps" 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 4 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":"danmaku","urls":["https://www.bilibili.com/video/BV1M1421t7hT"],"maxItems":2000}'
```

## 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.

## FAQ

### What is danmaku?

Danmaku are the bullet comments viewers post on Bilibili; they scroll across the video at the moment they refer to. Each row keeps that moment in seconds.

### How many lines can I export?

maxItems caps each video, from 1 to 5,000 lines. Busy videos have thousands of danmaku, so raise it for a full export.

### 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.
