# PTT Scraper (Taiwan PTT.cc posts and comments) (`flourishing_catfish/ptt-scraper`) Actor

Scrape PTT.cc, the largest forum in Taiwan: posts from any board with full text, author, time, up/down votes and every comment. Keyword search. No login.

- **URL**: https://apify.com/flourishing_catfish/ptt-scraper.md
- **Developed by:** [Make Life Fair](https://apify.com/flourishing_catfish) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## PTT Scraper — Taiwan PTT.cc posts and comments

Scrape **PTT (批踢踢, ptt.cc)**, Taiwan's largest online forum. Get posts from any board — Stock, Gossiping, Tech_Job, NBA, Baseball, car, Beauty, and hundreds more — with full text, author, time, upvote/downvote counts and every comment.

No login. Handles the over-18 gate automatically.

### What you get

| Field | Example |
|---|---|
| `board`, `title`, `url`, `postId` | Stock, \[請益] ETF長期放都凹的回來嗎 |
| `author`, `postedAt` | as2990430 (全糖市民), 2026-11-07T17:38:55 |
| `content` | full post text |
| `upvotes` (推), `downvotes` (噓), `neutralComments` (→), `commentCount` | 85, 12, 23, 120 |
| `comments[]` | `type`, `user`, `content`, `time` |

### Use cases

- **Taiwan stock sentiment** — track r/Stock-style chatter on PTT Stock board.
- **Brand and product monitoring** in Taiwan.
- **Public opinion research** — Gossiping board is Taiwan's biggest discussion hub.
- **Training data / NLP** in Traditional Chinese.
- **Job market signals** — Tech_Job, Soft_Job boards.

### Input

```json
{"boards": ["Stock", "Tech_Job"], "keyword": "台積電", "maxPostsPerBoard": 100, "includeComments": true}
```

### Pricing

Pay per post returned. Platform usage included.

### Notes

Collects publicly visible forum posts. Please respect applicable laws and PTT's rules when using the data.

### Sample output

One real post from a test run (long text shortened):

```json
{
  "board": "Stock",
  "url": "https://www.ptt.cc/bbs/Stock/M.1793944806.A.AF9.html",
  "postId": "M.1793944806.A.AF9",
  "title": "[閒聊] 2026/11/06 盤後閒聊",
  "author": "laptic (嶼天聖林)",
  "postedAt": "2026-11-06T14:00:04",
  "content": "台　股　\n39690.74　▼1883.98 (-4.53%)　1兆1777.93元\n\n台指11　\n39786   　▼2096    (-5.00%)　　 142,551口\n\n櫃買指　　\n303.78　▼　17.69 (-5.50%)　　 1689.11億\n\n\n\n日盤\n\n\n台指期　自營商    -875 投信 ...",
  "upvotes": 701,
  "downvotes": 98,
  "neutralComments": 690,
  "commentCount": 1489,
  "scrapedAt": "2026-11-07T12:53:46.871941+00:00",
  "comments": [
    {
      "type": "up",
      "user": "kcg123",
      "content": "空蛙:空軍日跳傘崩! G蛙:2590傳家寶. 中小傳慘蛙:啊",
      "time": "11/06 14:00"
    },
    {
      "type": "up",
      "user": "davie11333",
      "content": "聽訓!",
      "time": "11/06 14:00"
    },
    {
      "type": "up",
      "user": "weekend88123",
      "content": "老蘇好帥",
      "time": "11/06 14:00"
    }
  ]
}
```

### How to use

1. Click **Try for free** (or Start).
2. Enter board names (e.g. `Stock`, `Gossiping`, `Tech_Job`).
3. Set the maximum number of posts, then run.
4. Download the results as JSON, CSV, Excel or HTML, or send them to Google Sheets, Make, Zapier or a webhook.

You can schedule the run (daily, hourly) in Apify to track new posts and price changes over time.

### How much does it cost?

**$4 per 1,000 posts** ($0.004 per post), and Apify platform usage is included in that price.

| Posts | Cost |
|---|---|
| 100 | $0.40 |
| 1,000 | $4 |
| 10,000 | $40 |

### Use it from code

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("flourishing_catfish/ptt-scraper").call(run_input={"boards": ["Stock"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

HTTP API (returns the items directly):

```bash
curl -X POST "https://api.apify.com/v2/acts/flourishing_catfish~ptt-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" -d '{"boards": ["Stock"]}'
```

### FAQ

**Do I need a PTT account?** No. It reads public pages only, with no login and no browser.

**Is scraping PTT legal?** It collects publicly visible data. You're responsible for how you use it: follow the site's terms and the data-protection law that applies to you (e.g. GDPR), and don't use it for spam.

**Something broke or a field is missing?** Report it on this Actor's Issues tab with the input you used.

### Also searched as

PTT 爬蟲, 批踢踢 資料, ptt.cc scraper, Taiwan forum data, 股票版 情緒分析, sentiment analysis Taiwan

# Actor input Schema

## `boards` (type: `array`):

PTT board names, e.g. Stock, Gossiping, Tech_Job, Baseball, NBA, car, Beauty.

## `keyword` (type: `string`):

Only posts whose title matches this keyword (uses PTT's own board search).

## `maxPostsPerBoard` (type: `integer`):

Newest posts first.

## `includeComments` (type: `boolean`):

Return every comment (推/噓/→) with user, text and time.

## Actor input object example

```json
{
  "boards": [
    "Stock"
  ],
  "maxPostsPerBoard": 20,
  "includeComments": true
}
```

# 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 = {
    "boards": [
        "Stock"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("flourishing_catfish/ptt-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 = { "boards": ["Stock"] }

# Run the Actor and wait for it to finish
run = client.actor("flourishing_catfish/ptt-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 '{
  "boards": [
    "Stock"
  ]
}' |
apify call flourishing_catfish/ptt-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,flourishing_catfish/ptt-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/OQ0SmAiwYWPPXH565/builds/joYnhfLLepMpiIOWR/openapi.json
