操作说明
一、成为开发者
点击开放平台导航栏顶部的“登录/注册”按钮,输入账号,完成登录。如果您未注册账号,可以点击此处注册账号。开放平台登录成功后,系统赠送 500 次供您测试 API 接口。
二、获取密钥
在您注册且登录后,平台将会为您分配相关凭证,主要为 AppId 和 AppSecret。这两个信息是您应用实际开发的主要凭证,请您妥善保管。
三、启动开发
目前易用定制为您提供了多种 API 接口,您可以查看 API 总览,了解具体使用方法及参数。
获取 Token
- token 是易用定制全局唯一接口调用凭据,调用各接口时都需使用 token。开发者需要进行妥善保存。token 的存储至少要保留 512 个字符空间。token 的有效期目前为 2 个小时,需定时刷新,重复获取将导致上次获取的 token 失效。
- 获取token后,将token值加入到HTTP请求头里, request headers中加入 token: “token值”
服务器地址
https://open-api.yizhuan5.com
请求说明
接口地址: /api/open/api/base/token
请求方式:GET
输入参数
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
AppId | string | AppId | 是 | |
AppSecret | string | AppSecret | 是 | |
输出参数
参数 | 类型 | 说明 |
---|
token | string | token |
expire_seconds | int | token 有效期,单位秒 |
完整返回结果
{
"code": "string",
"msg": "string",
"data": {
"token": "string",
"expire_seconds": 0
}
}
原创度检测
请求说明
接口地址: /api/open/api/explosive/originalanalysis
请求方式:POST
Content-Type:application/json
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
title | string | 标题 | 是 | |
content | string | 内容 | 是 | |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": {
"listR": [
{
"code": 0,
"content": "",
"checkContent": "",
"rvBaiDuStr": "85.26 %",
"rV360Str": "54.67 %"
},
{
"code": 0,
"content": "",
"checkContent": "",
"rvBaiDuStr": "100 %",
"rV360Str": "100 %"
},
...
],
"score": {
"baidu": "15.22",
"_360": "35.38",
"score": "25.30"
}
}
}
python代码方法示例:
def get_token(AppId, AppSecret):
url = 'https://open-api.yizhuan5.com/api/open/api/base/token'
params = {
"AppId": AppId,
"AppSecret": AppSecret
}
response = requests.get(url, params=params)
if response.status_code == 200:
json_data = response.json()
return json_data["data"]["token"]
else:
print('---- 获取token http状态码:{}'.format(response.status_code))
def get_yuanchuangdu(title, content, token):
url = 'https://open-api.yizhuan5.com/api/open/api/explosive/originalanalysis'
data = {
'title': title,
'content': content
}
headers = {
'Content-Type': 'application/json',
'token': token
}
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
json_data = response.json()
score = json_data['data']['score']['score']
return score
其他接口
-------------------------------------------------------------------------------------------------------------
获取自媒体平台
请求说明
接口地址: /api/open/api/base/getmediaplatform
请求方式:GET
输出参数
参数 | 类型 | 说明 |
---|
pid | int | 平台 ID |
platename | string | 平台名称 |
完整返回结果
{
"code": "string",
"msg": "string",
"data": [
{
"pid": 0,
"platename": "string"
}
]
}
获取视频平台
请求说明
接口地址: /api/open/api/base/getvideoplatform
请求方式:GET
输出参数
参数 | 类型 | 说明 |
---|
pid | int | 平台 ID |
platename | string | 平台名称 |
完整返回结果
{
"code": "string",
"msg": "string",
"data": [
{
"pid": 0,
"platename": "string"
}
]
}
获取自媒体平台领域
请求说明
接口地址: /api/open/api/base/getmediacategory
请求方式:GET
输入参数
参数 | 类型 | 说明 | 必填项 |
---|
apid | string | 平台 ID | 是 |
输出参数
参数 | 类型 | 说明 |
---|
apid | int | 平台 ID |
acid | int | 领域 ID |
acdes | string | 领域说明 |
完整返回结果
{
"code": "string",
"msg": "string",
"data": [
{
"acid": 0,
"apid": 0,
"acdes": "string"
}
]
}
获取视频平台领域
请求说明
接口地址: /api/open/api/base/getvideocategory
请求方式:GET
输入参数
参数 | 类型 | 说明 | 必填项 |
---|
apid | string | 平台 ID | 是 |
输出参数
参数 | 类型 | 说明 |
---|
apid | int | 平台 ID |
acid | int | 领域 ID |
acdes | string | 领域说明 |
完整返回结果
{
"code": "string",
"msg": "string",
"data": [
{
"acid": 0,
"apid": 0,
"acdes": "string"
}
]
}
爆文数据api
1. 获取文章列表
请求说明
接口地址: /api/open/api/explosive/searchmedia
请求方式:POST
Content-Type:application/json
{
"pageIndex": 0,
"pageSize": 0,
"orderName": "string",
"apid": 0,
"acid": 0,
"startTime": "string",
"endTime": "string",
"amout": 0,
"originnal": 0,
"keys": "string"
}
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
pageIndex | int | 分页索引 | 是 | |
pageSize | int | 分页大小 | 是 | |
mTpye | int | 文章类型 (1:Article(默认) 2:Gallery 3:Video 4:TinyHeadline) | 否 | |
apid | int | 平台 ID | 否 | |
acid | int | 平台领域 ID | 否 | |
keys | string | 关键词 | 否 | |
orderName | int | 排序:1(发布时间)、2(阅读量)、3(评论数) | 否 | 1 |
startTime | string | 起始时间 | 否 | |
endTime | string | 结束时间 | 否 | |
amout | string | 阅读量: 10000、50000、100000、500000 | 否 | |
originnal | int | 是否原创:0(否)、1(是) | 否 | |
输出结果说明
参数 | 类型 | 说明 |
---|
hmctid | int | Id |
apid | int | 平台Id |
acid | int | 领域Id |
hmctdocid | string | 文章Id |
hmcttitle | string | 标题 |
hmctimage | string | 封面 |
hmcttype | string | 类型 |
hmctdate | string | 日期 |
hmctamout | string | 阅读量 |
hmctcommentnum | string | 评论量 |
hmctsource | string | 来源 |
autwebid | string | 作者Id |
hmcturl | string | 链接 |
hmctoriginal | string | 是否原创 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": {
"pageIndex": 1,
"pageSize": 1,
"pageCount": 4500,
"dataCount": 4500,
"list": [
{
"hmctid": 10000011883142,
"apid": 7,
"acid": 14,
"hmctdocid": null,
"hmcttitle": "string",
"hmctimage": "string",
"hmcttype": 1,
"hmctdate": "2018-01-12T10:09:59",
"hmctamout": 501,
"hmctcommentnum": 0,
"hmctsource": "string",
"autwebid": "797225",
"hmcturl": "string",
"hmctoriginal": null
}
]
}
}
2、获取文章详情
请求说明
接口地址: /api/open/api/explosive/searchmediadetail
请求方式:POST
Content-Type:application/json
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
url | string | 链接地址 | | |
输出结果说明
参数 | 类型 | 说明 |
---|
title | string | 标题 |
platename | string | 平台名称 |
content | string | 内容 |
word | string | 摘要 |
url | string | 链接 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": {
"title": "string",
"platename": "string",
"content": "string",
"word": "string",
"url": "string"
}
}
热点热词api
1、实时热词支持的平台
请求说明
接口地址: /api/open/api/explosive/realtimehotplatform
请求方式:GET
输出参数说明
参数 | 类型 | 说明 |
---|
pid | string | 平台 ID |
platename | string | 平台名称 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
{
"pid": 5,
"platename": "头条号"
},
...
]
}
2、实时热词
请求说明
接口地址: /api/open/api/explosive/realtimehotkey
请求方式:GET
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
apid | int | 平台 ID | 否 | |
输出参数说明
参数 | 类型 | 说明 |
---|
apid | int | 平台 ID |
acid | int | 领域 ID |
ranking | int | 排行 |
key | string | 爆词 |
sumread | int | 阅读数 |
sumcomment | int | 评论数 |
sumcount | int | 文章数 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
{
"apid": 0,
"acid": 123456,
"ranking": 1,
"key": "string",
"sumread": 123456,
"sumcomment": 0,
"sumcount": 123
},
...
]
}
明日发现api
1、事件类型
请求说明
接口地址: /api/open/api/explosive/eventstype
请求方式:GET
输出参数说明
参数 | 类型 | 说明 |
---|
dttid | int | ID |
dttName | string | 名称 |
dttDisIndex | int | 序号 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
{
"dttid": 1,
"dttName": "节日节气",
"dttDisIndex": 1
},
...
]
}
2、本月事件
请求说明
接口地址: /api/open/api/explosive/eventsmonth
请求方式:GET
输出参数说明
参数 | 类型 | 说明 |
---|
dtid | int | 事件 ID |
dttid | int | eventstype 接口 ID |
dtPushDate | string | 发布日期 |
dtPushDateStart | int | 发布日期开始 |
dtPushDateEnd | string | 发布日期截止 |
dtEventTitle | string | 事件标题 |
dtEventExplain | string | 事件说明 |
dtCreateTime | string | 创建时间 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
{
"dtid": 91945,
"dttid": 1,
"dtPushDate": null,
"dtPushDateStart": 1612022400000,
"dtPushDateEnd": 1612022400000,
"dtEventTitle": "string",
"dtEventExplain": "string",
"dtCreateTime": "2021-01-30T10:02:02.847"
},
...
]
}
3、今日历史事件
请求说明
接口地址: /api/open/api/explosive/hiseventstoday
请求方式:GET
输出参数说明
参数 | 类型 | 说明 |
---|
dtid | int | 事件 ID |
dttid | int | eventstype 接口 ID |
dtEventDayStart | string | 事件天起始 |
dtEventDayEnd | string | 事件天截止 |
dtEventTitle | string | 事件标题 |
dtEventExplain | string | 事件说明 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
{
"dtid": 50464,
"dttid": 5,
"dtEventDayStart": "2014-01-31T00:00:00",
"dtEventDayEnd": "2014-01-31T00:00:00",
"dtEventTitle": "“南派猴王”、六龄童章宗义病逝",
"dtEventExplain": ""
},
...
]
}
视频库api
1、获取视频列表
请求说明
接口地址: /api/open/api/explosive/searchvideo
请求方式:POST
Content-Type:application/json
{
"pageIndex": 0,
"pageSize": 0,
"orderName": "string",
"apid": 0,
"acid": 0,
"startTime": "string",
"endTime": "string",
"amout": 0,
"duration": 0,
"keys": "string"
}
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
pageIndex | int | 分页索引 | 是 | |
pageSize | int | 分页大小 | 是 | |
apid | int | 平台 ID | 否 | |
acid | int | 平台领域 ID | 否 | |
keys | string | 关键词 | 否 | |
orderName | int | 排序:1(发布时间)、2(阅读量)、3(评论数) | 否 | 1 |
startTime | string | 起始时间 | 否 | |
endTime | string | 结束时间 | 否 | |
amout | string | 阅读量: 10000、50000、100000、500000 | 否 | |
duration | int | 视频时长 | 否 | |
输出参数说明
参数 | 类型 | 说明 |
---|
hmctid | int | |
apid | int | |
acid | int | |
hmctdocid | string | |
hmcttitle | string | |
hmctimage | string | |
hmcttype | string | |
hmctdate | string | |
hmctamout | string | |
hmctcommentnum | string | |
hmctsource | string | |
autwebid | string | |
hmcturl | string | |
hmctoriginal | string | |
hmctduration | string | |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": {
"pageIndex": 1,
"pageSize": 3,
"pageCount": 1500,
"dataCount": 4500,
"list": [
{
"hmctid": 20012275371567,
"apid": 1,
"acid": 4,
"hmctdocid": "string",
"hmcttitle": "string",
"hmctimage": "string",
"hmcttype": 3,
"hmctdate": "2019-04-01T17:13:19",
"hmctamout": 764,
"hmctcommentnum": 0,
"hmctsource": "string",
"autwebid": "string",
"hmcturl": "string",
"hmctoriginal": null,
"hmctduration": null
}
]
}
}
2、解析视频详情
请求说明
接口地址: /api/open/api/explosive/searchvideodetail
请求方式:POST
Content-Type:application/json
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
url | string | 链接地址 | | |
输出结果说明
参数 | 类型 | 说明 |
---|
name | string | 名称 |
url | string | 视频地址 |
image | string | 封面图地址 |
plateName | string | 平台名称 |
type | string | 类型 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
{
"name": "string",
"url": "string",
"image": "string",
"plateName": "string",
"type": "string"
}
]
}
爆文分析api
1、热点热词
请求说明
接口地址: /api/open/api/explosive/hotkey
请求方式:GET
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
acid | int | 领域 ID | 否 | |
输出参数说明
参数 | 类型 | 说明 |
---|
apid | int | 平台 ID |
acid | int | 领域 ID |
ranking | int | 排行 |
key | string | 爆词 |
sumread | int | 阅读数 |
sumcomment | int | 评论数 |
sumcount | int | 文章数 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
{
"apid": 0,
"acid": 123456,
"ranking": 1,
"key": "string",
"sumread": 123456,
"sumcomment": 0,
"sumcount": 123
},
...
]
}
2、实时领域爆文分布
请求说明
接口地址: /api/open/api/explosive/realtimehointcategory
请求方式:POST
Content-Type:application/json
{
"apid": 1,
"mtype": 1,
"timetype": 1
}
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
apid | int | 平台 ID | 否 | |
mtype | int | 类型:0=全部、1=文章、2=图集、3=视频 | 否 | |
timetype | int | 时间:1=今天、3=三天、7=七天 | 否 | 1 |
输出参数说明
参数 | 类型 | 说明 |
---|
acdes | string | 名称 |
bwint | int | 爆文数 |
timetype | int | 时间 |
hmcttype | int | 类型 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
{
"acdes": "娱乐",
"bwint": 3290,
"timetype": 1,
"hmcttype": 3
},
...
]
}
3、实时发布时间段爆文分布
请求说明
接口地址: /api/open/api/explosive/realtimehotinpubtime
请求方式:POST
Content-Type:application/json
{
"apid": 0,
"mtype": 1,
"timetype": 1
}
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
apid | int | 平台 ID | 否 | |
mtype | int | 类型:0=全部、1=文章、2=图集、3=视频 | 否 | |
timetype | int | 时间:1=今天、3=三天、7=七天 | 否 | 1 |
输出参数说明
参数 | 类型 | 说明 |
---|
hourint | int | 小时 |
bwint | int | 爆文数 |
timetype | int | 时间 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
{
"hourint": 0,
"bwnumber": 91,
"timetype": 1
},
...
]
}
4、今日爆文区间内词云
请求说明
接口地址: /api/open/api/explosive/realtimehotkeycloud
请求方式:POST
Content-Type:application/json
{
"acid": 0,
"startTime": "string",
"emdTime": "string"
}
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
acid | int | 领域 ID | 否 | |
startTime | string | 开始时间 | 否 | |
emdTime | string | 结束时间 | 否 | |
输出参数说明
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
{
"key": "中国",
"count": 8
},
...
]
}
爆文标题助手api
1、热门标题生成
请求说明
接口地址: /api/open/api/explosive/createhottitle
请求方式:POST
Content-Type:application/json
{
"key1": "string",
"key2": "string",
"key3": "string",
"key4": "string"
}
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
key1 | string | 关键字 1 | 是 | |
key2 | string | 关键字 2 | 是 | |
key3 | string | 关键字 3 | 否 | |
key4 | string | 关键字 4 | 否 | |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
"string",
"string",
"string",
"string",
...
]
}
作者数据监测api
1、自媒体库排行榜支持的平台
请求说明
接口地址: /api/open/api/datamonitor/mediarankingplatform
请求方式:GET
输出参数说明
参数 | 类型 | 说明 |
---|
pid | int | 平台 ID |
platename | string | 平台名称 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
{
"pid": 5,
"platename": "头条号"
},
...
]
}
2、获取作者列表
请求说明
接口地址: /api/open/api/datamonitor/searchmediaauthor
请求方式:POST
Content-Type:application/json
{
"pageIndex": 0,
"pageSize": 0,
"orderName": "string",
"apid": 0,
"autwebid": "string",
"autname": "string"
}
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
apid | int | 平台 ID | 是 | |
pageIndex | int | 分页索引 | 否 | |
pageSize | int | 分页大小 | 否 | |
orderName | int | 排序 | 否 | |
autwebid | string | 作者 ID | 否 | |
autname | string | 作者名称 | 否 | |
输出参数说明
参数 | 类型 | 说明 |
---|
apid | int | 平台 ID |
acid | int | 领域 ID |
autwebid | string | 作者 ID |
autname | string | 作者名称 |
autimageurl | string | 作者头像 URL |
autsumread | int | 阅读 |
autsumcomment | int | 评论 |
autfans | int | 粉丝 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": [
{
"apid": 5,
"acid": 0,
"autwebid": "4492956276",
"autname": "string",
"autimageurl": "stromg",
"autsumread": 0,
"autsumcomment": null,
"autfans": 79774508
},
...
]
}
3、解析图文作者信息
请求说明
接口地址: /api/open/api/datamonitor/searchmediaauthorinfo
请求方式:POST
Content-Type:application/json
{
"url": ""
}
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
url | string | URL | 是 | |
输出参数说明
参数 | 类型 | 说明 |
---|
url | int | URL |
apid | int | 平台 ID |
autname | int | 作者名称 |
autwebid | string | 作者 ID |
autimageurl | string | 作者头像 URL |
autfans | int | 作者粉丝 |
isoriginal | string | 是否原创 |
plate | string | 平台 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": {
"url": "https://www.toutiao.com/a6923098632094745096/",
"apid": 5,
"autname": "央视新闻",
"autwebid": "4492956276",
"autimageurl": "https://sf6-ttcdn-tos.pstatp.com/img/pgc-image/e851d72f00744176ab596f32f376e408~300x300.image",
"autfans": 0,
"isoriginal": null,
"plate": "头条"
}
}
4、解析视频作者信息
请求说明
接口地址: /api/open/api/datamonitor/searchvideoauthorinfo
请求方式:POST
Content-Type:application/json
{
"url": ""
}
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
url | string | URL | 是 | |
输出参数说明
参数 | 类型 | 说明 |
---|
url | int | URL |
apid | int | 平台 ID |
autname | int | 作者名称 |
autwebid | string | 作者 ID |
autimageurl | string | 作者头像 URL |
autfans | int | 作者粉丝 |
isoriginal | string | 是否原创 |
plate | string | 平台 |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": {
"url": "https://www.toutiao.com/a6923098632094745096/",
"apid": 5,
"autname": "央视新闻",
"autwebid": "4492956276",
"autimageurl": "https://sf6-ttcdn-tos.pstatp.com/img/pgc-image/e851d72f00744176ab596f32f376e408~300x300.image",
"autfans": 0,
"isoriginal": null,
"plate": "头条"
}
}
5、自媒体库排行榜
请求说明
接口地址: /api/open/api/datamonitor/mediaranking
请求方式:POST
Content-Type:application/json
{
"apid": 0,
"acid": 0,
"time": "string",
"authorname": "string",
"rankingType": 0
}
输入参数说明
参数 | 类型 | 说明 | 必填项 | 缺省值 |
---|
apid | string | 平台 ID | 是 | |
acid | string | 领域 ID | 是 | |
time | string | 时间 | 是 | |
authorname | string | 作者名称 | 否 | |
rankingType | string | 排名类型 | 是 | |
输出参数说明
参数 | 类型 | 说明 |
---|
ranking | int | 排行 ID |
apid | int | 平台 ID |
acid | int | 领域 ID |
releasecount | int | 发布总数 |
releasecontentcount | int | 发布图文总数 |
releaseatlascount | int | 发布图集总数 |
releasevideo | int | 发布视频总数 |
readcount | int | 阅读总数 |
readcontentcount | int | |
readatlascount | int | |
readvideocount | int | 视频总数 |
commentcount | int | 评论总数 |
autname | string | 作者名称 |
autimageurl | string | 作者头像 URL |
authoridstr | string | 作者 ID |
hottrend | int | |
完整返回结果示例
{
"code": "Success",
"msg": "请求成功",
"data": {
"ranking": 1,
"apid": 5,
"acid": 0,
"releasecount": 13,
"releasecontentcount": 0,
"releaseatlascount": 0,
"releasevideo": 13,
"readcount": 5794816,
"readcontentcount": 0,
"readatlascount": 0,
"readvideocount": 5794816,
"commentcount": 2750,
"autname": "垄上行",
"autimageurl": "http://sf1-ttcdn-tos.pstatp.com/img/pgc-image/b776e12ba26d439899abe03d335a866d~120x256.image",
"authoridstr": "4223496221",
"hottrend": "3"
}
}