Skip to content

优酷 API - 视频详情 (V1)

prod-global
GET
/api/youku/get-video-detail/v1

此API用于获取指定优酷视频的详细信息,包括视频ID、标题、描述、封面图片、时长、标签、播放量、点赞数、发布时间以及视频详情页URL。

典型使用场景:

  • 获取单个视频的完整元数据。
  • 跟踪播放量、点赞数等互动指标。
  • 将详细视频信息集成至第三方仪表板。

请求参数

参数名位置类型必填说明
tokenquerystringTOKEN
videoIdquerystring视频的唯一标识符。

代码示例

💡 环境说明

默认示例使用 https://api.justoneapi.com (prod-global)。中国大陆地区建议替换为 http://47.117.133.51:30015 (prod-cn) 以获得更好的访问体验。详见 环境选择

bash
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE"
text
我想使用 Just One API 提供的“视频详情 (V1)”接口。
接口地址: https://api.justoneapi.com/api/youku/get-video-detail/v1
HTTP 方法: GET
身份验证: 在 URL 后添加查询参数“?token=您的API密钥”。
OpenAPI 定义: https://docs.justoneapi.com/openapi/youku-apis/video-details-v1-zh.json

请求参数说明:
- token (query): TOKEN (必填)
- videoId (query): 视频的唯一标识符。 (必填)

返回格式: JSON

响应处理与错误码:
1. 需通过返回体中的 "code" 字段判断业务结果(code 为 0 表示成功)。
2. 超时建议:建议将请求超时时间设置为至少 60 秒。
3. 业务码说明:
   - 0: 成功
   - 100: Token 无效或已失效
   - 301: 采集失败,请重试
   - 302: 超出速率限制
   - 303: 超出每日配额
   - 400: 参数错误
   - 500: 内部服务器错误
   - 600: 权限不足
   - 601: 余额不足

请帮我用我擅长的编程语言写一个脚本来调用这个接口,并处理返回结果。
python
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import requests

url = "https://api.justoneapi.com/api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE"
response = requests.get(url)
print(response.json())
js
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE", {
  method: "GET"
});
const data = await response.json();
console.log(data);
java
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.justoneapi.com/api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE"))
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
go
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	client := &http.Client{}
	url := "https://api.justoneapi.com/api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
php
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;

响应结果

json
{
  "code": 0,
  "data": {
    "headers": {
      "nobelTrackInfo": "1148:[email protected]@0@",
      "manufacturingDate": "20260309 22:00:01"
    },
    "videoMap": {
      "videoId": "XNjQ5ODcwMjQ4OA==",
      "videoLongId": 1624675622,
      "videoCategoryId": 97,
      "videoCategory": "电视剧",
      "videoType": null,
      "videoTypeCode": null,
      "videoImg": "https://m.ykimg.com/0548060168F6E9851F08888AB10C277D",
      "videoImgV": "https://m.ykimg.com/0575060168F6E9851F08888AB10C277D",
      "showVideoStage": null,
      "videoPublishTime": "2025-10-21 10:05:43",
      "videoTitle": "盛夏芬德拉:最后一场戏开拍前的情绪拉扯",
      "showVideoStageDesc": "",
      "showId": null,
      "showLongId": null,
      "showCategoryId": null,
      "showCategory": null,
      "episodeTotal": null,
      "showName": null,
      "showSubtitle": null,
      "completed": null,
      "showImg": null,
      "showImgV": null,
      "showImgW3H2": null,
      "episodeLast": null,
      "showReleaseTime": null,
      "episodeFinalStage": null,
      "playlistId": null,
      "playlistLongId": null,
      "playlistTitle": null,
      "scgId": null,
      "userId": null,
      "allowComment": true,
      "allowShare": true,
      "allowDownload": true,
      "allowLike": true,
      "isFavorite": false,
      "reportUrl": "",
      "pageKey": "LOCVIDEO_OTHER_DEFAULT",
      "prePaid": null,
      "paid": 0,
      "duration": 115.8,
      "totalComment": 499,
      "totalUp": 17,
      "verticalStyle": null,
      "isNewReservation": false,
      "politicsSensitive": null,
      "interactiveChapter": null,
      "playingType": null,
      "isTracking": false,
      "isPugv": false,
      "adRestricted": 0,
      "autoPay": false,
      "albumId": null,
      "microVideoSchema": null,
      "videoRiskMark": null,
      "allowUnionRefresh": 1,
      "dspPopDisplayTime": null,
      "pcSearchSeoStr": null,
      "audiolang": [],
      "videoSizes": null,
      "downloadStatus": [],
      "videoKind": null,
      "subCategories": null,
      "hasVideoType": null,
      "animeEdition": null,
      "videoCacheConfig": null,
      "showPackageType": null,
      "videoPackageType": null,
      "showLibraryTag": null,
      "videoLibraryTag": null,
      "streamTypes": [
        "flvhd"
      ],
      "safetyContentElement": null,
      "videoUpsStream": null,
      "isShort": true,
      "toFind": true,
      "isVideo": true,
      "pageTitle": "盛夏芬德拉:最后一场戏开拍前的情绪拉扯",
      "vId": "XNjQ5ODcwMjQ4OA=="
    },
    "pushInfo": {},
    "drawerList": [
      {
        "type": 10001,
        "id": 13682,
        "componentList": [
          51729
        ]
      }
    ],
    "componentList": [
      {
        "id": 51729,
        "type": 10049,
        "componentId": "h5-detail-guide",
        "componentName": "播放页引导",
        "dataNode": [
          {
            "data": {
              "img": "http://ykimg.alicdn.com/develop/image/2019-08-02/89bcdfe700fc4babe08c7ca76a7ecb17.jpg",
              "title": "预览播放中,打开优酷APP看高清完整版",
              "action": {
                "type": "JUMP_TO_NATIVE",
                "value": "youku://",
                "contentType": null,
                "contentValue": null,
                "reportDisabled": false,
                "extra": null,
                "callback": null,
                "reportConfig": null,
                "report": {
                  "pageName": "page_playpage",
                  "arg1": "h5_detail_guide",
                  "spmAB": "a2h0j.10182321",
                  "spmC": "card_1",
                  "spmD": "1_0",
                  "scmAB": "20140719.manual",
                  "scmC": "51721",
                  "scmD": "native_youku%3A%2F%2F",
                  "index": 0,
                  "reportDataOpt": null,
                  "trackInfo": {
                    "component_id": "h5_detail_guide",
                    "pvv_vid": "XNjQ5ODcwMjQ4OA==",
                    "component_instance_id": 51729,
                    "servertime": 1773064801708,
                    "pageid": "LOCVIDEO_OTHER_DEFAULT",
                    "drawerid": "13682",
                    "cms_req_id": "213dee4817730648017038551e2f64"
                  },
                  "utParam": null
                }
              },
              "subType": "NORMAL"
            },
            "id": 455807,
            "type": 10030
          }
        ],
        "title": "",
        "props": {}
      }
    ],
    "nobelTrackHeader": "",
    "playPageData": {
      "headerCallApp": {
        "btnTitle": "下载APP",
        "type": "JUMP_TO_NATIVE",
        "jumpUrl": ""
      },
      "PopCallApp": {
        "btnTitle": "打开",
        "type": "JUMP_TO_NATIVE",
        "jumpUrl": "",
        "subtitle": "为好内容全力以赴",
        "expires": 1,
        "unit": "hour",
        "logo": "https://gw.alicdn.com/imgextra/i3/O1CN01CO6s7L1qQvicY255E_!!6000000005491-2-tps-112-112.png",
        "title": "优酷"
      },
      "bottomCallApp": {
        "btnTitle": "打开优酷APP更流畅",
        "type": "JUMP_TO_NATIVE",
        "jumpUrl": ""
      },
      "callSwitch": true
    }
  }
}

💡 提示:为简化展示,列表类数据样例仅保留 1-2 条记录,实际返回条数以接口响应为准。