# Bangumi Media Database API
> Subject ratings, rankings and collection stats from Bangumi (bgm.tv, "番组计划"), the Chinese cross-media community database for anime, books/manga, music, games and live-action drama, read keyless from its public v0 API. Bangumi is China's "Douban for ACG": a two-decade catalogue where users rate and collect titles across every medium and the community score and rank are what fans trust. Unlike the anime-first databases (MyAnimeList, AniList), Bangumi spans games, books, music and TV/film too, and exposes a collection breakdown — how many users wish for, are doing, have completed, put on hold or dropped each title — that is its own distinctive engagement signal. The search endpoint finds subjects by keyword, optionally filtered to one medium and sorted by rank, match or score. The subject endpoint returns one title's full profile by its Bangumi id: its Japanese and Chinese names, medium, date, community score and vote count, overall rank, the full collection breakdown, tags and summary. The calendar endpoint returns the anime airing each day of the week, with their scores. This is the Bangumi cut — a distinct social and reference platform, separate from the anime-first feeds and the other media databases in the catalogue, spanning all media with Chinese community metrics. Scores, ranks and collection counts are the real, live community numbers; rank is null for titles with too few votes to be ranked. Names and summaries are Japanese and Chinese as Bangumi publishes them; an nsfw flag is reported honestly and adult titles are excluded from search. Keyless, a short cache fronts the upstream.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/bangumi-api/..."
```

## Pricing
- **Free** (Free) — 800 calls/Mo, 2 req/s
- **Starter** ($30/Mo) — 72,000 calls/Mo, 6 req/s
- **Pro** ($79/Mo) — 500,000 calls/Mo, 16 req/s
- **Scale** ($218/Mo) — 3,000,000 calls/Mo, 40 req/s

## Endpoints

### Search

#### `GET /v1/search` — Search subjects by keyword

**Parameters:**
- `q` (query, required, string) — Title to search Example: `witcher`
- `type` (query, optional, string) — Medium filter: book, anime, music, game or real Example: `game`
- `sort` (query, optional, string) — match, rank, score or heat Example: `rank`
- `limit` (query, optional, string) — Max results (1-30) Example: `15`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bangumi-api/v1/search?q=witcher&type=game&sort=rank&limit=15"
```

**Response:**
```json
{
    "data": {
        "note": "Bangumi subjects matching a keyword — each with its id (use it with /v1/subject), Japanese and Chinese names, medium (anime/book/music/game/real), date, community score (0-10) and overall rank. Pass q (required), optional type (one of: book, anime, music, game, real), sort (match/rank/score/heat, default match) and limit (1-30). Adult titles are excluded (the public API is SFW). Live, cached ~5m.",
        "sort": "rank",
        "type": "game",
        "count": 15,
        "query": "witcher",
        "total": 17,
        "source": "Bangumi public v0 API (api.bgm.tv/v0/search/subjects), keyless",
        "results": [
            {
                "id": 262219,
                "date": "2015-10-13",
                "name": "The Witcher 3: Wild Hunt - Hearts of Stone",
                "rank": null,
                "type": "game",
                "image": "https://lain.bgm.tv/r/400/pic/cover/l/aa/5d/262219_0NStN.jpg",
                "score": 8.5,
                "name_cn": "巫师3：狂猎－石之心"
            },
            {
                "id": 262220,
                "date": "2016-05-31",
                "name": "The Witcher 3: Wild Hunt – Blood and Wine",
                "rank": null,
                "type": "game",
                "image": "https://lain.bgm.tv/r/400/pic/cover/l/07/a5/262220_4zd56.jpg",
                "score": 8.6,
                "name_cn": "巫师3：狂猎－血与酒"
            },
            {
             
…(truncated, see openapi.json for full schema)
```

### Subject

#### `GET /v1/subject` — One subject full profile by id

**Parameters:**
- `id` (query, required, string) — Bangumi subject id Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bangumi-api/v1/subject?id=25"
```

**Response:**
```json
{
    "data": {
        "id": 25,
        "url": "https://bgm.tv/subject/25",
        "date": "2008-10-23",
        "name": "悪魔城ドラキュラ 奪われた刻印",
        "note": "One Bangumi subject's full profile: its Japanese and Chinese names, medium, date, community score and vote count, overall rank and the full collection breakdown — wish (want to do), doing (in progress), collect (completed), on_hold and dropped — plus tags and summary. score and rank are Bangumi's community metrics; nsfw is reported honestly. Live, cached ~5m.",
        "nsfw": false,
        "rank": 791,
        "tags": [
            "恶魔城",
            "NDS",
            "Konami",
            "ACT",
            "御姐",
            "ARPG",
            "露背",
            "横版过关",
            "被夺走的刻印",
            "御姐城",
            "CastleVania",
            "Metroidvania"
        ],
        "type": "game",
        "image": "https://lain.bgm.tv/pic/cover/l/8e/29/25_tEntR.jpg",
        "score": 7.8,
        "source": "Bangumi public v0 API (api.bgm.tv/v0/subjects), keyless",
        "name_cn": "恶魔城 被夺走的刻印",
        "summary": "恶魔城 被夺走的刻印（悪魔城ドラキュラ 奪われた刻印）是日本科乐美集团旗下游戏部门所开发的恶魔城系列动作游戏，这是在任天堂DS上的第三作。 人类和吸血鬼的战斗已经不知道轮回了几次。然而，于19世纪初，和德古拉数度展开死斗
…(truncated, see openapi.json for full schema)
```

### Calendar

#### `GET /v1/calendar` — Anime airing each day of the week

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bangumi-api/v1/calendar"
```

**Response:**
```json
{
    "data": {
        "days": [
            {
                "anime": [
                    {
                        "id": 377130,
                        "name": "とんがり帽子のアトリエ",
                        "score": 6.7,
                        "name_cn": "尖帽子的魔法工房",
                        "score_votes": 2164
                    },
                    {
                        "id": 405232,
                        "name": "大道独行之蝶龙变",
                        "score": 4.9,
                        "name_cn": "大道独行之蝶龙变",
                        "score_votes": 7
                    },
                    {
                        "id": 551123,
                        "name": "ポンコツ風紀委員とスカート丈が不適切なJKの話",
                        "score": 7.1,
                        "name_cn": "木头风纪委员和迷你裙JK的故事",
                        "score_votes": 988
                    },
                    {
                        "id": 553949,
                        "name": "Star Wars: Maul - Shadow Lord",
                        "score": 7.2,
                        "name_cn": "星球大战：摩尔 - 暗影领主",
                        "score_votes": 23
                    },
                    {
                        "id": 558088,
                        "name": "自称悪役令嬢な婚約者の観察記録。",
                        "score": 6.4,
             
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bangumi-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "search takes q (a title), optional type (book/anime/music/game/real), sort (match/rank/score/heat, default match) and limit (1-30). subject takes id (a numeric Bangumi subject id). calendar and meta take no parameters. score is the community rating (0-10); rank is the overall popularity rank; collection counts are how many users wish/doing/collect/on-hold/dropped. Adult titles are excluded from search (public API is SFW); nsfw is flagged on subject. A short ~5-minute cache fronts the upstream.",
        "sample": {
            "name": "恶魔城 被夺走的刻印",
            "rank": 791,
            "score": 7.8
        },
        "source": "Bangumi public v0 API (api.bgm.tv), keyless, live",
        "service": "bangumi-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/search": "Search subjects by keyword (q=witcher, type=game).",
            "GET /v1/subject": "One subject's full profile by id (id=25).",
            "GET /v1/calendar": "Anime airing each day of the week."
        },
        "description": "Subject ratings, rankings and collection stats from Bangumi (bgm.tv), the Chinese cross-media community database for anime, books/manga, music, games and live-action drama, keyless. The search endpoint finds subjects by keyword (optional medium filter, sort by rank/match/score); the subject endpoint returns one title's full profile by id (names, medium, community score and votes, overall rank
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/bangumi-api
OpenAPI spec: https://www.oanor.com/api/bangumi-api/openapi.json
