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

Easily scrape comment data from Youku videos

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

## Pricing

from $1.00 / 1,000 comments

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 Comments Scraper do?

Youku Comments Scraper is an Apify Actor that allows you to scrape comments from Youku videos. It can scrape comments from individual video URLs, video IDs. The scraper handles pagination and retrieves all available comments for the specified videos, providing structured data in JSON format.

### ✨ Features

- 💬 Scrape comments using video URLs or video IDs
- ⚡ 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 comments
- Researchers studying trends and patterns in online video comments
- Developers needing structured data from Youku for their applications
- Anyone interested in gathering insights from Youku's vast video library

### ⬇️ Input Options

- 🔗 `startUrls` - List of URLs to scrape. It should can be a list of video URLs from Youku.
- 🔢 `videoIds` - List of Youku video IDs to scrape comments from.
- 💬 `maxCommentsPerVideo` - Maximum number of comments to scrape per video. Default is `100`

#### 💡 Input Examples

###### 🔗 Scrape by URLs

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

###### 🔍 Scrape by Video IDs

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

### 📤 Output Format

#### Common fields (all types)

- `commentId` - Unique identifier for the comment.
- `content` - The text content of the comment.
- `createTimeTimestamp` - The timestamp when the comment was created.
- `createTime` - The creation time of the comment in ISO 8601 format.
- `likeCount` - Number of likes the comment has received.
- `trampCount` - Number of tramps (dislikes) the comment has received
- `replyCount` - Number of replies to the comment.
- `parentCommentId` - The ID of the parent comment if this is a reply;
- `userId` - Unique identifier for the user who posted the comment.
- `userName` - The name of the user who posted the comment.
- `userAvatarUrl` - URL to the user's avatar image.
- `userLevel` - The level of the user who posted the comment.
- `publishIpArea` - The geographical area from which the comment was published.
- `images` - An array of URLs to images associated with the comment, if any.

### 🗂️ Output Examples

```json
{
	"commentId": 10001397563159,
	"content": "断臂男主从血泊中走来，有亿点带感啊",
	"createTimeTimestamp": 1785209835594,
	"createTime": "2026-07-28T03:37:15.594Z",
	"likeCount": 22,
	"trampCount": 0,
	"replyCount": 0,
	"parentCommentId": 0,
	"userId": 1403611276,
	"userName": "白行简不简单",
	"userAvatarUrl": "https://image.9xsecndns.cn/image/uicon/d74584f37ada8c53d31c6ac5ca45f1a9cf99a4a0c056a2.jpg",
	"userLevel": 5,
	"publishIpArea": "宁夏",
	"images": [
		"http://image.planet.youku.com/img/100/28/32972/i_1785209832972_0da9f7589d5f6fd07303a7d5ce44c324_b_w1841h888.jpg",
		"http://image.planet.youku.com/img/100/28/32988/i_1785209832988_7880c8687ac2576599eddffaf516d857_b_w1841h888.jpg",
		"http://image.planet.youku.com/img/100/28/33006/i_1785209833006_5856cbd8b08dcd8532e017f289b15b50_b_w1841h888.jpg",
		"http://image.planet.youku.com/img/100/28/33024/i_1785209833024_60474d6c9e4db3130cc45b539834b8ce_b_w1841h888.jpg",
		"http://image.planet.youku.com/img/100/28/33035/i_1785209833035_62244ac1b584ac579a1cd00a85cced03_b_w1841h888.jpg",
		"http://image.planet.youku.com/img/100/28/33053/i_1785209833053_de1f994ebd19d1feda38adda50e7baaf_b_w1841h888.jpg"
	]
}
```

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

The pricing changes according to your Apify plan.

Plan | Price
\--- | ---
Free | $5/1000 comments
Starter | $1.50/1000 comments
Scale | $1.20/1000 comments
Business | $1/1000 comments

### 🧩 Integrations and Youku Comments Scraper

Youku Comments 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 Comments Scraper successfully finishes a run.

### 🔌 Using Youku Comments 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-comments-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 Comments Scraper or simply found a bug, please create an issue on the Actor's [Issues tab](https://apify.com/natanielsantos/youku-comments-scraper/issues/open) in Apify Console.
📧 Email: nathan.santos159@hotmail.com

# Actor input Schema

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

List of Youku video URLs to start crawling comments from.

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

List of Youku video IDs to start crawling comments from. If both startUrls and videoIds are provided, startUrls will take precedence.

## `maxCommentsPerVideo` (type: `integer`):

Maximum number of comments to scrape per video.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://v.youku.com/v_show/id_XNjU1MDAxMDYzMg==.html"
    }
  ],
  "videoIds": [
    "XNjU1MDAxMDYzMg=="
  ],
  "maxCommentsPerVideo": 100
}
```

# 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": [
        {
            "url": "https://v.youku.com/v_show/id_XNjU1MDAxMDYzMg==.html"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("natanielsantos/youku-comments-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_XNjU1MDAxMDYzMg==.html" }] }

# Run the Actor and wait for it to finish
run = client.actor("natanielsantos/youku-comments-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": [
    {
      "url": "https://v.youku.com/v_show/id_XNjU1MDAxMDYzMg==.html"
    }
  ]
}' |
apify call natanielsantos/youku-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,natanielsantos/youku-comments-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/T2D5n9VgCDKDoXoFw/builds/bGjud3m5lTW7hoN9G/openapi.json
