Steam在线TOP
查询 Steam 全球同时在线排行榜(Top100 游戏)。
GET
https://api.tinyaii.cn/v1/steam/top
请求参数
该接口无需请求参数,直接调用即可返回数据。
返回字段
| 字段 | 类型 | 说明 |
|---|---|---|
| data.count | int | 游戏数量 |
| data.games | array | 排行榜 |
| data.games[].rank | int | 排名 |
| data.games[].appid | int | AppID |
| data.games[].name | string | 游戏中文名(异步填充,首次可能为空) |
| data.games[].peak_in_game | int | 历史峰值在线人数 |
| data.games[].last_week_rank | int | 上周排名 |
返回示例
{
"code": 200,
"data": {
"count": 100,
"games": [
{
"appid": 730,
"last_week_rank": 1,
"peak_in_game": 1275982,
"rank": 1
},
{
"appid": 578080,
"last_week_rank": 2,
"peak_in_game": 732248,
"rank": 2
}
]
},
"message": "success"
}
调用示例
curl "https://api.tinyaii.cn/v1/steam/top" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.tinyaii.cn/v1/steam/top", {
headers: { "Authorization": "Bearer YOUR_API_KEY" },
});
console.log(await res.json());import requests
resp = requests.get(
"https://api.tinyaii.cn/v1/steam/top",
params=None,
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=10,
)
print(resp.json())把 YOUR_API_KEY 换成你的密钥即可直接运行。密钥只保存在你自己的设备上。