# Youku Scraper (`natanielsantos/youku-scraper`) Actor

Easily scrape videos from Youku (优酷) from profiles, search or video URLs. Get detailed information about videos, like title, thumbnail, description, category and more.

- **URL**: https://apify.com/natanielsantos/youku-scraper.md
- **Developed by:** [Nataniel Santos](https://apify.com/natanielsantos) (community)
- **Categories:** Videos, Social media
- **Stats:** 2 total users, 1 monthly users, 87.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 basic results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

### What does Youku Scraper do?

Youku Scraper is an Apify Actor designed to extract detailed information about videos from the Youku platform. It can scrape video details using direct video URLs, profile URLs, or search terms, allowing users to gather comprehensive data on a wide range of videos available on Youku.

### ✨ Features

- 🔎 Scrape by search terms, profiles and video URLs
- ⚡ Fast and reliable scraping
- 🧑‍💻 Perfect for non-technical users
- 🔒 No need for authentication
- 🔄 Automatically handles retries for failed requests
- 📦 Outputs data in JSON format for easy integration with other tools

### 🎯 Who Is This For?

- Content creators and marketers looking to analyze Youku video content
- Researchers studying trends and patterns in online video content
- Developers needing structured data from Youku for their applications
- Anyone interested in gathering insights from Youku's vast video library

### ⬇️ Input Options

- 📊 `detailLevel` (optional) - The level of detail to scrape for each video. `basic` includes only a few key details (title, URL, thumbnail, etc.), while `detailed` includes all available details (including play info, tags, and more). Default is `detailed`.
- 🔗 `startUrls` - List of URLs to scrape. It can be a list of video URLs, profile URLs or search URLs from Youku.
  or
- 🔍 `searchTerms` - Search terms to query on Youku. The Actor will search for each term and scrape results until it reaches the `maxItems` limit.
- 🔃 `searchSortBy` (optional) - Sorting order for search results. `general` sorts by relevance, `most_recent` sorts by publish date with newest first, and `most_viewed` sorts by popularity with most viewed first.
- ⏱️ `searchDurationFilter` (optional) - Filter search results by video duration. Options: `all`, `up_to_10_minutes`, `10_to_30_minutes`, `30_to_60_minutes`, `over_60_minutes`.
- 🗓️ `searchPublishTimeFilter` (optional) - Filter search results by publish time. Options: `all`, `last_day`, `last_week`, `last_two_weeks`, `last_month`.
- 🎥 `searchQualityFilter` (optional) - Filter search results by video quality. Options: `all`, `hd`, `full_hd`, `blu-ray`.
- ⚙️ `maxItems` (optional) - Maximum number of items to scrape per profile URL or search term. Set `0` to scrape all available items. Default is `0`.

#### 💡 Input Examples

###### 🔗 Scrape by URLs

```json
{
  "startUrls": [
    "https://v.youku.com/v_show/id_XNjQ0NTczMTY5Mg==.html"
  ]
}
```

###### 🔍 Scrape by Search Terms

```json
{
  "searchTerms": [
    "小猪佩奇"
  ],
  "searchSortBy": "most_recent",
  "searchDurationFilter": "up_to_10_minutes",
  "searchPublishTimeFilter": "last_week",
  "searchQualityFilter": "hd",
  "maxItems": 50
}
```

###### 👤 Scrape a profile by URL

```json
{
  "startUrls": [
    "https://i.youku.com/u/UMjE1NTM3OTk0OA=="
  ],
  "maxItems": 20
}
```

##### 📹 Scrape by Video IDs

```json
{
  "videoIds": [
    "XNjQ0NTczMTY5Mg==",
    "XNTg5MzIxMTA3Ng=="
  ]
}
```

##### 🧩 Scrape by Profile IDs

```json
{
  "profileIds": [
    "UMTMzMjIxOTkwODA=",
    "UMjE1NTM3OTk0OA=="
  ]
}
```

### 📤 Output Format

The scraper returns different output shapes depending on the video type.

#### Common fields (all types)

- `url`: URL of the video on Youku
- `videoId`: Unique identifier for the video
- `title`: Title of the video
- `type`: Type of video — `ugc_video` or `show_episode`
- `categoryId`: Unique identifier for the video's category
- `categoryName`: Name of the video's category
- `duration`: Duration of the video in milliseconds
- `thumbnailUrl`: URL of the video's thumbnail image
- `verticalThumbnailUrl`: URL of the video's vertical thumbnail image
- `totalUpCount`: Number of upvotes the video has received
- `commentCount`: Number of comments the video has received
- `publishTime`: Publish time of the video
- `description`: Description of the video
- `isPaid`: Whether the video requires a paid subscription

#### UGC Video additional fields

- `uploader.id`: Unique identifier for the uploader
- `uploader.name`: Display name of the uploader
- `uploader.avatarUrl`: URL of the uploader's avatar image
- `uploader.followerCount`: Number of followers the uploader has

#### Show Episode additional fields

- `showId`: Unique identifier for the show
- `showName`: Name of the show
- `showSubtitle`: Subtitle of the show
- `showCategory`: Category of the show
- `showCategoryId`: Unique identifier for the show's category
- `showThumbnailUrl`: URL of the show's thumbnail image
- `showVerticalThumbnailUrl`: URL of the show's vertical thumbnail image
- `showReleaseTime`: Release time of the show
- `totalEpisodeCount`: Total number of episodes in the show

### 🗂️ Output Examples

#### Show Episode Output Example

```json
{
  "type": "show_episode",
  "url": "https://v.youku.com/v_show/id_XNjMxNjc2Njk2NA==.html",
  "longId": 1579191741,
  "videoId": "XNjMxNjc2Njk2NA==",
  "title": "搞笑外国人：冷热终极对决挑战赛，冰与火的碰撞，谁能获胜呢？",
  "categoryId": 177,
  "duration": 201830,
  "thumbnailUrl": "https://m.ykimg.com/05410101659E7AA62C400712EBE239AA",
  "verticalThumbnailUrl": "https://m.ykimg.com/05750101659E7AA62C400712EBE239AA",
  "categoryName": "少儿",
  "totalUpCount": 49,
  "commentCount": 0,
  "publishTime": "2024-01-10 19:10:18",
  "uploader": {},
  "description": "每天更新优质的搞笑外国人视频",
  "showId": "adbe8ef7391d4728a9a3",
  "showCategory": "少儿",
  "showCategoryId": 177,
  "totalEpisodeCount": 3000,
  "showName": "趣味老外剧场",
  "showSubtitle": "搞笑外国人展现生活百态",
  "showThumbnailUrl": "http://m.ykimg.com/050C0000659E909E13EB66127DA3888B",
  "showVerticalThumbnailUrl": "http://m.ykimg.com/050E00005729A660000000195504CDFC",
  "showReleaseTime": "0000-00-00",
  "isPaid": false
}
```

#### UGC Video Output Example

```json
{
  "type": "ugc_video",
  "url": "https://v.youku.com/v_show/id_XNjQ3MDU1Njk0NA==.html",
  "longId": 1617639236,
  "videoId": "XNjQ3MDU1Njk0NA==",
  "title": "创意玩具，帮助小粉完成吃喝拉撒睡",
  "categoryId": 177,
  "duration": 480850,
  "thumbnailUrl": "https://m.ykimg.com/0541010168175F3F662C2815183DA0E8",
  "verticalThumbnailUrl": "https://m.ykimg.com/0575010168175F4035D6C91A7EC52AC7",
  "categoryName": "少儿",
  "totalUpCount": 25241,
  "commentCount": 467,
  "publishTime": "2025-05-04 20:38:01",
  "uploader": {
    "id": "UMTQyOTQwMDcxODA=",
    "name": "童真玩具园",
    "avatarUrl": "https://ykimg.alicdn.com/develop/image/2023-08-04/2c50d70b0f150ed754ab101aa2ebdfd6.png",
    "followerCount": 40000
  },
  "description": null,
  "showId": null,
  "showCategory": null,
  "showCategoryId": null,
  "totalEpisodeCount": null,
  "showName": null,
  "showSubtitle": null,
  "showThumbnailUrl": null,
  "showVerticalThumbnailUrl": null,
  "showReleaseTime": null,
  "isPaid": false
}
```

#### Basic Output Example

When `detailLevel` is set to `basic`, the output contains only a few key fields:

```json
{
  "url": "https://v.youku.com/v_show/id_XNTg5MzIxMTA3Ng==.html",
  "title": "国外小女孩和哥哥的热与冷挑战，你觉得谁更厉害一些呢",
  "videoId": "XNTg5MzIxMTA3Ng==",
  "type": "ugc_video",
  "uploader": {
    "id": "UMTMzMjIxOTkwODA=",
    "name": "糖果甜甜吖",
    "avatarUrl": "https://ykimg.alicdn.com/develop/image/2023-03-29/401aa2b57d779c15f96ad4d9cdc56525.png"
  },
  "duration": 229000,
  "publishTime": "4年前",
  "thumbnailUrl": "https://vthumb.ykimg.com/0541010162F06DF5052D3F9A68B9B4AB"
}
```

### 💲 How much will scraping Youku cost you?

The pricing changes according to your Apify plan.

Plan | Basic Result Level | Detailed Result Level
\--- | --- | ---
Free | $8/1000 videos | $15/1000 videos
Starter | $5/1000 videos | $9/1000 videos
Scale | $4/1000 videos | $7/1000 videos
Business | $3/1000 videos | $6/1000 videos

### 🧩 Integrations and Youku Scraper

Youku Scraper can be connected with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations). You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, [and more](https://docs.apify.com/integrations). Or you can use [webhooks](https://docs.apify.com/integrations/webhooks) to carry out an action whenever an event occurs, e.g. get a notification whenever Youku Scraper successfully finishes a run.

### 🔌 Using Youku Scraper with the Apify API

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify actors. The API also lets you access any datasets, monitor actor performance, fetch results, create and update versions, and more.

To access the API using Node.js, use the `apify-client` NPM package. To access the API using Python, use the `apify-client` PyPI package.

Check out the [Apify API reference](https://docs.apify.com/api/v2) docs for full details or click on the  [API tab](https://apify.com/natanielsantos/youku-scraper/api) for code examples.

### 💬 Giving feedback

We're always working on improving the performance of our Actors. So if you've got any technical feedback for Youku Scraper or simply found a bug, please create an issue on the Actor's [Issues tab](https://apify.com/natanielsantos/youku-scraper/issues/open) in Apify Console.
📧 Email: nathan.santos159@hotmail.com

# Actor input Schema

## `detailLevel` (type: `string`):

The level of detail to scrape for each video. Basic level includes only a few key details (title, URL, thumbnail, etc.), while detailed level includes all available details (including play info, tags, and more).

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

The maximum number of items to scrape per profile URL or search term.

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

Start URLs to scrape. You can provide video URLs, creator profile URLs, or search URLs.

## `searchTerms` (type: `array`):

Search terms to search for videos on Youku.

## `searchSortBy` (type: `string`):

The order in which to sort the search results.

## `searchDurationFilter` (type: `string`):

The duration filter to apply to the search results.

## `searchPublishTimeFilter` (type: `string`):

Filter search results by publish time.

## `searchQualityFilter` (type: `string`):

Filter search results by video quality.

## `videoIds` (type: `array`):

Youku video IDs to scrape. You can find the video ID in the URL of the video page. Example: XNjQ0NTczMTY5Mg==

## `profileIds` (type: `array`):

Youku profile IDs to scrape. You can find the profile ID in the URL of the profile page. Example: UMjE1NTM3OTk0OA==

## Actor input object example

```json
{
  "detailLevel": "detailed",
  "maxItems": 20,
  "startUrls": [
    "https://v.youku.com/v_show/id_XNjQ0NTczMTY5Mg==.html",
    "https://so.youku.com/search/q_%E5%B0%8F",
    "https://i.youku.com/u/UMjE1NTM3OTk0OA=="
  ],
  "searchTerms": [
    "小猪佩奇"
  ],
  "searchSortBy": "general",
  "searchDurationFilter": "all",
  "searchPublishTimeFilter": "all",
  "searchQualityFilter": "all",
  "videoIds": [
    "XNjQ0NTczMTY5Mg=="
  ],
  "profileIds": [
    "UMjE1NTM3OTk0OA=="
  ]
}
```

# Actor output Schema

## `results` (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": [
        "https://v.youku.com/v_show/id_XNjQ0NTczMTY5Mg==.html"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("natanielsantos/youku-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": ["https://v.youku.com/v_show/id_XNjQ0NTczMTY5Mg==.html"] }

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

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": [
    "https://v.youku.com/v_show/id_XNjQ0NTczMTY5Mg==.html"
  ]
}' |
apify call natanielsantos/youku-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,natanielsantos/youku-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/E8nlGvPge8giiINA9/builds/R7Ic0ByB6yJDwwSUK/openapi.json
