根据节目获取视频

1. 接口描述

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

2. 系统参数

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

参数名 参数全称 必选 参数类型 参数描述
q query true String 查询字段,示例:q=show_id:$showid show_videotype:$show_videotype
fd field true String 指定返回值字段,示例:fd=show_videostage:$show_videostage show_videotype:$show_videotype
show_videotype show_videotype false string 查询字段q=xxx:$xxx xxx:$xxx,视频类型: 正片,预告片,花絮,普通视频,资讯,MV,首映式,伪正片。
pn pn false int 页数 示例:1
pl pl false int 页大小 示例:20

4. 返回参数

参数名 参数全称 必选 参数类型 参数描述
thumburl thumburl true string 缺省截图url
title title true string 标题
videoid videoid true string 视频ID

5. 调用示例

https://openapi.youku.com/router/rest.json?opensysparams= {"client_id":"1818a358b8c53851","timestamp":"1470641211", "version":"3.0","sign_method":"md5","sign":"3521388d79ee96a76f092a7736c06ab8", "action":"youku.content.video.byprogram.get"} &pl=20&pn=1&q=show_id:1800388c336c11e6b432 show_videotype:正片

6. 响应示例

 
{
    "total": "51",
    "index_cost": "0.008",
    "error": 0,
    "results": [
        {
            "thumburl": "http://r2.ykimg.com/05420408577264656A0A4F132DECD0A9",
            "pk_video": "404943324",
            "username": "终极一班",
            "title": "终极一班4 01",
            "userid": "913179348",
            "videoid": "XMTYxOTc3MzI5Ng=="
        },
        {
            "thumburl": "http://r1.ykimg.com/05420408576F6D7C6A0A45045C78DB5B",
            "pk_video": "404943918",
            "username": "终极一班",
            "title": "终极一班4 02",
            "userid": "913179348",
            "videoid": "XMTYxOTc3NTY3Mg=="
        },
        {
            "thumburl": "http://r2.ykimg.com/054204085774C3A16A0A4004E36A76C2",
            "pk_video": "404944429",
            "username": "终极一班",
            "title": "终极一班4 03",
            "userid": "913179348",
            "videoid": "XMTYxOTc3NzcxNg=="
        },
        {
            "thumburl": "http://r1.ykimg.com/05420408576D83CC6A0A4C0455B6E7F7",
            "pk_video": "404944917",
            "username": "终极一班",
            "title": "终极一班4 04",
            "userid": "913179348",
            "videoid": "XMTYxOTc3OTY2OA=="
        },
        {
            "thumburl": "http://r4.ykimg.com/05420408577263406A0A4104780F9690",
            "pk_video": "404945465",
            "username": "终极一班",
            "title": "终极一班4 05",
            "userid": "913179348",
            "videoid": "XMTYxOTc4MTg2MA=="
        },
        {
            "thumburl": "http://r2.ykimg.com/054204085773C08C6A0A4B046E11599A",
            "pk_video": "404945778",
            "username": "终极一班",
            "title": "终极一班4 06",
            "userid": "913179348",
            "videoid": "XMTYxOTc4MzExMg=="
        },
        {
            "thumburl": "http://r2.ykimg.com/05420408576D89756A0A4F133170F043",
            "pk_video": "404946255",
            "username": "终极一班",
            "title": "终极一班4 07",
            "userid": "913179348",
            "videoid": "XMTYxOTc4NTAyMA=="
        },
        {
            "thumburl": "http://r4.ykimg.com/05420408576D88F56A0A3F045FD0C3A2",
            "pk_video": "404946778",
            "username": "终极一班",
            "title": "终极一班4 08",
            "userid": "913179348",
            "videoid": "XMTYxOTc4NzExMg=="
        },
        {
            "thumburl": "http://r4.ykimg.com/05420408576D8B376A0A460459B489F9",
            "pk_video": "404947259",
            "username": "终极一班",
            "title": "终极一班4 09",
            "userid": "913179348",
            "videoid": "XMTYxOTc4OTAzNg=="
        },
        {
            "thumburl": "http://r1.ykimg.com/05420408577A12876A0A4404AD0BD100",
            "pk_video": "406915130",
            "username": "终极一班",
            "title": "终极一班4 10",
            "userid": "913179348",
            "videoid": "XMTYyNzY2MDUyMA=="
        },
        {
            "thumburl": "http://r4.ykimg.com/05420408577A14416A0A4E04E537261E",
            "pk_video": "406921514",
            "username": "终极一班",
            "title": "终极一班4 11",
            "userid": "913179348",
            "videoid": "XMTYyNzY4NjA1Ng=="
        },
        {
            "thumburl": "http://r3.ykimg.com/0542040857763B746A0A45045C36CA4C",
            "pk_video": "406922662",
            "username": "终极一班",
            "title": "终极一班4 12",
            "userid": "913179348",
            "videoid": "XMTYyNzY5MDY0OA=="
        },
        {
            "thumburl": "http://r4.ykimg.com/0542040857763C886A0A45044CBBB34C",
            "pk_video": "406924088",
            "username": "终极一班",
            "title": "终极一班4 13",
            "userid": "913179348",
            "videoid": "XMTYyNzY5NjM1Mg=="
        },
        {
            "thumburl": "http://r4.ykimg.com/0542040857763F426A0A4B046350B19B",
            "pk_video": "406925447",
            "username": "终极一班",
            "title": "终极一班4 14",
            "userid": "913179348",
            "videoid": "XMTYyNzcwMTc4OA=="
        },
        {
            "thumburl": "http://r1.ykimg.com/0542040857763F976A0A4D2D9725D346",
            "pk_video": "406926743",
            "username": "终极一班",
            "title": "终极一班4 15",
            "userid": "913179348",
            "videoid": "XMTYyNzcwNjk3Mg=="
        },
        {
            "thumburl": "http://r1.ykimg.com/0542040857763FD56A0A4D2D8AB76BE2",
            "pk_video": "406928116",
            "username": "终极一班",
            "title": "终极一班4 16",
            "userid": "913179348",
            "videoid": "XMTYyNzcxMjQ2NA=="
        },
        {
            "thumburl": "http://r1.ykimg.com/05420408577F75636A0A4404AC11DCCD",
            "pk_video": "409073301",
            "username": "终极一班",
            "title": "终极一班4 17",
            "userid": "913179348",
            "videoid": "XMTYzNjI5MzIwNA=="
        },
        {
            "thumburl": "http://r3.ykimg.com/05420408577F76BC6A0A48044567E731",
            "pk_video": "409075003",
            "username": "终极一班",
            "title": "终极一班4 18",
            "userid": "913179348",
            "videoid": "XMTYzNjMwMDAxMg=="
        },
        {
            "thumburl": "http://r1.ykimg.com/05420408577F7A1B6A0A4E044C8F5FD4",
            "pk_video": "409079320",
            "username": "终极一班",
            "title": "终极一班4 19",
            "userid": "913179348",
            "videoid": "XMTYzNjMxNzI4MA=="
        },
        {
            "thumburl": "http://r4.ykimg.com/05420408577F7D8A6A0A3F045DF46E7F",
            "pk_video": "409082317",
            "username": "终极一班",
            "title": "终极一班4 20",
            "userid": "913179348",
            "videoid": "XMTYzNjMyOTI2OA=="
        }
    ],
    "total_cost": 0.016659021377563,
    "tokens": "show_id:1800388c336c11e6b432 show_videotype:正片",
    "orderby": "",
    "offset": 1
}
			

7. 异常示例

8. 注意事项