1. 基本信息
| 接口地址 | https://v1.apizero.cn/api/unshort |
|---|
| 请求方法 | GET |
|---|
| 分类 | dev |
|---|
| 提供方 | 极数本源 |
|---|
| 计费模式 | 免费试用 |
|---|
| 单次消耗 | 0 积分 |
|---|
| 起步价 | — |
|---|
| QPS 限制 | 5 req/s |
|---|
| 每日免费额度 | 200 次(已认证用户) |
|---|
| 匿名每日额度 | 30 次(无 API Key) |
|---|
| VIP 免费 | 否 |
|---|
| 调用次数 | |
|---|
3. 请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|
url | string | 是 | 要展开的短链 | https://t.cn/A6xxxx |
max_hops | number | 否 | 最大跳转次数(1-30,默认 10) | — |
5. 请求示例 (cURL)
curl "https://v1.apizero.cn/api/unshort?url=https%3A%2F%2Ft.cn%2FA6xxxx&max_hops=%3Cmax_hops%3E&key=YOUR_API_KEY"
6. 响应字段
| 字段 | 类型 | 说明 | 示例 |
|---|
original_url | string | 原始 URL | — |
final_url | string | 最终落地 URL | — |
hops | number | 跳转次数(含最终页) | — |
total_time_ms | number | 总耗时(毫秒) | — |
chain | array | 每一跳的明细 {hop, url, status, method, duration_ms, next} | — |
is_redirect | bool | 是否发生重定向 | — |
7. 响应示例
{
"code": 0,
"msg": "成功",
"data": {
"original_url": "https:\/\/t.cn\/Aabc",
"final_url": "https:\/\/example.com\/landing",
"hops": 2,
"total_time_ms": 412,
"chain": [
{
"hop": 1,
"url": "https:\/\/t.cn\/Aabc",
"status": 302,
"method": "Location",
"duration_ms": 120,
"next": "https:\/\/example.com\/landing"
},
{
"hop": 2,
"url": "https:\/\/example.com\/landing",
"status": 200,
"method": "final",
"duration_ms": 292
}
],
"is_redirect": true
}
}
8. 错误码
| code | status | 说明 |
|---|
4000 | — | url 为空或不以 http/https 开头;max_hops 越界 |
9. 变更日志
- 1.0.0(2026-05-07)
- 首次上线 · 含 Meta-Refresh / JS location 识别