# PineDrama Episodes Scraper & Data Export (`spider_studio/pinedrama-drama-episodes`) Actor

Extract PineDrama episode lists in bulk by collection ID. Get video IDs, episode numbers, sequence IDs, and access flags via API or export to JSON, CSV, and Excel.

- **URL**: https://apify.com/spider\_studio/pinedrama-drama-episodes.md
- **Developed by:** [NewLai](https://apify.com/spider_studio) (community)
- **Categories:**
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 successful collection ids

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

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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 PineDrama Episodes Scraper do?

**PineDrama Episodes Scraper & Data Export API** extracts complete episode lists for [PineDrama](https://shortdrama.tiktok.com/) short dramas. Submit PineDrama collection IDs in bulk and receive structured episode metadata without running a browser or maintaining your own PineDrama API integration.

Each successful result includes the drama collection ID, creator ID, and its episodes with video IDs, episode numbers, sequence IDs, intro flags, and limited-free access flags. The Actor processes up to 1,000 collection IDs per run, removes exact duplicates, preserves input order, retries transient failures, and returns an individual error row when one drama fails.

### Explore more PineDrama Actors

| Actor | Use it for |
| --- | --- |
| [PineDrama Search Scraper](https://apify.com/spider_studio/pinedrama-drama-search) | Find short dramas and collection IDs by keyword. |
| [PineDrama Drama Details & Episodes Scraper](https://apify.com/spider_studio/pinedrama-drama-details-scraper) | Get drama metadata, creator data, and first-episode IDs. |
| [PineDrama Video URL Scraper](https://apify.com/spider_studio/pinedrama-episode-playback) | Resolve playable URLs and playback metadata for episodes. |
| [PineDrama Recommendations Scraper](https://apify.com/spider_studio/pinedrama-drama-recommendations) | Find similar short dramas for collection IDs. |

### Why use this PineDrama episode list API?

- Build or refresh a searchable short-drama and episode catalog.
- Map PineDrama collection IDs to episode video IDs for downstream workflows.
- Identify episode order, intro content, and limited-free availability.
- Process large ID lists concurrently while keeping failures isolated.
- Export results to JSON, CSV, Excel, or HTML.
- Run manually, on a schedule, through the Apify API, or from Apify integrations and webhooks.

### What PineDrama episode data can I extract?

| Field | Type | Description |
| --- | --- | --- |
| `collection_id` | string | Precision-safe PineDrama drama collection ID |
| `creator_id` | string or null | PineDrama creator ID returned for the collection |
| `episodes` | array | Ordered episode metadata for the drama |
| `episodes[].video_id` | string | Precision-safe episode video ID |
| `episodes[].number` | integer | Displayed episode number |
| `episodes[].sequence_id` | integer | Episode sequence identifier |
| `episodes[].is_intro` | boolean | Whether the item is an intro |
| `episodes[].is_limited_free` | boolean | Whether the episode is marked limited-free |
| `success` | boolean | Whether the collection ID was fetched successfully |
| `error` | string or null | Sanitized failure message when a request fails |

### How to scrape PineDrama episode lists

1. Obtain one or more PineDrama `collection_id` values, for example from a PineDrama search or drama-detail workflow.
2. Open the Actor's **Input** tab.
3. Add every ID to the required `collection_ids` list. Keep IDs as quoted strings so 64-bit values retain their precision.
4. Click **Save & Start**.
5. Open **Output** to inspect, download, or connect the resulting dataset.

No coding is required in Apify Console. Developers can run the same bulk request through the Actor API, Python client, JavaScript client, schedules, or webhooks.

### How much does PineDrama episode scraping cost?

This Actor uses pay-per-event pricing. A charge occurs once for each unique `collection_id` that is successfully fetched and saved:

- Free plan: **$0.003 per successful collection ID** ($3 per 1,000).
- Paid plans: **$0.002 per successful collection ID** ($2 per 1,000).
- Failed collection IDs, retries, and duplicate IDs removed from the same input are not charged an event fee.
- Apify platform usage is charged separately to the user and is not included in the event price.

Your actual total depends on the number of successful unique IDs plus compute, proxy traffic, storage, and other platform resources used by the run. You can set a maximum Actor charge before starting a run; processing stops when the event budget is exhausted.

### Input

See the Input tab for the full schema. The input object accepts only `collection_ids`, a required array containing 1–1,000 decimal strings. Each ID must contain 1–20 digits. Exact duplicates are removed while their first-seen order is preserved. To request one drama, provide a one-item array.

```json
{
  "collection_ids": [
    "7675963864189735957",
    "7644028687834256402"
  ]
}
```

The IDs above only demonstrate the required format; availability can change over time.

### Output

Every unique input produces at most one dataset row. Successful rows contain an episode list and are charged once. Failed rows contain the original collection ID and a sanitized error message without an event charge. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel. JSON best preserves the nested `episodes` array.

```json
{
  "collection_id": "7675963864189735957",
  "creator_id": "7280000000000000000",
  "episodes": [
    {
      "video_id": "7675963864189752341",
      "number": 1,
      "sequence_id": 1,
      "is_intro": false,
      "is_limited_free": true
    }
  ],
  "success": true,
  "error": null
}
```

### Tips for reliable batch extraction

- Start with a small batch to confirm that your collection IDs are current.
- Keep IDs as strings in every API client; JavaScript numbers can lose precision.
- Use JSON export when consuming nested episode records programmatically.
- Inspect individual failure rows instead of retrying the entire batch.
- Schedule recurring runs if you need to detect episode-list changes.

### FAQ and support

#### Is this an official PineDrama API?

No. This is an independent data extraction Actor and is not affiliated with or endorsed by PineDrama or TikTok.

#### Does one failed collection ID stop the batch?

No. By default, failures are written as separate uncharged rows while other collection IDs continue. Transient upstream failures use bounded retries.

#### Are duplicate collection IDs charged more than once?

No. Exact duplicates within one input are removed before processing, so a successfully saved unique collection ID is charged once.

#### Can I use the results through an API?

Yes. Open the Actor's API tab for ready-to-use examples or access the default dataset through Apify's API and client libraries.

This Actor extracts episode metadata and does not download or unlock video content. Use the data only where you have the necessary rights and comply with PineDrama's terms and applicable laws. It does not intentionally extract private user data. If your results contain personal data, ensure you have a lawful basis for processing it; consult legal counsel if unsure.

For reproducible problems, include the sanitized input and run ID in the Actor's Issues tab.

# Actor input Schema

## `collection_ids` (type: `array`):

Provide 1–1,000 PineDrama collection IDs as strings containing 1–20 digits. Exact duplicates are removed.

## Actor input object example

```json
{}
```

# Actor output Schema

## `dataset` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("spider_studio/pinedrama-drama-episodes").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("spider_studio/pinedrama-drama-episodes").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 '{}' |
apify call spider_studio/pinedrama-drama-episodes --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,spider_studio/pinedrama-drama-episodes"
        }
    }
}

```

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/PHOhXQt8UyJyqxVFs/builds/N3hMwUivF4A7h6n0v/openapi.json
