开发者 API

Steam Profile API

解析任意格式的 SteamID,获取资料元数据,每次调用最多批量获取 20 个资料。

Steam Profile API 接口

所有接口都返回有文档说明的响应,并使用相同的 Steamwebapi 密钥参数。

GET /steam/api/profile
GET /steam/api/profile/batch
GET /steam/api/info/steamid
GET /explore/api/profile

Steam Profile API — 快速开始

与其他有文档说明的接口一样,使用相同的 Steamwebapi 密钥参数。从控制面板获取 API 密钥,几分钟内即可发送第一个请求。

  • 一个 API 密钥,规范化响应。
  • 请求速率限制取决于你的套餐级别。
  • 完整架构请参阅 API 参考文档.
API 请求
# curl with API key
curl "https://www.steamwebapi.com/steam/api/profile?id=76561198000000000&state=minimal&key=$KEY"
# PHP
$res = file_get_contents('https://www.steamwebapi.com/steam/api/profile?id=76561198000000000&state=minimal&key=' . $KEY);
$data = json_decode($res, true);
# Node.js
const r = await fetch(`https://www.steamwebapi.com/steam/api/profile?id=76561198000000000&state=minimal&key=${KEY}`);
const data = await r.json();

关于此 API

Steam Profile API 规整每一种 Steam 标识符变体——SteamID32、SteamID64、个性化网址、资料网址——并返回一个干净的资料 DTO,包含用户名、头像、国家/地区、创建日期和交易资格。

Steam Profile API — 常见问题

Steamwebapi 是什么,提供哪些数据?

Steamwebapi 是一个独立平台,为生产集成提供标准化的库存、市场、资料和 CS2 数据。

支持哪些 Steam 游戏和 API 端点?

已配置游戏包括 CS2、Dota 2、Rust 和 TF2;当前端点覆盖范围请查看文档。

集成 API 需要多久,示例在哪里?

创建密钥,选择端点,并使用文档、实时预览或 GitHub 中的认证示例。

开始使用 Steam Profile API

一个密钥,访问所有 Steam 接口。