# iQIYI Subtitles Scraper (`hgservices/iqiyi-subtitles-scraper`) Actor

Download iQIYI (iq.com) subtitles in every available language as WebVTT, SRT, or XML files. Bulk-export subtitle text from episode URLs for translation, NLP, and language learning.

- **URL**: https://apify.com/hgservices/iqiyi-subtitles-scraper.md
- **Developed by:** [Harish Garg](https://apify.com/hgservices) (community)
- **Categories:** Videos, Social media, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 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

## iQIYI Subtitles Scraper

**iQIYI Subtitles Scraper** lets you **download subtitles from [iQIYI](https://www.iq.com/) (iq.com) in every available language**. Paste one or more episode links and get clean subtitle files in **WebVTT (.vtt), SubRip (.srt), and XML** formats. It runs on the [Apify platform](https://apify.com/actors), so you also get API access, scheduling, integrations, proxy support, and run monitoring.

Use it to grab subtitles for dramas, movies, anime, and shows on iQIYI without copy-pasting text by hand. Every language track the episode offers is exported for you in one run.

### Why use iQIYI Subtitles Scraper?

- **Translation and localization** — collect parallel subtitle text across many languages for the same title.
- **Language learning** — build aligned subtitle sets for study apps, flashcards, and reading practice.
- **Research and NLP** — gather structured dialogue data for machine translation or subtitle analysis.
- **Archiving** — keep a clean copy of subtitle files for the episodes you follow.

### How to scrape iQIYI subtitles

1. Open the Actor in Apify Console.
2. Paste one or more iQIYI episode URLs into the **Episode URLs** field.
3. (Optional) Choose which **subtitle formats** you want — WebVTT, SRT, or XML.
4. (Optional) Turn on a **proxy** if the show is not available in the region where the Actor runs.
5. Click **Start** and wait for the run to finish.
6. Download your results from the **Output** tab, or get the ready-made subtitle files from the **Storage** tab.

### Input

The Actor accepts the following input fields (see the **Input** tab for the full form):

- **Episode URLs** (required) — a list of iQIYI episode links (the ones with `/play/` in the address).
- **Subtitle formats** — any of WebVTT, SRT, or XML. By default you get all three.
- **Include subtitle text in dataset** — adds the subtitle text directly to your results table. On by default.
- **Proxy configuration** — standard Apify proxy settings for geo-restricted content.

#### Input example

```json
{
    "startUrls": [
        { "url": "https://www.iq.com/play/love-destiny-episode-1-1ykiuvfo6os?lang=en_us" }
    ],
    "formats": ["webvtt", "srt"],
    "includeSubtitleContent": true,
    "proxyConfiguration": { "useApifyProxy": false }
}
```

### Output

You get **one row per subtitle file** — that is, one row for every language and format combination. A track available in WebVTT, SRT, and XML produces three rows. Every subtitle file is also saved for direct download in the **Storage** tab. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

#### Output example

```json
{
    "playUrl": "https://www.iq.com/play/love-destiny-episode-1-1ykiuvfo6os?lang=en_us",
    "episodeSlug": "love-destiny-episode-1-1ykiuvfo6os",
    "language": "English",
    "format": "webvtt",
    "url": "https://api.apify.com/v2/key-value-stores/<storeId>/records/sub-love-destiny-episode-1-1ykiuvfo6os-00-English.vtt",
    "content": "WEBVTT\n\n00:00:01.000 --> 00:00:03.000\nHello world\n..."
}
```

#### Data you get

| Field | Description |
| --- | --- |
| `playUrl` | The episode link you scraped. |
| `episodeSlug` | A short name for the episode. |
| `language` | The language of the subtitles (for example, English). |
| `format` | The subtitle format of the file — WebVTT, SRT, or XML. |
| `url` | A direct download link for the subtitle file. |
| `content` | The subtitle text itself (included when you turn on the option). |

### How much does it cost to scrape iQIYI subtitles?

Runs are cheap. Cost scales with the number of episode links you add, so a handful of episodes costs very little. New Apify accounts include a **free monthly usage tier** that is enough to try the Actor on several episodes at no cost.

### Tips

- Ask for only the format you need (for example just SRT) to keep runs small.
- Turn off **Include subtitle text in dataset** if you only want the downloadable files, not the text in your results table.
- Add many episode links in a single run to process a whole season at once.

### FAQ, disclaimers, and support

**Is subtitle scraping legal?** This Actor only collects subtitle files that the iQIYI player already loads for public playback. You are responsible for complying with iQIYI's Terms of Service and applicable copyright law in your area. Use the data for personal, research, or licensed purposes only.

**Why did an episode return no subtitles?** The show may be geo-restricted, locked behind login, or simply have no subtitle tracks. Try turning on a proxy set to a supported region.

**Which iQIYI links work?** Use standard episode links from iq.com — the ones with `/play/` in the address.

**Found a bug or need a change?** Open an issue on the Actor's **Issues** tab. Custom solutions are available on request.

# Actor input Schema

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

One or more iQIYI /play/ episode URLs to download subtitles from.

## `formats` (type: `array`):

Which subtitle file formats to download for each language.

## `includeSubtitleContent` (type: `boolean`):

If enabled, the raw subtitle text is embedded in each dataset item under "content". The files are always stored in the key-value store as well.

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

Proxy settings. iQIYI content can be geo-restricted, so a proxy in a supported region may be required.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.iq.com/play/love-destiny-episode-1-1ykiuvfo6os?lang=en_us"
    }
  ],
  "formats": [
    "webvtt",
    "srt",
    "xml"
  ],
  "includeSubtitleContent": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `subtitleFiles` (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://www.iq.com/play/love-destiny-episode-1-1ykiuvfo6os?lang=en_us"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hgservices/iqiyi-subtitles-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://www.iq.com/play/love-destiny-episode-1-1ykiuvfo6os?lang=en_us" }] }

# Run the Actor and wait for it to finish
run = client.actor("hgservices/iqiyi-subtitles-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://www.iq.com/play/love-destiny-episode-1-1ykiuvfo6os?lang=en_us"
    }
  ]
}' |
apify call hgservices/iqiyi-subtitles-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hgservices/iqiyi-subtitles-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/mJyb22RntGQoro4Mm/builds/1f0uOxE2YQb8sRf8w/openapi.json
