智能小程序OPENCARD
开放类目

游戏排行榜

用户在移动端搜索 PC/主机游戏排行榜、游戏推荐等需求时,比如“steam 游戏销量榜”,搜索会展现该卡片,提供游戏榜单信息。

示意图

intent 上传接口

当前资源 intent 意图参数

key 类型 含义 必选/可选 示例/说明
game_platform string 游戏平台(包括硬件平台、软件平台及知名游戏媒体) 必选 steam

注释:

  1. 游戏排行榜卡片召回 query 可分为两个部分:intent、常量词。intent 如上表所示,常量词有百度产品同学填写(如“游戏、游戏排行、…”),若需扩充常量词,请联系百度产品同学;
  2. 以上 intent 在填写时若出现英文字母,请全部用小写字母。

通过平台上传 txt 文件

资源方需要将自己落地页数据能够覆盖的所有 intent 参数组合通过 txt 文件上传到平台上,txt 文件的具体要求参见接入流程-上传 Intent 数据

当前资源分类 txt 上传文件内容示例如下:

1
2
3
{"game_platform":"switch"}
{"game_platform":"ns"}
{"game_platform":"ps4"}

通过开放 API 上传

详细接入方式参见 API 上传方式

Webhook API

发送给 webhook 的请求

公共字段

key 类型 含义 示例/说明
type string 请求类型 在小程序阿拉丁下永远为 “sp_ala”
surface string 搜索场景 mobile: 支持小程序的移动搜索,web_h5: 支持 H5 的移动搜索
srcid string 资源编号 每个资源分类不同
intent object 搜索意图参数 JSON 对象,每个资源分类不同

当前资源 srcid 资源编号

key 类型 含义 设定
srcid string 资源编号 48036

当前资源的 intent 参数参考上节 “intent 上传接口“。

举例:发送给 webhook 的 JSON (解密后)

1
2
3
4
5
6
7
8
9
10
11
12
{
"type": "sp_ala",
"srcid": "48036",
"surface": "mobile",
"intent": {
"game_platform": "steam"
},
"query_info": {
"game_type": "FPS",
"board_region": "欧美"
}
}

注:query_info 中的信息体现搜索用户的精准需求,开发者需要按照 query_info 中的信息返回数据

从 webhook 返回的结果

外层通用数据字段

key 类型 含义 示例/说明
status integer 结果状态码,0 代表正确,1 代表无结果,
2 代表请求参数错误,3 代表内部服务错误
0
msg string 出错消息,当非 0 时提供 “”
data object 要返回的资源数据内容 JSON 对象,每个资源分类不同

当前资源分类的 data object 字段内容

key 类型 要求 说明
jump_url string 必选 卡片标题的跳转链接,跳至游戏排行榜落地页。H5 的跳转链接要去掉域名。例如:/games/hzwwqfb/;小程序的跳转,使用“/page/of/target”
item_list array 必选 游戏图文数组,数量为 6-15, 且能被 3 整除
item_list.game_name_cn string 必选 游戏的中文全称,填写示例:“侠盗猎车手 5”
item_list.image string 必选 游戏封面链接,图片尺寸 3 : 4,像素 255*340
item_list.score number 必选 游戏评分,用来控制星级展示,保留一位小数。填写示例:“9.2”
item_list.score_max number 必选 最大评分,根据实际情况填写,单个榜单内的最大评分需统一。填写示例:“10”
item_list.score_text string 必选 评分的描述文案,保留一位小数。填写示例:“9.2 分”
item_list.game_name_eg string 必选 游戏的英文全称,填写示例:“Red Dead Redemption 2”
item_list.game_type string 可选 游戏类型,格式需一致。填写示例:“模拟经营 SIM”,当 query 已明确游戏类型时,则不选
item_list.game_lang string 必选 游戏语言,格式需一致。填写示例:“中文/英文”
item_list.game_tag array 必选 游戏标签数组,标签最少 1 个,最多 3 个
item_list.game_url string 必选 游戏图文的跳转链接。H5 的跳转链接要去掉域名,例如:/games/a/2396308.html;小程序的跳转,使用“/page/of/target”
board_time string 必选 榜单更新时间。示例填写:“榜单更新时间:2019-12-30”

举例:从 webhook 返回的 JSON (加密前)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
"status": 0,
"msg": "",
"data": {
"jump_url": "/page/of/target?id=1",
"item_list": [
{
"game_name_cn": "侠盗猎车手5",
"image": "https://imgs.ali213.net/oday/uploadfile/2013/04/03/gta.jpg",
"score": 9.2,
"score_max": 10,
"score_text": "9.2分",
"game_name_eg": "Grand Theft Auto V",
"game_type": "动作游戏ACT",
"game_lang": "中文/英文",
"game_tag": ["沙盒", "沙盒", "沙盒"],
"game_url": "/page/of/target?id=1"
},
{
"game_name_cn": "侠盗猎车手5",
"image": "https://imgs.ali213.net/oday/uploadfile/2013/04/03/gta.jpg",
"score": 9.2,
"score_max": 10,
"score_text": "9.2分",
"game_name_eg": "Grand Theft Auto V",
"game_type": "动作游戏ACT",
"game_lang": "中文/英文",
"game_tag": ["沙盒", "沙盒", "沙盒"],
"game_url": "/page/of/target?id=1"
},
{
"game_name_cn": "侠盗猎车手5",
"image": "https://imgs.ali213.net/oday/uploadfile/2013/04/03/gta.jpg",
"score": 9.2,
"score_max": 10,
"score_text": "9.2分",
"game_name_eg": "Grand Theft Auto V",
"game_type": "动作游戏ACT",
"game_lang": "中文/英文",
"game_tag": ["沙盒", "沙盒", "沙盒"],
"game_url": "/page/of/target?id=1"
},
{
"game_name_cn": "侠盗猎车手5",
"image": "https://imgs.ali213.net/oday/uploadfile/2013/04/03/gta.jpg",
"score": 9.2,
"score_max": 10,
"score_text": "9.2分",
"game_name_eg": "Grand Theft Auto V",
"game_type": "动作游戏ACT",
"game_lang": "中文/英文",
"game_tag": ["沙盒", "沙盒", "沙盒"],
"game_url": "/page/of/target?id=1"
}
],
"board_time": "榜单更新时间:2019-12-26"
}
}
反 馈帮 助 回 到顶 部