---
title: "YOUKU Video Details API (V1)"
description: "Retrieves details for a Youku video identified by video ID. Use it to look up a known video for content review, cataloging, or subsequent video analysis."
aiUsagePrompt: true
---

# YOUKU Video Details API \(V1\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/youku/get-video-detail/v1\"")'
  :summary='JSON.parse("\"Video Details (V1)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/youku/video-details-v1-en.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"TOKEN\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"videoId\",\"in\":\"query\",\"description\":\"The unique identifier for the video.\",\"required\":true,\"schema\":{\"type\":\"string\"}}]")'
  :requestBody='JSON.parse("null")'
  :responses='JSON.parse("{\"200\":{\"description\":\"OK\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"Youku video details and structured cards returned with the detail page.\",\"properties\":{\"videoMap\":{\"type\":\"object\",\"description\":\"Public metadata for the requested video.\",\"properties\":{\"videoId\":{\"type\":\"string\",\"description\":\"Video identifier returned for the requested video.\"},\"vId\":{\"type\":\"string\",\"description\":\"Video identifier returned in the vId field. Checked results match videoId.\"},\"videoLongId\":{\"type\":\"integer\",\"description\":\"Numeric identifier returned for the requested video.\"},\"videoTitle\":{\"type\":\"string\",\"description\":\"Title of the requested video.\"},\"pageTitle\":{\"type\":\"string\",\"description\":\"Title displayed on the video detail page.\"},\"videoPublishTime\":{\"type\":\"string\",\"description\":\"Video publication time returned as text with second precision.\"},\"duration\":{\"type\":\"number\",\"description\":\"Video duration in seconds. The value can have a fractional part.\"},\"videoCategory\":{\"type\":\"string\",\"description\":\"Video category name returned by Youku.\"},\"videoCategoryId\":{\"type\":\"integer\",\"description\":\"Numeric category code returned for the video.\"},\"videoImg\":{\"type\":\"string\",\"description\":\"Image URL returned with the video details.\"},\"videoImgV\":{\"type\":\"string\",\"description\":\"Vertical image URL returned with the video details.\"},\"isVideo\":{\"type\":\"boolean\",\"description\":\"Whether the platform marks the item as a video.\"},\"isShort\":{\"type\":\"boolean\",\"description\":\"Whether the platform marks the video as short-form.\"},\"paid\":{\"type\":\"integer\",\"description\":\"Paid-content indicator reported by Youku.\"},\"totalComment\":{\"type\":\"integer\",\"description\":\"Reported comment count for the video.\"},\"totalUp\":{\"type\":\"integer\",\"description\":\"Reported like count for the video.\"},\"showVideoStageDesc\":{\"type\":\"string\",\"description\":\"Stage or episode display label returned for the video.\"},\"streamTypes\":{\"type\":\"array\",\"description\":\"Stream format codes listed in the video metadata.\",\"items\":{\"type\":\"string\",\"description\":\"One stream format code listed by Youku.\"}}}},\"componentList\":{\"type\":\"array\",\"description\":\"Page components that can include video and uploader cards.\",\"items\":{\"type\":\"object\",\"properties\":{\"componentName\":{\"type\":\"string\",\"description\":\"Component name reported by the detail page.\"},\"title\":{\"type\":\"string\",\"description\":\"Display title for the page component.\"},\"type\":{\"type\":\"integer\",\"description\":\"Platform type code for the page component.\"},\"dataNode\":{\"type\":\"array\",\"description\":\"Content nodes returned with this component.\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":[\"integer\",\"null\"],\"description\":\"Numeric identifier returned for this content node. It can be null.\"},\"type\":{\"type\":\"integer\",\"description\":\"Platform type code for the content node.\"},\"data\":{\"type\":\"object\",\"description\":\"Display data on this content node. Available fields vary by card.\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"Title text shown on this video or page card.\"},\"introTitle\":{\"type\":\"string\",\"description\":\"Display heading returned for the introduction.\"},\"summary\":{\"type\":\"string\",\"description\":\"Summary text returned with this card.\"},\"desc\":{\"type\":\"string\",\"description\":\"Description text returned for this card when available.\"},\"videoId\":{\"type\":\"string\",\"description\":\"Video identifier associated with this related card.\"},\"videoLongId\":{\"type\":\"integer\",\"description\":\"Numeric video identifier associated with this related card.\"},\"publishTime\":{\"type\":\"string\",\"description\":\"Publication-time label shown on the card.\"},\"seconds\":{\"type\":\"string\",\"description\":\"Duration displayed on the card as a clock-formatted string.\"},\"img\":{\"type\":\"string\",\"description\":\"Image URL displayed with the card.\"},\"thumbUrl\":{\"type\":\"string\",\"description\":\"Thumbnail URL returned for the result.\"},\"bgPic\":{\"type\":\"string\",\"description\":\"Background image URL returned for this card.\"},\"heatDesc\":{\"type\":\"string\",\"description\":\"Popularity label text returned for the card.\"},\"ownerUid\":{\"type\":\"string\",\"description\":\"Owner user identifier returned on this card.\"},\"upUser\":{\"type\":\"object\",\"description\":\"Public uploader information attached to the card.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"User identifier returned for the uploader.\"},\"name\":{\"type\":\"string\",\"description\":\"Display name returned for the uploader.\"},\"icon\":{\"type\":\"string\",\"description\":\"Avatar image URL returned for the uploader.\"},\"subtitle\":{\"type\":\"string\",\"description\":\"Additional text shown with the uploader name.\"},\"verifyName\":{\"type\":[\"string\",\"null\"],\"description\":\"Verification display name returned for the uploader when available.\"},\"verifyIcon\":{\"type\":[\"string\",\"null\"],\"description\":\"Verification icon URL returned for the uploader when available.\"}}},\"interacts\":{\"type\":\"array\",\"description\":\"Engagement displays reported with the card.\",\"items\":{\"type\":\"object\",\"properties\":{\"interactType\":{\"type\":\"string\",\"description\":\"Type code for this engagement display.\"},\"title\":{\"type\":\"string\",\"description\":\"Display label for this engagement item.\"},\"count\":{\"type\":[\"integer\",\"null\"],\"description\":\"Reported count for this engagement item. It can be null.\"}}}},\"lbTexts\":{\"type\":\"array\",\"description\":\"Text badges displayed on this card.\",\"items\":{\"type\":\"object\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"Primary text of the displayed badge.\"},\"contentDesc\":{\"type\":\"string\",\"description\":\"Description text returned for the badge.\"},\"textColor\":{\"type\":\"string\",\"description\":\"Text color value returned for the badge.\"}}}},\"reasons\":{\"type\":\"object\",\"description\":\"Recommendation display information accompanying the card.\",\"properties\":{\"text\":{\"type\":[\"string\",\"null\"],\"description\":\"Reported recommendation reason text. It can be null.\"}}},\"subtitles\":{\"type\":\"array\",\"description\":\"Secondary display lines returned for the card.\",\"items\":{\"type\":\"object\",\"properties\":{\"subtitle\":{\"type\":\"string\",\"description\":\"Text shown on this secondary display line.\"},\"subtitleType\":{\"type\":\"string\",\"description\":\"Type code returned for the secondary display line.\"}}}}}}}}}}}}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"Invalid request parameters or body\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"Invalid or inactive access token\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"Permission denied\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"Request rate or daily quota limit exceeded\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"Internal server error\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"Service temporarily unavailable\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"Global production API (default)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/youku/get-video-detail/v1\"")' />

<p>Retrieves details for a Youku video identified by video ID. Use it to look up a known video for content review, cataloging, or subsequent video analysis.</p>

## Parameters

<div class="api-doc-table api-doc-table--params">

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | Yes | - | TOKEN |
| <code>videoId</code> | query | <code>string</code> | Yes | - | The unique identifier for the video. |

</div>

## Code Samples

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE'
```

```text [🤖 AI Prompt]
I want to use the "Video Details (V1)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE
API Endpoint: BASE_URL + /api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/youku/video-details-v1-en.json

Parameters:
- token (query): TOKEN (Required)
- videoId (query): The unique identifier for the video. (Required)

Return format: safely handle JSON or text according to the actual Content-Type.

Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set the request timeout to 120 seconds. If 120 seconds is too long for your use case, use at least 60 seconds, but a small number of requests may time out before receiving a result.
3. Business Code Reference:
   - 0: Success
   - 100: Invalid or Inactive Token
   - 301: Collection Failed. Please Retry.
   - 302: Rate Limit Exceeded
   - 303: Daily Quota Exceeded
   - 400: Invalid Parameters
   - 500: Internal Server Error
   - 600: Permission Denied
   - 601: Insufficient Balance
   - 602: Token Budget Exceeded
4. Code 601 means the shared account balance is insufficient. Code 602 means the current API token's own cumulative budget limit has been reached. Token budget limits do not transfer funds out of the shared account balance.

Please help me write a script in my preferred programming language to call this API and handle the response.
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # Provided by OpenAPI servers

url = BASE_URL + "/api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
```

```js [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
const url = BASE_URL + "/api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
```

```java [☕ Java]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
        final String url = BASE_URL + "/api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
```

```go [🐹 Go]
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // Provided by OpenAPI servers

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/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()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
```

```php [🐘 PHP]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Provided by OpenAPI servers
$url = $BASE_URL . '/api/youku/get-video-detail/v1?token=YOUR_API_KEY&videoId=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/youku/video-details-v1-en.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[OpenAPI Definition (JSON)]</a>
</div>

## Response Fields

Key fields in a successful response (`code = 0`).

<div class="api-doc-table api-doc-table--response">

| Field path | Type | Description |
| --- | --- | --- |
| <code>data</code> | <code>object</code> | Youku video details and structured cards returned with the detail page. |
| <code>data.videoMap</code> | <code>object</code> | Public metadata for the requested video. |
| <code>data.videoMap.videoId</code> | <code>string</code> | Video identifier returned for the requested video. |
| <code>data.videoMap.vId</code> | <code>string</code> | Video identifier returned in the vId field. Checked results match videoId. |
| <code>data.videoMap.videoLongId</code> | <code>integer</code> | Numeric identifier returned for the requested video. |
| <code>data.videoMap.videoTitle</code> | <code>string</code> | Title of the requested video. |
| <code>data.videoMap.pageTitle</code> | <code>string</code> | Title displayed on the video detail page. |
| <code>data.videoMap.videoPublishTime</code> | <code>string</code> | Video publication time returned as text with second precision. |
| <code>data.videoMap.duration</code> | <code>number</code> | Video duration in seconds. The value can have a fractional part. |
| <code>data.videoMap.videoCategory</code> | <code>string</code> | Video category name returned by Youku. |
| <code>data.videoMap.videoCategoryId</code> | <code>integer</code> | Numeric category code returned for the video. |
| <code>data.videoMap.videoImg</code> | <code>string</code> | Image URL returned with the video details. |
| <code>data.videoMap.videoImgV</code> | <code>string</code> | Vertical image URL returned with the video details. |
| <code>data.videoMap.isVideo</code> | <code>boolean</code> | Whether the platform marks the item as a video. |
| <code>data.videoMap.isShort</code> | <code>boolean</code> | Whether the platform marks the video as short-form. |
| <code>data.videoMap.paid</code> | <code>integer</code> | Paid-content indicator reported by Youku. |
| <code>data.videoMap.totalComment</code> | <code>integer</code> | Reported comment count for the video. |
| <code>data.videoMap.totalUp</code> | <code>integer</code> | Reported like count for the video. |
| <code>data.videoMap.showVideoStageDesc</code> | <code>string</code> | Stage or episode display label returned for the video. |
| <code>data.videoMap.streamTypes</code> | <code>array</code> | Stream format codes listed in the video metadata. |
| <code>data.videoMap.streamTypes[]</code> | <code>string</code> | One stream format code listed by Youku. |
| <code>data.componentList</code> | <code>array</code> | Page components that can include video and uploader cards. |
| <code>data.componentList[]</code> | <code>object</code> | - |
| <code>data.componentList[].componentName</code> | <code>string</code> | Component name reported by the detail page. |
| <code>data.componentList[].title</code> | <code>string</code> | Display title for the page component. |
| <code>data.componentList[].type</code> | <code>integer</code> | Platform type code for the page component. |
| <code>data.componentList[].dataNode</code> | <code>array</code> | Content nodes returned with this component. |
| <code>data.componentList[].dataNode[]</code> | <code>object</code> | - |
| <code>data.componentList[].dataNode[].id</code> | <code>integer &#124; null</code> | Numeric identifier returned for this content node. It can be null. |
| <code>data.componentList[].dataNode[].type</code> | <code>integer</code> | Platform type code for the content node. |
| <code>data.componentList[].dataNode[].data</code> | <code>object</code> | Display data on this content node. Available fields vary by card. |
| <code>data.componentList[].dataNode[].data.title</code> | <code>string</code> | Title text shown on this video or page card. |
| <code>data.componentList[].dataNode[].data.introTitle</code> | <code>string</code> | Display heading returned for the introduction. |
| <code>data.componentList[].dataNode[].data.summary</code> | <code>string</code> | Summary text returned with this card. |
| <code>data.componentList[].dataNode[].data.desc</code> | <code>string</code> | Description text returned for this card when available. |
| <code>data.componentList[].dataNode[].data.videoId</code> | <code>string</code> | Video identifier associated with this related card. |
| <code>data.componentList[].dataNode[].data.videoLongId</code> | <code>integer</code> | Numeric video identifier associated with this related card. |
| <code>data.componentList[].dataNode[].data.publishTime</code> | <code>string</code> | Publication-time label shown on the card. |
| <code>data.componentList[].dataNode[].data.seconds</code> | <code>string</code> | Duration displayed on the card as a clock-formatted string. |
| <code>data.componentList[].dataNode[].data.img</code> | <code>string</code> | Image URL displayed with the card. |
| <code>data.componentList[].dataNode[].data.thumbUrl</code> | <code>string</code> | Thumbnail URL returned for the result. |
| <code>data.componentList[].dataNode[].data.bgPic</code> | <code>string</code> | Background image URL returned for this card. |
| <code>data.componentList[].dataNode[].data.heatDesc</code> | <code>string</code> | Popularity label text returned for the card. |
| <code>data.componentList[].dataNode[].data.ownerUid</code> | <code>string</code> | Owner user identifier returned on this card. |
| <code>data.componentList[].dataNode[].data.upUser</code> | <code>object</code> | Public uploader information attached to the card. |
| <code>data.componentList[].dataNode[].data.upUser.id</code> | <code>string</code> | User identifier returned for the uploader. |
| <code>data.componentList[].dataNode[].data.upUser.name</code> | <code>string</code> | Display name returned for the uploader. |
| <code>data.componentList[].dataNode[].data.upUser.icon</code> | <code>string</code> | Avatar image URL returned for the uploader. |
| <code>data.componentList[].dataNode[].data.upUser.subtitle</code> | <code>string</code> | Additional text shown with the uploader name. |
| <code>data.componentList[].dataNode[].data.upUser.verifyName</code> | <code>string &#124; null</code> | Verification display name returned for the uploader when available. |
| <code>data.componentList[].dataNode[].data.upUser.verifyIcon</code> | <code>string &#124; null</code> | Verification icon URL returned for the uploader when available. |
| <code>data.componentList[].dataNode[].data.interacts</code> | <code>array</code> | Engagement displays reported with the card. |
| <code>data.componentList[].dataNode[].data.interacts[]</code> | <code>object</code> | - |
| <code>data.componentList[].dataNode[].data.interacts[].interactType</code> | <code>string</code> | Type code for this engagement display. |
| <code>data.componentList[].dataNode[].data.interacts[].title</code> | <code>string</code> | Display label for this engagement item. |
| <code>data.componentList[].dataNode[].data.interacts[].count</code> | <code>integer &#124; null</code> | Reported count for this engagement item. It can be null. |
| <code>data.componentList[].dataNode[].data.lbTexts</code> | <code>array</code> | Text badges displayed on this card. |
| <code>data.componentList[].dataNode[].data.lbTexts[]</code> | <code>object</code> | - |
| <code>data.componentList[].dataNode[].data.lbTexts[].title</code> | <code>string</code> | Primary text of the displayed badge. |
| <code>data.componentList[].dataNode[].data.lbTexts[].contentDesc</code> | <code>string</code> | Description text returned for the badge. |
| <code>data.componentList[].dataNode[].data.lbTexts[].textColor</code> | <code>string</code> | Text color value returned for the badge. |
| <code>data.componentList[].dataNode[].data.reasons</code> | <code>object</code> | Recommendation display information accompanying the card. |
| <code>data.componentList[].dataNode[].data.reasons.text</code> | <code>string &#124; null</code> | Reported recommendation reason text. It can be null. |
| <code>data.componentList[].dataNode[].data.subtitles</code> | <code>array</code> | Secondary display lines returned for the card. |
| <code>data.componentList[].dataNode[].data.subtitles[]</code> | <code>object</code> | - |
| <code>data.componentList[].dataNode[].data.subtitles[].subtitle</code> | <code>string</code> | Text shown on this secondary display line. |
| <code>data.componentList[].dataNode[].data.subtitles[].subtitleType</code> | <code>string</code> | Type code returned for the secondary display line. |

</div>

## Response Example

<ApiExampleSection :api='JSON.parse("\"/api/youku/get-video-detail/v1\"")' />

