图片推荐-行业优秀配图
此接口返回指定行业下表现优秀的配图,用于推广组配图参考。不传行业参数时,按鉴权账户所属的一二级行业查询。所有查询均排除本账户自身的图片。
HTTP请求方式
POST
请求地址
Headers 请求参数
| 字段 | 类型 | 必须 | 描述 |
|---|---|---|---|
| apiKey | string | yes | 注册时分配到的api key,该参数作为HTTP HEAD字段传递。 |
| accessToken | string | yes | 身份认证通过后平台分配的临时token,作为操作对应广告账户的凭证,10小时有效。参数获取方式见接口clientLogin |
Body 请求参数
| 字段 | 类型 | 必须 | 描述 |
|---|---|---|---|
| industry_id | int | no | OpenAPI 编码后的一级行业 ID。只传此项时,合并该一级行业下所有未删除的二级行业后分组推荐。 |
| sub_industry_id | int | no | OpenAPI 编码后的二级行业 ID。可单独传入;若同时传入一级行业 ID,两者必须是父子关系。 |
| source_type | int | no | 设备类型:3-PC,4-移动。不传默认返回全部设备类型 |
| img_type | int | no | 图片类型:0-已确认保留,1-自提,2-推荐配图,3-AI配图。不传默认包含全部类型 |
| recommend_type | int | no | 推荐类型:1-高展现,2-高消费,3-高CTR。不传默认返回全部推荐类型 |
请求示例
以下示例指定二级行业。若要查询某一级行业下的全部二级行业,只传 industry_id,省略 sub_industry_id,不要传 0。
curl --location 'https://api.e.360.cn/dianjing/picture/industryRecommend' \
--header 'apiKey:APIKEY' \
--header 'accessToken:ACCESSTOKEN' \
--data-urlencode 'sub_industry_id=2781023081' \
--data-urlencode 'source_type=3' \
--data-urlencode 'img_type=1' \
--data-urlencode 'recommend_type=1'
返回结果
{
"user_id": 2563420133,
"industry": {
"industry_id": 2781059689,
"industry_name": "化工及材料",
"sub_industry_id": 2781023081,
"sub_industry_name": "化工材料"
},
"groups": [
{
"source_type": 3,
"recommend_type": 1,
"pictures": [
{
"picture_url": "http://p3.qhimg.com/t118a9afd1a5f297d3dd9a767e8.jpg",
"source_type": 3,
"img_type": 1,
"recommend_type": 1,
"rank_num": 1,
"views": 7513,
"total_cost": 63.49,
"ctr": 0.013044056967922268
},
{
"picture_url": "http://p6.qhimg.com/t11869259ce61ce6710a4667c8a.png",
"source_type": 3,
"img_type": 1,
"recommend_type": 1,
"rank_num": 2,
"views": 4349,
"total_cost": 1800.48,
"ctr": 0.039319383766383074
},
{
"picture_url": "https://p0.ssl.qhimg.com/t118a9afd1a2fde8d642369ef32.png",
"source_type": 3,
"img_type": 1,
"recommend_type": 1,
"rank_num": 3,
"views": 2169,
"total_cost": 9.32,
"ctr": 0.013831258644536652
},
{
"picture_url": "http://p8.qhimg.com/t11869259ce8d571baa1c1094f6.jpg",
"source_type": 3,
"img_type": 1,
"recommend_type": 1,
"rank_num": 4,
"views": 2097,
"total_cost": 38.77,
"ctr": 0.003814973772055317
},
{
"picture_url": "http://p1.qhimg.com/t11869259cecf2f459a7d32ee3a.jpg",
"source_type": 3,
"img_type": 1,
"recommend_type": 1,
"rank_num": 5,
"views": 2030,
"total_cost": 23.18,
"ctr": 0.0004926108374384236
}
]
}
]
}
返回结果说明
| 字段 | 类型 | 描述 |
|---|---|---|
| user_id | int | 账户ID |
| industry | json | 本次查询实际使用的行业信息 |
| industry_id | int | 一级行业ID |
| industry_name | string | 一级行业名称 |
| sub_industry_id | int | 二级行业ID |
| sub_industry_name | string | 二级行业名称;只传一级行业时为“全部” |
| groups | array | 推荐结果分组列表,按 source_type × recommend_type 分组 |
| source_type | int | 设备类型:3-PC,4-移动 |
| recommend_type | int | 推荐类型:1-高展现,2-高消费,3-高CTR |
| pictures | array | 该分组下的推荐图片列表,每组最多返回5张 |
| picture_url | string | 图片URL |
| img_type | int | 图片类型:0-已确认保留,1-自提,2-推荐配图,3-AI配图 |
| rank_num | int | 排除当前账户并完成组内排序后的序号,范围1-5 |
| views | int | 展现量 |
| total_cost | double | 消费金额(元) |
| ctr | double | 点击率(小数) |