返回顶部
s

steamcommunitySteam社区库存

Retrieves Steam inventory data for a user from steamcommunity.com

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
1,024
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

steamcommunity

Steam社区库存技能

从steamcommunity.com检索和浏览Steam用户的库存。

设置

  1. 1. 找到你的Steam ID(SteamID64)
- 前往你的Steam个人资料页面 - 如果你的URL是https://steamcommunity.com/profiles/76561198012345678,你的Steam ID就是76561198012345678 - 如果你的URL使用自定义名称如https://steamcommunity.com/id/myname,请访问steamid.io并粘贴你的个人资料URL以获取SteamID64
  1. 2. 获取你的Steam会话Cookie(在获取自己的库存时绕过速率限制所需):
- 在浏览器中登录steamcommunity.com - 打开开发者工具(F12)> 应用程序标签 > Cookie > https://steamcommunity.com - 复制steamLoginSecureCookie的值
  1. 3. 设置环境变量:
bash export STEAM_ID=你的-steamid64 export STEAM_COOKIES=steamLoginSecure=你的-cookie-值

使用方法

所有命令均使用curl访问Steam社区库存端点。所有标准游戏库存的上下文ID均为2。

常见应用ID

游戏应用ID
CS2 / CS:GO730
军团要塞2
440 | | Dota 2 | 570 | | 腐蚀 | 252490 | | 绝地求生 | 578080 | | Steam社区(交易卡等) | 753 |

获取某个游戏的库存

将$APP_ID替换为游戏的应用ID(见上表)。所有标准游戏库存的上下文ID均为2。

bash
curl -s https://steamcommunity.com/inventory/$STEAMID/$APPID/2?l=english&count=2000 \
-H Cookie: $STEAM_COOKIES | jq .

获取CS2库存

bash
curl -s https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000 \
-H Cookie: $STEAM_COOKIES | jq .

获取物品摘要(名称和数量)

bash
curl -s https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000 \
-H Cookie: $STEAMCOOKIES | jq [.descriptions[] | {markethash_name, type}]

获取物品详情(资产ID映射到描述)

bash
curl -s https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000 \
-H Cookie: $STEAMCOOKIES | jq {assets: [.assets[] | {assetid, classid, instanceid, amount}], total: .totalinventory_count}

分页获取(适用于超过2000件物品的库存)

当有更多物品时,API会返回lastassetid字段。将其作为startassetid传递以获取下一页:

bash
curl -s https://steamcommunity.com/inventory/$STEAMID/730/2?l=english&count=2000&startassetid=$LASTASSETID \
-H Cookie: $STEAM_COOKIES | jq .

通过检查响应中的more_items字段(如果还有更多则为1)来判断是否有更多页面。

响应格式

库存端点返回包含以下关键字段的JSON:

字段描述
assets物品数组,包含appid、contextid、assetid、classid、instanceid、amount
descriptions
物品元数据数组:markethashname、name、type、icon_url、tradable、marketable、标签等 |
| totalinventorycount | 库存中的物品总数 |
| more_items | 如果还有更多页面则为1(否则不出现) |
| lastassetid | 返回的最后一个资产ID;用作下一页的startassetid |
| success | 如果请求成功则为1 |

资产通过classid + instanceid链接到描述。

注意事项

  • - 速率限制:社区端点对IP有严格的速率限制。使用自己的Cookie可以绕过对自己库存的限制。如果没有Cookie,几次请求后可能会遭遇IP封禁(冷却时间约6小时)。
  • 间隔:如果获取多个库存或页面,请求之间至少等待4秒。
  • count参数:最大值为5000,但建议使用2000以避免问题。
  • 上下文ID:所有标准游戏库存使用2。Steam社区物品(应用ID 753)对于某些物品类型也使用上下文ID 6。
  • 私密个人资料:库存必须设置为公开,或者你必须以所有者身份进行身份验证。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 steam-community-inventory-1776338781 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 steam-community-inventory-1776338781 技能

通过命令行安装

skillhub install steam-community-inventory-1776338781

下载

⬇ 下载 steamcommunity v1.0.1(免费)

文件大小: 2.42 KB | 发布时间: 2026-4-17 14:35

v1.0.1 最新 2026-4-17 14:35
- Removed the file `.claude/settings.local.json` from the project.
- No changes to usage, documentation, or functionality.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部