Steam游戏搜索
按名称搜索 Steam 游戏,返回 AppID、名称、价格、折扣信息。
GET
https://api.tinyaii.cn/v1/steam/search
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| keyword | string | 必填 | 搜索关键词 | CS2 |
| limit | int | 可选 | 返回数量,默认10 | — |
返回字段
| 字段 | 类型 | 说明 |
|---|---|---|
| data.count | int | 搜索结果数量 |
| data.items | array | 游戏列表 |
| data.items[].appid | int | Steam AppID |
| data.items[].name | string | 游戏名称 |
| data.items[].type | string | 类型(game/dlc) |
| data.items[].image | string | 封面图 |
| data.items[].price | float | 当前价格(元) |
| data.items[].discount_percent | int | 折扣百分比 |
返回示例
{
"code": 200,
"data": {
"count": 2,
"items": [
{
"appid": 730,
"discount_percent": null,
"image": "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/730/capsule_231x87_schinese.jpg?t=1780435263",
"name": "Counter-Strike 2",
"price": null,
"type": "app"
},
{
"appid": 666220,
"discount_percent": null,
"image": "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/666220/capsule_231x87.jpg?t=1743163970",
"name": "CS2D",
"price": null,
"type": "app"
}
]
},
"message": "success"
}
调用示例
curl "https://api.tinyaii.cn/v1/steam/search?keyword=CS2" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.tinyaii.cn/v1/steam/search?keyword=CS2", {
headers: { "Authorization": "Bearer YOUR_API_KEY" },
});
console.log(await res.json());import requests
resp = requests.get(
"https://api.tinyaii.cn/v1/steam/search",
params={"keyword": "CS2"},
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=10,
)
print(resp.json())把 YOUR_API_KEY 换成你的密钥即可直接运行。密钥只保存在你自己的设备上。