taobao.video.biz.query (二方业务查询视频接口)

查询视频信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
video_id Number 必须 1 视频Id
user_id Number 可选 1 用户Id
biz_app_key Number 必须 1 淘宝视频分配的appKey

响应参数

名称 类型 示例值 描述
result ResultDo 返回结果
  • └ model
  • String
  • { "userData": {}, "created": 1490172192000, "description": "", "resources ": { "mp4 ": [{ "videoUrl ": "https: //cloud.video.taobao.com/play/u/3637239586/p/1/d/tb_mpic/e/6/t/1/50000250021.mp4", "width": 540, "length": 196009, "bitrate": 199, "definition": "tb_mpic", "height": 404 }, { "videoUrl": "https://cloud.video.taobao.com/play/u/3637239586/p/1/d/ld/e/6/t/1/50000250021.mp4", "width": 540, "length": 196009, "bitrate": 199, "definition": "ld", "height": 404 }], "flv": [{ "videoUrl": "https://cloud.video.taobao.com/play/u/3637239586/p/1/d/tb_mpic/e/1/t/1/50000250021.swf", "width": 540, "length": 198782, "bitrate": 206, "definition": "tb_mpic", "height": 404 }, { "videoUrl": "https://cloud.video.taobao.com/play/u/3637239586/p/1/d/ld/e/1/t/1/50000250021.swf", "width": 540, "length": 198782, "bitrate": 206, "definition": "ld", "height": 404 }], "hls": [{ "videoUrl": "https://cloud.video.taobao.com/play/u/3637239586/p/1/d/tb_mpic/e/3/t/1/50000250021.m3u8", "width": 540, "length": 133, "bitrate": 231, "definition": "tb_mpic", "height": 404 }, { "videoUrl": "https://cloud.video.taobao.com/play/u/3637239586/p/1/d/ld/e/3/t/1/50000250021.m3u8", "width": 540, "length": 133, "bitrate": 231, "definition": "ld", "height": 404 }] }, "videoId": 50000250021, "del": 0, "title": "fwar", "userId": 3637239586, "coverUrl": "https://img.daily.taobaocdn.net/imgextra/i2/6000000006028/TB2zy0aXXXXXXbGXVXXXXXXXXXX_!!0-0-item_pic.jpg", "duration": 7, "features": { "mainpic ": "http: //qinning2.image-test.alimmdn.com/YoRJ4tEp0ekKlx8h4cp/2dbf16b4d42148339c2a4e03939b5ab488850/a/b7299c8f-f5df-4b49-8067-199f59b13175/WP_000096.jpg" }, "lastUpdated": "1490320793000", "userNick": "test_71702", "options": "1", "appKey": "7488605", "tag": "", "state": 6 }
  • 视频详细信息
  • └ result_code
  • String
  • 0
  • 返回结果
  • └ success
  • Boolean
  • true
  • 是否成功
  • └ messages
  • String []
  • "查询成功"
  • 视频信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
VideoBizQueryRequest req = new VideoBizQueryRequest();
req.setVideoId(1L);
req.setUserId(1L);
req.setBizAppKey(1L);
VideoBizQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<video_biz_query_response>
    <result>
        <model>{ 	&quot;userData&quot;: {}, 	&quot;created&quot;: 1490172192000, 	&quot;description&quot;: &quot;&quot;, 	&quot;resources &quot;: { 		&quot;mp4 &quot;: [{ 			&quot;videoUrl &quot;: &quot;https: //cloud.video.taobao.com/play/u/3637239586/p/1/d/tb_mpic/e/6/t/1/50000250021.mp4&quot;, 			&quot;width&quot;: 540, 			&quot;length&quot;: 196009, 			&quot;bitrate&quot;: 199, 			&quot;definition&quot;: &quot;tb_mpic&quot;, 			&quot;height&quot;: 404 		}, { 			&quot;videoUrl&quot;: &quot;https://cloud.video.taobao.com/play/u/3637239586/p/1/d/ld/e/6/t/1/50000250021.mp4&quot;, 			&quot;width&quot;: 540, 			&quot;length&quot;: 196009, 			&quot;bitrate&quot;: 199, 			&quot;definition&quot;: &quot;ld&quot;, 			&quot;height&quot;: 404 		}], 		&quot;flv&quot;: [{ 			&quot;videoUrl&quot;: &quot;https://cloud.video.taobao.com/play/u/3637239586/p/1/d/tb_mpic/e/1/t/1/50000250021.swf&quot;, 			&quot;width&quot;: 540, 			&quot;length&quot;: 198782, 			&quot;bitrate&quot;: 206, 			&quot;definition&quot;: &quot;tb_mpic&quot;, 			&quot;height&quot;: 404 		}, { 			&quot;videoUrl&quot;: &quot;https://cloud.video.taobao.com/play/u/3637239586/p/1/d/ld/e/1/t/1/50000250021.swf&quot;, 			&quot;width&quot;: 540, 			&quot;length&quot;: 198782, 			&quot;bitrate&quot;: 206, 			&quot;definition&quot;: &quot;ld&quot;, 			&quot;height&quot;: 404 		}], 		&quot;hls&quot;: [{ 			&quot;videoUrl&quot;: &quot;https://cloud.video.taobao.com/play/u/3637239586/p/1/d/tb_mpic/e/3/t/1/50000250021.m3u8&quot;, 			&quot;width&quot;: 540, 			&quot;length&quot;: 133, 			&quot;bitrate&quot;: 231, 			&quot;definition&quot;: &quot;tb_mpic&quot;, 			&quot;height&quot;: 404 		}, { 			&quot;videoUrl&quot;: &quot;https://cloud.video.taobao.com/play/u/3637239586/p/1/d/ld/e/3/t/1/50000250021.m3u8&quot;, 			&quot;width&quot;: 540, 			&quot;length&quot;: 133, 			&quot;bitrate&quot;: 231, 			&quot;definition&quot;: &quot;ld&quot;, 			&quot;height&quot;: 404 		}] 	}, 	&quot;videoId&quot;: 50000250021, 	&quot;del&quot;: 0, 	&quot;title&quot;: &quot;fwar&quot;, 	&quot;userId&quot;: 3637239586, 	&quot;coverUrl&quot;: &quot;https://img.daily.taobaocdn.net/imgextra/i2/6000000006028/TB2zy0aXXXXXXbGXVXXXXXXXXXX_!!0-0-item_pic.jpg&quot;, 	&quot;duration&quot;: 7, 	&quot;features&quot;: { 		&quot;mainpic &quot;: &quot;http: //qinning2.image-test.alimmdn.com/YoRJ4tEp0ekKlx8h4cp/2dbf16b4d42148339c2a4e03939b5ab488850/a/b7299c8f-f5df-4b49-8067-199f59b13175/WP_000096.jpg&quot; 	}, 	&quot;lastUpdated&quot;: &quot;1490320793000&quot;, 	&quot;userNick&quot;: &quot;test_71702&quot;, 	&quot;options&quot;: &quot;1&quot;, 	&quot;appKey&quot;: &quot;7488605&quot;, 	&quot;tag&quot;: &quot;&quot;, 	&quot;state&quot;: 6 }</model>
        <result_code>0</result_code>
        <success>true</success>
        <messages>
            <string>&quot;查询成功&quot;</string>
        </messages>
    </result>
</video_biz_query_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部