Steam游戏价格
查询 Steam 游戏当前价格、折扣信息(国区人民币)。
GET
https://api.tinyaii.cn/v1/steam/price
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| appid | int | 可选 | Steam AppID | — |
| name | string | 可选 | 游戏名称 | — |
返回字段
| 字段 | 类型 | 说明 |
|---|---|---|
| data.appid | int | Steam AppID |
| data.currency | string | 货币单位 |
| data.initial | float | 原价(元) |
| data.final | float | 当前价格(元) |
| data.discount_percent | int | 折扣百分比 |
| data.final_formatted | string | 格式化价格 |
返回示例
{
"code": 200,
"data": {
"appid": 730,
"price": "免费或未上架"
},
"message": "success"
}
调用示例
curl "https://api.tinyaii.cn/v1/steam/price?appid=1&name=<name>" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.tinyaii.cn/v1/steam/price?appid=1&name=<name>", {
headers: { "Authorization": "Bearer YOUR_API_KEY" },
});
console.log(await res.json());import requests
resp = requests.get(
"https://api.tinyaii.cn/v1/steam/price",
params={"appid": "1", "name": "<name>"},
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=10,
)
print(resp.json())把 YOUR_API_KEY 换成你的密钥即可直接运行。密钥只保存在你自己的设备上。