| name | bangumi |
| description | Bangumi (bgm.tv) API reference โ search, subject detail, calendar, user collections, related subjects.
|
| when_to_use | When you need to call a Bangumi API action. For search/discovery workflows, use anime-search instead.
|
bangumi
Bangumi (bgm.tv) API reference.
Actions
- search: Search anime/manga by keyword with filters (type, tag, date, rating).
- subject_detail: Get full details for a specific Bangumi subject.
- latest_episode: Get the latest aired main-story episode for a subject.
- calendar: View the weekly anime airing schedule.
- related_subjects: Find sequels, prequels, and related works.
- reviews: Fetch community discussion topics and blog reviews for a subject.
- user_collections: List the user's collection by status. Requires token.
- update_collection: Update collection status, rating, comment, or episode progress. Requires token.
Prerequisites
search, subject_detail, calendar, related_subjects, reviews are public APIs โ no token needed.
user_collections and update_collection require a Bangumi access token configured in config.toml:
[bangumi]
access_token = "your_bangumi_token"
If missing, these actions return Error: Bangumi access token not configured.
Tell the user to set [bangumi] access_token in config.toml.
Data Types
Collection types: 1=wish(ๆณ็), 2=done(็่ฟ), 3=doing(ๅจ็), 4=on_hold(ๆ็ฝฎ), 5=dropped(ๆๅผ)
Subject types: 1=book, 2=anime, 3=music, 4=game, 6=real
Latest aired episode
Use latest_episode when the user asks which episode of an anime is the
latest/current aired episode. It needs a Bangumi subject ID. If the user gives
only a title, call search first and then call latest_episode with the
selected subject_id.
This action uses Bangumi episode airdate and only considers main-story
episodes (type=0). Bangumi provides date precision only, so it cannot
distinguish whether today's episode has already reached its exact broadcast
time. The action treats "today" as the current UTC+8 date.