番茄榜单分类
番茄小说榜单分类列表,返回37个分类(男频19+女频18),含分类ID/名称/性向,供榜单查询参数使用。
GET
https://api.tinyaii.cn/v1/fanqie/categories
请求参数
该接口无需请求参数,直接调用即可返回数据。
返回字段
| 字段 | 类型 | 说明 |
|---|---|---|
| total | int | 分类总数(37) |
| categories | array | 分类列表 |
| categories[].category_id | string | 分类ID |
| categories[].name | string | 分类名 |
| categories[].gender | int | 性向:1=男频,0=女频 |
| categories[].gender_name | string | 性向名 |
返回示例
{
"code": 200,
"message": "success",
"data": {
"total": 37,
"categories": [
{
"category_id": "1141",
"name": "西方奇幻",
"gender": 1,
"gender_name": "男频"
}
]
}
}
调用示例
curl "https://api.tinyaii.cn/v1/fanqie/categories" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.tinyaii.cn/v1/fanqie/categories", {
headers: { "Authorization": "Bearer YOUR_API_KEY" },
});
console.log(await res.json());import requests
resp = requests.get(
"https://api.tinyaii.cn/v1/fanqie/categories",
params=None,
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=10,
)
print(resp.json())把 YOUR_API_KEY 换成你的密钥即可直接运行。密钥只保存在你自己的设备上。