单条视频基本信息

1. 接口描述

URL https://openapi.youku.com/router/rest.json
功能描述 单条视频基本信息
返回格式 Json,UTF8
HTTP请求方式 GET
当前接口版本 V3
历史接口版本 V2

2. 系统参数

参数名 参数全称 必选 参数类型 参数描述
action action true String youku.content.video.single.baseinfo.get
client_id client_id true String 应用的client id
access_token access token false String oauth2的token
timestamp timestamp true String 客户端当前时间戳,精确到秒,timestamp与开放平台请求时间误差为6分钟
version version true String API协议版本,默认值3.0
sign_method sign_method false String 签名的摘要算法,可选值为:HmacSHA256,md5。默认为md5
sign sign true String 对API调用参数(除sign外)的md5加密值。详情见签名方法

3. 业务参数

参数名 参数全称 必选 参数类型 参数描述
q query true String q=videoid:$vid
fd field true String fd=videoid show_id show_videotype title thumburl seconds category state publishtime desc sharestate isoriginal userid username operation_limit streamtypes thumburl_v2 total_vv total_fav total_comment total_up total_down tags
cl caller true String 调用者

4. 返回参数

参数名 参数全称 必选 参数类型 参数描述
pk_video pk_video true String 视频id
videoid videoid true String 视频ID 编码后的,实质上还是int内容,可通过规则转化
title title true String 标题
thumburl thumburl true String 缺省截图url
thumburl_v2 thumburl_v2 true String 缺省截图url(16:9)
userid userid true String 上传者ID
username username true String 上传用户名
seconds seconds true String 播放时长(秒)
total_comment total_comment true String 评论数
total_fav total_fav true String 收藏数
total_up total_up true String 顶数
total_down total_down true String 踩数
publishtime publishtime true String 发布时间(YYYY-MM-DD HH:NN:SS) 查寻时传送格式:YYYYMMDD或YYYYMMDDHHNNSS
isoriginal isoriginal true String 是否是原创视频:1(是) 0(不是,转载)
sharestate sharestate true String 共享状态:OPEN 开放 FRIEND 仅开放给好友 PASSWORD 有密码 FOLLOWER 仅粉丝 PRIVATE 私有
state state true String 视频状态 normal - 正常 limited - 分级 uploaded - 上传完成 encoding - 正在转码 fail - 转码失败 checking - 审核 blocked - 屏蔽
streamtypes streamtypes true String 视频流类型: flvhd flv hd(mp4hd) 3gp 3gphd hd2(720p)(mp4hd2) hd3(mp4hd3)(1080p) mp5sd mp5hd mp5hd2 mp5hd3 mp5hd4
category category true String 主分类,考虑到将来的兼容性,当前还回一个字符串,每个只允许一个主分类
total_vv total_vv true String 播放数
tags tags true String 视频tag,暂时只有节目视频支持搜索,仅指官方库视频
show_id show_id true String 节目ID
show_videotype show_videotype true String 节目中的视频类型。正片,预告片,花絮,普通视频,资讯,MV,首映式,伪正片。

5. 调用示例

https://openapi.youku.com/router/rest.json?caller=NOVA&opensysparams={"format": "json", "timestamp": 1453714831, "access_token": "d9ce66ced641240836cf6011a4c195bc", "sign": "57cd4ab46ce1d8bc9240d99e2120e756", "action": "youku.content.video.single.baseinfo.get", "client_id": "163d4fd10c7f9a28", "version": "3.0"}

6. 响应示例

{
tokens: "videoid:2029,2030",
orderby: "",
offset: 1,
total: 2,
index_cost: 0,
results: [
{
pk_video: "2029",
videoid: "XODExNg==",
title: "电影如果爱预告片",
thumburl: "http://r2.ykimg.com/05420408521C652D6A0A4710C9C87E30",
thumburl_v2: "http://r4.ykimg.com/05420408521C652D6A0A4710C9C87E30",
userid: "526",
username: "小钢炮94",
seconds: "71.47",
total_comment: "26",
total_fav: "3",
total_up: "1989",
total_down: "61",
publishtime: "2006-05-22 09:14:52",
isoriginal: "0",
sharestate: "OPEN",
state: "normal",
streamtypes: [
"flvhd"
],
category: "音乐",
total_vv: 389951,
tags: "歌舞电影,如果爱,张学友",
show_id: "30595",
show_videotype: "预告片"
},
{
pk_video: "2030",
videoid: "XODEyMA==",
title: "肯德基食得轻盈广告",
desc: "好像和我们大陆的不太一样啊",
thumburl: "http://r2.ykimg.com/05420408521C652E6A0A481CF2C42D50",
thumburl_v2: "http://r3.ykimg.com/05420408521C652E6A0A481CF2C42D50",
userid: "88",
username: "Melissa802",
seconds: "23.87",
total_comment: "0",
total_fav: "6",
total_up: "11",
total_down: "2",
publishtime: "2006-05-25 19:51:25",
isoriginal: "0",
sharestate: "OPEN",
state: "normal",
streamtypes: [
"flvhd"
],
category: "广告",
total_vv: 6743,
tags: "KFC,肯德基,广告"
}
],
total_cost: 0.012033939361572
}

7. 异常示例

8. 注意事项