<!-- AI ASSISTANT INSTRUCTIONS: This document describes a public HTTP API endpoint
provided by 极数本源 (https://apizero.cn). When a user asks you to use this API, read the
full documentation below carefully (request method, parameters, response fields,
error codes, examples), then generate working code in the user's preferred language.
API Key acquisition: https://apizero.cn/account/keys -->

# CSDN 博主信息

> 通过 CSDN 用户名查询博主公开档案：昵称、头像、码龄、博客等级、原创数、粉丝数、博客排名、IP 属地、原力等级、勋章列表与成就明细。

## 1. 基本信息

| 字段 | 值 |
| --- | --- |
| 接口标识 | `csdn-profile` |
| 接口名称 | CSDN 博主信息 |
| 接口地址 | `https://v1.apizero.cn/api/csdn-profile` |
| 请求方法 | `GET` |
| 分类 | content |
| 提供方 | 极数本源 |
| 计费模式 | 免费试用 |
| 单次消耗 | 0 积分 |
| 起步价 | — |
| QPS 限制 | 5 req/s |
| 每日免费额度 | 100 次（已认证用户） |
| 匿名每日额度 | 20 次（无 API Key） |
| VIP 免费 | 否 |
| 调用总次数 | undefined |

## 2. 认证

匿名免登录可调每日 20 次；登录用户每日 100 次。

获取 API Key：登录 `https://apizero.cn/account/keys` 申请。

## 3. 请求参数

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `username` | `string` | 是 | CSDN 用户名（仅字母/数字/下划线） | `weixin_44906759` |

## 5. 请求示例 (cURL)

```bash
curl "https://v1.apizero.cn/api/csdn-profile?username=weixin_44906759&key=YOUR_API_KEY"
```

## 6. 响应字段

| 字段 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- |
| `nickname` | `string` | 昵称 | — |
| `code_age_years` | `number` | 码龄（年） | — |
| `total_views` | `number` | 总访问量 | — |
| `fans_count` | `number` | 粉丝数 | — |
| `blog_rank` | `number` | 博客总排名 | — |
| `medals` | `array` | 勋章列表 | — |
| `achievements` | `array` | 成就明细 | — |

## 7. 响应示例

```json
{
    "code": 0,
    "msg": "成功",
    "data": {
        "nickname": "XXX",
        "code_age_years": 5,
        "fans_count": 1234
    }
}
```

## 8. 错误码

| code | status | 说明 |
| --- | --- | --- |
| `4000` | `—` | 用户名格式错误 |
| `4000` | `—` | 该 CSDN 用户不存在或未激活 |

## 9. 变更日志

- **1.0.0** (2026-05-07)
  - 首次上线 · 含勋章/成就/原力等级

---

**极数本源** · 全部 API: `https://apizero.cn/aidocs` · 人类版本：`https://apizero.cn/marketplace/csdn-profile`

Source: `https://apizero.cn/aidocs/csdn-profile/raw.md`
Last updated: 2026-05-11T16:46:08+08:00
