Public API

基于 SteamTools API 构建

首页使用的同一组接口,原样以 HTTP 暴露给你。无鉴权、无 SDK、无锁定——终端里直接 curl 就能用。

生成 manifest + Lua 对

POST/api/generate

先校验 App ID 是否在 Steam 商店里,然后返回 .manifest 与 .lua 文件的官方 CDN URL。非 public 分支必须存在于该 App ID。

Request body

appId
数字 Steam App ID。
branch
可选。取值:public, beta, beta_1, ptb, experimental, staging。默认 public。

示例请求

bash
curl -s -X POST "https://steamtools.games/api/generate" \
  -H "Content-Type: application/json" \
  -d '{"appId": "400", "branch": "public"}' | jq

示例响应

json
{
  "code": 0,
  "message": "ok",
  "data": {
    "appId": "400",
    "branch": "public",
    "gameName": "Portal",
    "gameImage": "https://shared.cloudflare.steamstatic.com/store_item_assets/steam/apps/400/capsule_231x87.jpg",
    "manifestUrl": "https://shared.fastly.steamstatic.com/steamtools/manifests/400_public.manifest",
    "luaUrl": "https://shared.fastly.steamstatic.com/steamtools/scripts/400_public.lua",
    "instructions": [
      "1. Create a depotcache folder next to SteamTools if you don't have one.",
      "2. Drop the manifest file (400_public.manifest) into the depotcache folder.",
      "3. Drop the matching Lua script into the SteamTools root directory.",
      "4. Restart SteamTools and the game will appear in your library.",
      "5. Branches available for this App ID: public."
    ],
    "generatedAt": "2026-06-30T12:34:56.000Z"
  }
}

JSON 对象,包含 manifestUrl、luaUrl、gameName、gameImage 以及分步安装说明。

限流与公平使用

搜索接口每 IP 每 300 ms 限一次;生成接口每 1.5 s 限一次。没有每日配额。需要更高吞吐可以自部署——本项目开源。

OpenAPI 3.1 规范

完整 Schema 以静态 JSON 文件提供,可直接导入 Postman、Insomnia 或 CI 校验流程。

下载 openapi.json

常见问题

需要 API Key 吗?
不需要。接口完全公开、免费、无鉴权。出于稳定性考虑只按 IP 做限流。
可以用于商业产品吗?
可以,但请遵守 Steam 的服务条款,不要把清单文件包装在广告或付费墙后。
为什么用 JSON 而不是 XML?
JSON 是最大公约数。结构与首页生成器一致,能与首页通信的客户端就能对接 API。