Answers

How do I get notified when new Bilibili videos mention my product?

Short answer

Run Bilibili video search with sort=latest every hour or two, keep the BV ids you have already seen, and send yourself only the new ones. Each check is one call at $0.002 covering about 20 newest videos, so one keyword checked every two hours costs $0.72 a month.

You make a note-taking app, and a mid-sized creator just posted a review that calls your sync feature broken. You want to know the same afternoon, while the comment section is still forming and a reply from your team can change the tone. A small job that searches Bilibili for your product name, newest first, every couple of hours, and pings you about anything new, gets you there.

How it works

Bilibili video search with sort=latest returns the newest videos matching your keyword, about 20 per page. Keep a list of BV ids you have already seen. On each run, anything not on the list is new: send it to your chat or inbox, then add it to the list. If every result on the first page is new, fetch the next page too; otherwise stop.

When an alert fires, Bilibili video comments shows what viewers are saying, at $0.002 per page.

Monthly cost

Setup Calls a month Cost
1 keyword, every 2 hours 360 $0.72
3 keywords, hourly 2,160 $4.32
3 keywords hourly, plus first comment page on 30 new videos 2,160 + 30 {{cost:bilibili.videos.search2160+bilibili.videos.comments.list30}}

The watcher

import json, os, pathlib, requests

URL = "https://api.okdata.online/v1/bilibili/videos/search"
H = {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"}
KEYWORDS = ["你的产品名", "your product"]
SEEN = pathlib.Path("seen.json")

seen = set(json.loads(SEEN.read_text())) if SEEN.exists() else set()
new = []
for kw in KEYWORDS:
    cursor = None
    for _ in range(3):  # at most 3 pages per keyword per run
        params = {"query": kw, "sort": "latest", **({"cursor": cursor} if cursor else {})}
        body = requests.get(URL, headers=H, params=params, timeout=60).json()
        if body["code"] != "ok":
            print(kw, body["code"])
            break
        fresh = [v for v in body["data"]["items"] if v["id"] not in seen]
        new += fresh
        seen.update(v["id"] for v in fresh)
        if len(fresh) < len(body["data"]["items"]) or not body["page"]["has_more"]:
            break
        cursor = body["page"]["next_cursor"]

for v in new:
    print(f"{v['author']['name']}: {v['title']} ({v['metrics']['views']} views) {v['url']}")
SEEN.write_text(json.dumps(sorted(seen)))

Swap the print for a webhook call to Feishu, Slack or email. On the first run, every result is new; run it once without alerts to fill seen.json.

Gotchas

  • New uploads take a while to appear in Bilibili's own search, so alerts trail the upload by minutes to hours.
  • Search matches titles, tags and descriptions. A creator who only says your name out loud in the video will not be found.
  • Short or generic product names bring noise. Add a second word, or filter on the title before alerting.
  • Only public videos show up.

Other ways

For a single keyword, saving a Bilibili search sorted by newest and checking it each morning costs nothing. RSSHub, the open-source feed generator, has Bilibili search routes you can host yourself and feed into any RSS reader. When you want mentions across Bilibili, Weibo and Douyin in one place, the word-of-mouth guide shows the full setup.

Updated