# Youku Video Scraper (`hgservices/youku-video-scraper`) Actor

Scrape and download Youku (优酷) videos. Get video details — title, uploader, duration, tags, thumbnail and every resolution — plus direct video URLs, or save the full MP4. Just paste any Youku video or share link.

- **URL**: https://apify.com/hgservices/youku-video-scraper.md
- **Developed by:** [Harish Garg](https://apify.com/hgservices) (community)
- **Categories:** Videos, AI, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Youku Video Scraper

**Scrape [Youku](https://www.youku.com) (优酷) videos in seconds.** Paste any Youku video or share link and this Actor returns clean, structured **video details** — title, uploader, duration, tags, thumbnail, and every available **resolution** — plus a direct **video URL** for each quality. You can also **download the video file** itself. It runs on the [Apify platform](https://apify.com/actors), so you get API access, scheduling, integrations, and run monitoring out of the box.

### What does Youku Video Scraper do?

Youku is one of China's largest video platforms. This Actor turns any Youku link into ready-to-use data: for each video you provide, it collects the **title, uploader, duration, tags, thumbnail, and available qualities**, and gives you a **direct video URL** you can stream or save. Want the file on disk? Switch on **Download video files** and the Actor saves a single, full-length **MP4** you can grab straight from the run.

You can try it right away with the prefilled example link, then paste your own.

### Why use Youku Video Scraper?

- **Media monitoring & research** — track a creator's uploads, durations, and tags over time.
- **Content archiving** — save direct video URLs or downloaded MP4 files for backup.
- **Dataset building** — collect structured video metadata across many links for analysis or ML.
- **Automation** — call it from the Apify API, run it on a schedule, or connect it to Make, Zapier, n8n, Google Sheets, and more.

### How to use Youku Video Scraper

1. Open the Actor and go to the **Input** tab.
2. Paste one or more Youku video URLs into **Youku video URLs**.
3. *(Optional)* Set **Preferred video quality** to `best` or `worst`.
4. *(Optional)* Turn on **Download video files** if you want the MP4 saved, not just its URL.
5. *(Optional)* Turn on **Proxy** if your videos are restricted to mainland China (see Tips below).
6. Click **Start**. When the run finishes, open the **Output** tab to view or export your results.

### Input

| Field | Key | Type | Description |
| --- | --- | --- | --- |
| Youku video URLs | `startUrls` | array | Video or share links to scrape. **Required.** |
| Download video files | `downloadVideos` | boolean | Also save the video as an MP4 (default `false`). |
| Preferred video quality | `videoQuality` | string | `best` (default) or `worst`. |
| Max videos | `maxItems` | integer | Cap the number processed (`0` = no limit). |
| Proxy configuration | `proxyConfiguration` | object | Off by default; turn on for videos limited to mainland China or for high-volume runs. |

Example input:

```json
{
    "startUrls": [
        { "url": "https://v.youku.com/v_show/id_XNTA2NTA0MjA1Mg==.html" }
    ],
    "videoQuality": "best",
    "downloadVideos": false,
    "proxyConfiguration": { "useApifyProxy": false }
}
````

### Output

Each scraped video becomes one row in the dataset. You can download the results in various formats such as **JSON, HTML, CSV, or Excel**. Simplified example:

```json
{
    "vid": "XNTA2NTA0MjA1Mg==",
    "url": "https://v.youku.com/v_show/id_XNTA2NTA0MjA1Mg==.html",
    "title": "Minecraft我的世界：建造超大巨型航空飞机，菜鸟vs高手vs黑客",
    "durationSeconds": 542.13,
    "thumbnailUrl": "https://m.ykimg.com/054101016001F5EA07937EACA8E0510A",
    "tags": ["高手", "飞机", "黑客", "菜鸟", "我的世界"],
    "uploaderName": "皮皮游戏Game",
    "uploaderUrl": "https://www.youku.com/profile/index/?uid=...",
    "uploaderFanCount": 209206,
    "videoQuality": "Full HD (1080p)",
    "videoUrl": "https://...",
    "availableQualities": ["Full HD (1080p)", "HD (720p)", "HD (540p)", "SD (360p)"],
    "downloadUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/<file>.mp4"
}
```

`downloadUrl` appears only when **Download video files** is enabled.

#### Data table

| Field | Description |
| --- | --- |
| `vid` | Youku video ID. |
| `title` | Video title. |
| `url` | Youku page URL for the video. |
| `durationSeconds` | Length in seconds. |
| `thumbnailUrl` | Cover image URL. |
| `tags` | List of video tags. |
| `uploaderName` / `uploaderUrl` | Uploader name and channel page. |
| `uploaderFanCount` | Uploader's follower count. |
| `videoQuality` | The quality selected for `videoUrl`. |
| `availableQualities` | All qualities offered for this video. |
| `videoUrl` | Direct URL for the selected quality. |
| `streams` | Every available quality, each with its resolution, file size, and direct URL. |
| `downloadUrl` | Link to the saved MP4 (only when downloading). |

### How much does it cost to scrape Youku?

This Actor runs on the Apify platform and consumes **compute units** based on how long a run takes. Collecting video details is fast and inexpensive. Turning on **Download video files** saves full MP4s, which takes longer and uses storage, so only enable it when you actually need the files. New Apify accounts include free monthly usage that's more than enough to try the Actor and scrape plenty of videos.

### Tips and advanced options

- **Video URLs expire.** The direct `videoUrl` links are time-limited (a few hours). If you need permanent copies, turn on **Download video files**, or use the URLs soon after the run.
- **Region-restricted videos.** Many Youku videos are available only in mainland China. If a video is skipped for this reason, enable **Proxy** and pick a China / residential option.
- **Best-quality note.** The highest resolutions (e.g. 1080p) sometimes require a Youku login for a given video. The Actor picks the best quality it can actually retrieve and reports it in `videoQuality`.
- **Batch your links.** Add many URLs to a single run's `startUrls` list rather than launching lots of separate runs.

### FAQ, disclaimers, and support

**Is scraping Youku legal?** This Actor collects publicly available video information. You are responsible for how you use the data — respect Youku's Terms of Service, copyright, and applicable laws, and don't redistribute content you don't have the rights to.

**Does it work for every video?** No. Private videos, paid/VIP-only content, and some region-locked videos may not be available without the right account or a suitable proxy.

**Which sites are supported?** Youku (`youku.com`) and Tudou (`tudou.com`) video links.

**Found a bug or need a custom solution?** Use the **Issues** tab on the Actor's page to report problems or request features.

# Actor input Schema

## `startUrls` (type: `array`):

One or more Youku (优酷) video or share URLs. Supported formats: https://v.youku.com/v\_show/id\_{vid}.html, https://play.youku.com/... , https://player.youku.com/player.php/sid/{vid}/v.swf, Tudou (https://video.tudou.com/v/{vid}), a `...?vid={vid}` link, or a bare Youku id such as `XNTA2NTA0MjA1Mg==`.

## `downloadVideos` (type: `boolean`):

If enabled, the selected quality is downloaded as a single full-length MP4 and stored in the run's key-value store (a `videoUrl` stream link is always included in the output regardless). Youku serves video as HLS segments, which are downloaded and remuxed into one MP4. Storing large files increases storage usage; leave off if you only need metadata and direct URLs.

## `videoQuality` (type: `string`):

Which quality to expose as the primary `videoUrl` / download. 'best' picks the highest available resolution (up to 1080p), 'worst' picks the smallest file. Note: the highest qualities may require a Youku login/VIP for some videos; the output reports the resolution you actually receive under `videoQuality`.

## `maxItems` (type: `integer`):

Maximum number of videos to process (0 = no limit).

## `proxyConfiguration` (type: `object`):

Proxy settings. Proxy is OFF by default, which is fast and cheap and works for non-restricted videos. Many Youku videos are geo-restricted to mainland China — enable Apify Proxy (ideally a China / residential group) to reach those and to avoid blocks at high volume.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://v.youku.com/v_show/id_XNTA2NTA0MjA1Mg==.html"
    }
  ],
  "downloadVideos": false,
  "videoQuality": "best",
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `videos` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://v.youku.com/v_show/id_XNTA2NTA0MjA1Mg==.html"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hgservices/youku-video-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "startUrls": [{ "url": "https://v.youku.com/v_show/id_XNTA2NTA0MjA1Mg==.html" }] }

# Run the Actor and wait for it to finish
run = client.actor("hgservices/youku-video-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://v.youku.com/v_show/id_XNTA2NTA0MjA1Mg==.html"
    }
  ]
}' |
apify call hgservices/youku-video-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=hgservices/youku-video-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Youku Video Scraper",
        "description": "Scrape and download Youku (优酷) videos. Get video details — title, uploader, duration, tags, thumbnail and every resolution — plus direct video URLs, or save the full MP4. Just paste any Youku video or share link.",
        "version": "0.1",
        "x-build-id": "6wGalp4SBvQSr6HVj"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/hgservices~youku-video-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-hgservices-youku-video-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/hgservices~youku-video-scraper/runs": {
            "post": {
                "operationId": "runs-sync-hgservices-youku-video-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/hgservices~youku-video-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-hgservices-youku-video-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Youku video URLs",
                        "type": "array",
                        "description": "One or more Youku (优酷) video or share URLs. Supported formats: https://v.youku.com/v_show/id_{vid}.html, https://play.youku.com/... , https://player.youku.com/player.php/sid/{vid}/v.swf, Tudou (https://video.tudou.com/v/{vid}), a `...?vid={vid}` link, or a bare Youku id such as `XNTA2NTA0MjA1Mg==`.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "downloadVideos": {
                        "title": "Download video files",
                        "type": "boolean",
                        "description": "If enabled, the selected quality is downloaded as a single full-length MP4 and stored in the run's key-value store (a `videoUrl` stream link is always included in the output regardless). Youku serves video as HLS segments, which are downloaded and remuxed into one MP4. Storing large files increases storage usage; leave off if you only need metadata and direct URLs.",
                        "default": false
                    },
                    "videoQuality": {
                        "title": "Preferred video quality",
                        "enum": [
                            "best",
                            "worst"
                        ],
                        "type": "string",
                        "description": "Which quality to expose as the primary `videoUrl` / download. 'best' picks the highest available resolution (up to 1080p), 'worst' picks the smallest file. Note: the highest qualities may require a Youku login/VIP for some videos; the output reports the resolution you actually receive under `videoQuality`.",
                        "default": "best"
                    },
                    "maxItems": {
                        "title": "Max videos",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of videos to process (0 = no limit).",
                        "default": 0
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. Proxy is OFF by default, which is fast and cheap and works for non-restricted videos. Many Youku videos are geo-restricted to mainland China — enable Apify Proxy (ideally a China / residential group) to reach those and to avoid blocks at high volume.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
