开发

获取 Feed 物料接口

接口功能

批量获取 Feed 物料接口

URL

https://openapi.baidu.com/rest/2.0/smartapp/osa/material/search

调用方式

GET

是否可重入

支持数据格式

JSON

参数说明

参数名 类型 必填 说明
union_sign String 签名,生成方式见签名说明
union_timestamp Long 时间戳,时间标准为 UTC ,取当前请求时间
union_nocestr String 随机字符串,每次请求生成一个新的随机字符串,随机 串长度不能超过 64 位,可以有数字、字母、连接符、- 组成
access_token String access_token
app_keys String 支持多个小程序 Appkey ,使用英文逗号分隔多个建议 只使用一个。app_keys 不使用的时候不用传,最多支持 20 个
start_date String 创建的开始时间 20190216
end_date String 创建的结束时间 20190217 ,与 start_date 必须成对出现,如例子,会获取 createtime 在 2019 年 02 月 16 日 0 点 0 分 0 秒至 2019 年 02 月 17 日 0 点 0 分 0 秒的数据
page_num Long 分页拉取当前第几页(从 1 开始计数)
page_size Long 每页获取最大数量,不能超过 100

返回字段

Data Object说明

字段 类型 描述
appList Array 物料列表
hasMore Int 是否还有下一页

List_Array_Item 说明

字段 类型 描述
mid Int 物料 id
appKey String 小程序、小游戏 product_key
tags String 标签
images String 图片数组
cardStyle Int card_style 根据类型判断有视频类:1001 ,直播类:1000 和图文:1002
createTime long 创建时间
feedSubType String feed 的物料类型
feedType String feed 的物料类型
getFrom String 来源 API 。提交:openApi ,抓取:crawler
imageStyle Int 小游戏图片类型(大图 小图 竖图)
mappSubType Int 小程序类型
mappType Int 小程序类型
path String 落地路径
feedStatus Int 物料流转状态
title String 物料 title

返回示例

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
{
"errno":0,
"msg":"success",
"timestamp":1572852821,
"data":{
"appList":[
{
"appKey":"flFqXclepWs7RdugAszy9eERL7G5dS0I",
"tags":"",
"images":"[{\"url\":\"https://b.bdstatic.com/miniapp/resource/image/20191019/41620c58-ccd7-4c13-85d7-41e38053c3f0.jpg\",\"width\":1280,\"height\":720}]",
"cardStyle":1001,
"createTime":1571456752115,
"feedSubType":"美食",
"feedType":"生活",
"getFrom":"crawler",
"imageStyle":0,
"mappSubType":1002,
"mappType":1000,
"path":"/pages/pb/pb?tid=6301392316",
"feedStatus":3,
"title":"吃了多年的牛肉,还是这种吃法最过瘾,一口一块好吃得停不下来!",
"mid":"1512118734274080836"
}
],
"hasMore":1
},
"request_id":"be6555b8a8614aa8816a55ebf3ec720e"
}