https://store-site-backend-static.ak.epicgames.com/freeGamesPromotionshttps://store-site-backend-static.ak.epicgames.com/freeGamesPromotions?locale=zh-CN&country=CNEpic 商店的促销接口,不用密钥。返回结构比较深,路径是 data.Catalog.searchStore.elements。
关键字段:title(游戏名)、description、originalPrice(原价,单位分)、price.totalPrice.discountPrice(现价,0 就是白送)、keyImages(封面图数组,挑 type 为 Thumbnail 的那张)、productSlug(拼领取链接用)。
判断「本周免费」的办法:discountPrice 为 0 且 seller.name 是 Epic Games Store。promotions 字段里有开始和结束时间,据此判断是否在活动期。返回 46KB,建议缓存半小时。
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
locale |
string | 选填 | zh-CN | 语言,zh-CN 为简体中文 |
country |
string | 选填 | CN | 国家代码,影响价格与可售状态 |
https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions
此处将显示接口返回结果…
{
"data": {
"Catalog": {
"searchStore": {
"elements": [
{
"title": "Them's Fightin' Herds",
"description": "2D 格斗游戏",
"price": { "totalPrice": { "discountPrice": 0, "originalPrice": 6999 } },
"productSlug": "thems-fightin-herds"
}
]
}
}
}
}
—