根据节目获取视频

1. 接口描述

URL https://openapi.youku.com/router/rest.json
功能描述 根据节目获取视频
返回格式 Json,UTF8
HTTP请求方式 GET
当前接口版本 V3

2. 系统参数

参数名 参数全称 必选 参数类型 参数描述
action action true String youku.api.video.byprogram.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. 业务参数

参数名 参数全称 必选 参数类型 参数描述
show_id show_id true String 剧集id,支持批量查询,每个id之间用“,”间隔
show_videotype show_videotype false String 节目中视频类型,默认正片,支持正片,预告片,花絮,普通视频,资讯,MV,首映式,伪正片
show_videostage show_videostage false String 节目中视频的集数或期数(日期型使用YYYYMMDD格式查寻,只有综艺节目按播出日期填写YYYYMMDD格式 其他类型按顺序填写),不建议对外暴露
order_by order_by false String 排序规则,默认:show_videoseq:asc,排序字段只有show_videoseq
page page false int 页码,页码*页长不能大于1200
pageLength pageLength false int 页长,页码*页长不能大于1200

4. 返回参数

>
参数名 参数全称 必选 参数类型 参数描述
videoid videoid true String 视频id
show_videotype show_videotype false String 标题
thumburl thumburl true String 缺省截图url
thumbnail_v2 thumbnail_v2 true String 高清截图
show_videoseq show_videoseq true String 节目下视频序列号
operation_limit operation_limit true array 操作限制COMMENT_DISABLED: 禁评论 DOWNLOAD_DISABLED: 禁下载
download_status download_status true array 下载限制 DISABLED: 禁止下载 VIP_ALLOWED: 仅会员可下载 ALLOWED: 可下载
state state true String 视频状态 normal - 正常
category category true String 视频分类
seconds seconds true String 播放时长(秒)
publishtime publishtime true String 发布时间(YYYY-MM-DD HH:NN:SS) 查寻时传送格式:YYYYMMDD或YYYYMMDDHHNNSSD
is_panorama is_panorama true String 是否为全景视频 0-非全景视频 1-全景视频
total_up total_up true String 视频点赞数
total_comment total_comment true String 评论数

5. 调用示例

	
https://openapi.youku.com/router/rest.json?show_id=8f7472cad7e211e6b9bb&order_by=asc&opensysparams= {"action":"youku.api.video.byprogram.get","client_id":"xxxxxxxx","timestamp":1501830087,"access_token":"", "version":"3.0","sign_method":"md5","sign":"f70d5a6f4cee10f3400014b5ddc438a4"}

6. 响应示例

 {
    "total": 551,
    "cost": 0.062000003,
    "e": {
        "error_msg": "OK",
        "error_code": 1
    },
    "openapi": {
        "traceId": "0badc58415018300994335436e2dc1"
    },
    "videos": [
        {
            "total_up": 18,
            "thumbnail": "https://r1.ykimg.com/05420408593D55271E59723D09074BFF",
            "link": "http://v.youku.com/v_show/id_XMjgxODY4NzM2MA==.html",
            "videoid": "XMjgxODY4NzM2MA==",
            "total_comment": 1,
            "operation_limit": [],
            "title": "哈纳斯野生保育 170611 花儿与少年",
            "seconds": "240.00",
            "show_videostage": "338",
            "streamtypes": [
                "3gphd",
                "flvhd",
                "hd",
                "hd2",
                "hd3",
                "mp5hd",
                "mp5hd2",
                "mp5hd3"
            ],
            "thumbnail_v2": "https://r1.ykimg.com/05410408593D55271E59723D09074BFF",
            "rc_title": null,
            "publishtime": "2017-06-11 22:36:16",
            "download_status": "ALLOWED",
            "state": "normal",
            "category": "综艺",
            "show_videoseq": 0,
            "is_panorama": 0,
        },
        {
            "total_up": 3,
            "thumbnail": "https://r1.ykimg.com/05420408593D57071E5895550007E8C2",
            "link": "http://v.youku.com/v_show/id_XMjgxODcwMTc2MA==.html",
            "videoid": "XMjgxODcwMTc2MA==",
            "total_comment": 0,
            "operation_limit": [],
            "title": "花少团迷路迟到 170611 花儿与少年",
            "seconds": "138.00",
            "show_videostage": "341",
            "streamtypes": [
                "3gphd",
                "flvhd",
                "hd",
                "hd2",
                "hd3",
                "mp5hd",
                "mp5hd2",
                "mp5hd3"
            ],
            "thumbnail_v2": "https://r1.ykimg.com/05410408593D57071E5895550007E8C2",
            "rc_title": null,
            "publishtime": "2017-06-11 22:43:54",
            "download_status": "ALLOWED",
            "state": "normal",
            "category": "综艺",
            "show_videoseq": 0,
            "is_panorama": 0,
        }      
    ]
}
		

7. 异常示例

8. 注意事项