---
title: "Get User by name"
method: GET
path: "/v0/users/{username}"
tags: ["用户"]
---

# Get User by name

`GET /v0/users/{username}`

## Request

- The document declares no server URL.
- Auth: none declared

获取用户信息

## Path parameters

- `username` string, required

## Response `200`

Successful Response

- User: 实际的返回值可能包括文档未声明的 `url` 字段，此字段主要用于开发者从 api 响应直接转跳到网页。 客户端开发者请不用依赖于此特性，此字段的值随时可能会改变。
  - `id` integer, required
  - `username` string, required: 唯一用户名，初始与 UID 相同，可修改一次
  - `nickname` string, required
  - `user_group` 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11, required: 用户组 - 1 = 管理员 - 2 = Bangumi 管理猿 - 3 = 天窗管理猿 - 4 = 禁言用户 - 5 = 禁止访问用户 - 8 = 人物管理猿 - 9 = 维基条目管理猿 - 10 = 用户 - 11 = 维基人
  - `avatar` Avatar, required
    - `large` string, url, required
    - `medium` string, url, required
    - `small` string, url, required
  - `sign` string, required: 个人签名

## Other responses

- `400`: username 太长
- `404`: 对应用户不存在

## Changes

- **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-05-15** (v0) `b6b1c37dd3dd`: 1 breaking
  - removed the required property `url` from the response with the `200` status
- **2022-05-07** (v0) `588c3a75d5cd`: 4 breaking, 4 warning
  - added `subschema #1, subschema #2` to the `detail` response property `oneOf` list for the response status `400`
  - added `subschema #1, subschema #2` to the `detail` response property `oneOf` list for the response status `404`
  - the `detail` response's property type changed from `object` to no type for status `400`
  - the `detail` response's property type changed from `object` to no type for status `404`
  - …4 more
- **2022-04-23** (v0) `c74b08b9afd8`: 1 breaking, 1 info
  - the response property `detail` became optional for the status `400`
  - added the non-success response with the status `404`
- **2022-04-23** (v0) `1b64580d3d20`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bangumi/apis/bangumi-open-api/changes/v0/users/:username/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)
