开发者 API
面向 SkinCash 上 CS2 (CS:GO) 饰品的免费公开价格源。专为比价网站、聚合器和浏览器扩展打造。无需 API 密钥,无需注册——只需一个简单的 GET 请求。
# 示例响应——按“运行”即可调用实时 API
{
"currency": "USD",
"updated_at": "2026-08-05T12:00:00.000Z",
"count": 25812,
"items": [
{
"market_hash_name": "AK-47 | Redline (Field-Tested)",
"price": 14.50,
"quantity": 12,
"item_page": "https://skincash.gg/en/market/item/ak-47-redline-field-tested"
}
], …
}概览一览
快速开始
一次请求即可获取完整的实时目录。发送 Accept-Encoding: gzip(curl 的 --compressed)——未压缩的完整数据源有几 MB。
curl -s --compressed https://api.skincash.gg/v1/prices你选择的语言会在整个页面中保持一致。
身份验证
该 API 是公开的——每个端点都是普通的 GET,无需注册,无需 OAuth。CORS 已开放,因此你可以直接从浏览器调用。只需发送请求:
匿名访问按 IP 进行速率限制(见 速率限制)。如果你运营聚合器或扩展并需要更高限额,我们会签发免费的合作伙伴密钥以提高你的限额——其他行为不变。将其作为 Authorization: Bearer 请求头(或 X-API-Key)发送:
curl -s --compressed \
-H "Authorization: Bearer YOUR_API_KEY" \
https://api.skincash.gg/v1/prices请通过 [email protected] 申请密钥。请将其保存在服务器端;像对待密码一样对待它。
端点
curl -s --compressed https://api.skincash.gg/v1/prices{
"currency": "USD",
"updated_at": "2026-08-05T12:00:00.000Z",
"count": 25812,
"items": [
{
"market_hash_name": "AK-47 | Redline (Field-Tested)",
"price": 14.50,
"quantity": 12,
"item_page": "https://skincash.gg/en/market/item/ak-47-redline-field-tested"
}
]
}按确切的 Steam 名称(URL 编码)查询单个商品。若当前未在售则返回 404。
market_hash_namestring · 必填确切的 Steam market_hash_name,需 URL 编码。curl -s --compressed \
"https://api.skincash.gg/v1/prices/AK-47%20%7C%20Redline%20(Field-Tested)"{
"currency": "USD",
"updated_at": "2026-08-05T12:00:00.000Z",
"market_hash_name": "AK-47 | Redline (Field-Tested)",
"price": 14.50,
"quantity": 12,
"item_page": "https://skincash.gg/en/market/item/ak-47-redline-field-tested"
}商品元数据——所有在售商品的图片、类型、稀有度(不含价格)。让你无需抓取即可渲染并关联 SkinCash 商品列表。与 /prices 采用相同的 5 分钟缓存 + 条件 GET。
curl -s --compressed https://api.skincash.gg/v1/catalog{
"updated_at": "2026-08-05T12:00:00.000Z",
"count": 25812,
"items": [
{
"market_hash_name": "AK-47 | Redline (Field-Tested)",
"image": "https://cdn.skincash.gg/sc/economy/image/class/730/…",
"type": "Rifle",
"rarity": "Classified"
}
]
}按(部分)名称搜索商品 → 买入价 + 规范深度链接。这是比价工具和浏览器扩展进行比价与点击跳转的入口。精确/前缀匹配排在最前。
qstring · 必填2–200 个字符,不区分大小写。limitinteger · 可选1–100,默认 50。curl -s "https://api.skincash.gg/v1/search?q=redline&limit=5"{
"currency": "USD",
"updated_at": "2026-08-05T12:00:00.000Z",
"query": "redline",
"count": 1,
"items": [
{
"market_hash_name": "AK-47 | Redline (Field-Tested)",
"price": 14.50,
"quantity": 12,
"item_page": "https://skincash.gg/en/market/item/ak-47-redline-field-tested"
}
]
}整个 API 的机器可读 OpenAPI 3.1 规范——代码生成器、API 客户端和 LLM 的首选入口。
curl -s https://api.skincash.gg/v1/openapi.json响应结构
数据源级别的 updated_at 代表每一行的新鲜度:所有价格在每个周期(约 5 分钟)一同刷新。价格即客户支付的买入价。
高效轮询 (ETag / 304)
每个响应都带有 ETag 和 Last-Modified。在下次轮询时回传它们,当内容无变化时即可获得一个廉价的 304 Not Modified(无响应体)——你可以随意频繁轮询而无需重新下载整个目录。
# Save the ETag from the first response, then:
curl -s -o /dev/null -w "%{http_code}\n" \
-H 'If-None-Match: "your-saved-etag"' \
https://api.skincash.gg/v1/prices
# -> 304 when unchanged, 200 (with body) when refreshed速率限制
完整转储——/prices、/catalog
轻量读取——/prices/{name}、/search
限额按 IP 计算,并按负载权重区分。数据源已缓存,因此配合条件请求,5 分钟一次的轮询远不会触及上限。超出限额会返回 429 RATE_LIMITED 并附带 Retry-After 请求头。需要为高流量集成获得更高限额?联系我们咨询合作伙伴密钥。
版本与稳定性
API 通过路径进行版本管理(/v1)。在同一版本内我们只会新增字段——现有字段绝不会被重命名、移除或改变类型,因此你的解析器不会崩溃。破坏性变更会作为新版本发布,并提前通知。
错误
错误始终采用统一一致的响应体结构:
{
"success": false,
"error": {
"error_code": "NOT_FOUND",
"message": "No live price for this item."
}
}