---
title: "获取用户收藏"
method: GET
path: "/v0/users/{username}/collections"
tags: ["收藏"]
---

# 获取用户收藏

`GET /v0/users/{username}/collections`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

获取对应用户的收藏，查看私有收藏需要access token。

## Path parameters

- `username` string, required

## Query parameters

- `subject_type` 1 | 2 | 3 | 4 | 6: 条目类型 - `1` 为 书籍 - `2` 为 动画 - `3` 为 音乐 - `4` 为 游戏 - `6` 为 三次元 没有 `5`
- `type` 1 | 2 | 3 | 4 | 5: - `1`: 想看 - `2`: 看过 - `3`: 在看 - `4`: 搁置 - `5`: 抛弃
- `limit` integer
- `offset` integer

## Response `200`

Successful Response

- PagedUserCollection
  - `total` integer
  - `limit` integer
  - `offset` integer
  - `data` UserSubjectCollection[]
    - `subject_id` integer, required
    - `subject_type` 1 | 2 | 3 | 4 | 6, required: 条目类型 - `1` 为 书籍 - `2` 为 动画 - `3` 为 音乐 - `4` 为 游戏 - `6` 为 三次元 没有 `5`
    - `rate` integer, required
    - `type` 1 | 2 | 3 | 4 | 5, required: - `1`: 想看 - `2`: 看过 - `3`: 在看 - `4`: 搁置 - `5`: 抛弃
    - `comment` string
    - `tags` string[], required
    - `ep_status` integer, required
    - `vol_status` integer, required
    - `updated_at` string, date-time, required: 本时间并不代表条目的收藏时间。修改评分，评价，章节观看状态等收藏信息时未更新此时间是一个 bug。请不要依赖此特性
    - `private` boolean, required
    - `subject` SlimSubject
      - `id` integer, required
      - `type` 1 | 2 | 3 | 4 | 6, required: 条目类型 - `1` 为 书籍 - `2` 为 动画 - `3` 为 音乐 - `4` 为 游戏 - `6` 为 三次元 没有 `5`
      - `name` string, required
      - `name_cn` string, required
      - `short_summary` string, required: 截短后的条目描述。
      - `date` string: air date in `YYYY-MM-DD` format
      - `images` Images, required
        - `large` string, required
        - `common` string, required
        - `medium` string, required
        - `small` string, required
        - `grid` string, required
      - `volumes` integer, required: 书籍条目的册数，由旧服务端从wiki中解析
      - `eps` integer, required: 由旧服务端从wiki中解析，对于书籍条目为`话数`
      - `collection_total` integer, required: 收藏人数
      - `score` number, required: 分数
      - `rank` integer, required: 排名
      - `tags` object[], required
        - `name` string, required
        - `count` integer, required

## Other responses

- `400`: Validation Error
- `404`: 用户不存在

## Changes

- **2025-02-04** (v0) `2d29d7b6639b`: 1 info
  - for the `query` request parameter `type`, the type was generalized from `integer` to no type
- **2024-10-01** (v0) `25167996e069`: 1 info
  - added the required property `data/items/subject/rank` to the response with the `200` status
- **2022-11-19** (v0) `bb6bcec42206`: 2 warning, 2 info
  - removed the optional property `detail` from the response with the `400` status
  - removed the optional property `detail` from the response with the `404` status
  - added the optional property `details` to the response with the `400` status
  - added the optional property `details` to the response with the `404` status
- **2022-08-30** (v0) `426fce0fa521`: 1 breaking, 1 info
  - the `data/items/subject/tags` response's property type changed from `array` to no type for status `200`
  - added `#/components/schemas/SubjectTags` to the `data/items/subject/tags` response property `allOf` list for the response status `200`
- **2022-07-15** (v0) `457171d7371e`: 7 breaking, 1 warning, 4 info
  - removed the required property `data/items/subject/collection` from the response with the `200` status
  - removed the required property `data/items/subject/locked` from the response with the `200` status
  - removed the required property `data/items/subject/nsfw` from the response with the `200` status
  - removed the required property `data/items/subject/platform` from the response with the `200` status
  - …8 more

[Operation history](https://skmtc.dev/bangumi/apis/bangumi-open-api/changes/v0/users/:username/collections/get.md)

---

[API](https://skmtc.dev/bangumi/apis/bangumi-open-api.md) - [All operations](https://skmtc.dev/bangumi/apis/bangumi-open-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bangumi/apis/bangumi-open-api/revisions/6aafdbda7895?raw)
