# PTT Scraper & API – Taiwan Forum Posts and Push Comments (`claude_code_reviewer/ptt-scraper-en`) Actor

PTT scraper and unofficial PTT API for ptt.cc, Taiwan's largest forum. No login or API key: scrape board listings and full posts with every push, boo and arrow comment, floor, author and time. Poster IPs are opt-in. Export JSON, CSV or Excel for Taiwan social listening.

- **URL**: https://apify.com/claude_code_reviewer/ptt-scraper-en.md
- **Developed by:** [Chad](https://apify.com/claude_code_reviewer) (community)
- **Categories:** Social media, News, AI
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 board 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/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 & API – Taiwan Forum Posts and Push Comments

A **PTT scraper** for [ptt.cc](https://www.ptt.cc), Taiwan's largest and best-known online forum (a BBS with a web mirror). PTT has no official API, so this Actor works as an unofficial **PTT API**: pull board listings, full posts and every push / boo / arrow comment, and export them as JSON, CSV or Excel. No login, API key or code needed.

Age-restricted (18+) boards such as Gossiping are supported; the age-consent cookie is sent for you (see Notes for your responsibility).

Built for **social listening, brand monitoring, stock-sentiment research and academic work** on Taiwanese public opinion.

**Language note:** PTT is written in Traditional Chinese, so post titles, content and comments come back in Traditional Chinese exactly as written. Field names, the schema and this documentation are English. Use Chinese keywords for the title filter (for example `心得` for "review/analysis" or `新聞` for "news"), and feed the text to a translation or LLM step if you need English.

### What the PTT API returns

Board listing mode returns one row per post. These are real rows from a run on the Stock board (Taiwan's stock-market board):

```json
[
    {
        "post_id": "M.1795792834.A.CFD",
        "board": "Stock",
        "title": "[心得] 波形1127",
        "author": "rainbowcatch",
        "push_count": 7,
        "is_pinned": false,
        "created_at": "11/27",
        "posted_at": "2026-11-27T15:20:34.000Z",
        "post_url": "https://www.ptt.cc/bbs/Stock/M.1795792834.A.CFD.html",
        "source_mode": "board",
        "source_query": "Stock",
        "scraped_at": "2026-11-28T06:36:11.466Z"
    },
    {
        "post_id": "M.1795694303.A.E34",
        "board": "Stock",
        "title": "[心得] 投資股票快20年，這二週最刺激",
        "author": "ADshyang",
        "push_count": 99,
        "is_pinned": false,
        "created_at": "11/26",
        "posted_at": "2026-11-26T11:58:23.000Z",
        "post_url": "https://www.ptt.cc/bbs/Stock/M.1795694303.A.E34.html",
        "source_mode": "board",
        "source_query": "Stock",
        "scraped_at": "2026-11-28T06:36:11.886Z"
    }
]
```

For the full text and every comment, use single post mode (`post`), shown below.

### Three steps

1. **Pick a mode.** `board` lists the newest posts of a board. `post` fetches one post with its full text and all comments.
2. **Fill the input.** A board name such as `Stock`, or a full post URL.
3. **Run and export.** Download JSON, CSV or Excel, or read the dataset through the Apify API.

```json
{ "mode": "board", "boards": ["Stock"], "maxItems": 20 }
```

Pay per result: $0.002 per listing row, $0.008 per post, $0.003 per push comment (see Modes below).

***

### Output fields

All field names are English snake_case. Missing values are `null`, never omitted. Text values stay in Traditional Chinese.

#### Board listing mode (`board`)

| Field | Type | Description | Always present? |
|---|---|---|---|
| `post_id` | string|null | Post ID, e.g. `M.1795694303.A.E34` | Almost always (null for rare legacy formats) |
| `board` | string | Board name, e.g. `Stock` | Yes |
| `title` | string|null | Title including the category tag such as `[心得]` (review/analysis) or `[新聞]` (news) | Yes (deleted posts are skipped) |
| `author` | string|null | Author's PTT ID | Yes |
| `push_count` | number|null | Net push score (pushes minus boos). PTT's `爆` ("exploded", 100 or more) is output as `100`, `XX` as `-100` | Usually (null when a post has no pushes) |
| `is_pinned` | boolean | Pinned post (board rules and announcements kept at the bottom of the newest page) | Yes |
| `created_at` | string|null | Date as shown on the listing, `M/DD` with no year | Yes |
| `posted_at` | string|null | Exact post time, ISO 8601 (UTC), derived from the timestamp inside the post ID | Almost always |
| `post_url` | string | Full post URL | Yes |
| `source_mode` | string | `"board"` | Yes |
| `source_query` | string | The board name | Yes |
| `scraped_at` | string | Scrape time, ISO 8601 | Yes |

#### Single post mode (`post`): post row

| Field | Type | Description | Always present? |
|---|---|---|---|
| `post_id` | string|null | Post ID | Yes |
| `board` | string|null | Board name | Yes |
| `title` | string|null | Title | Yes |
| `author` | string|null | Author's PTT ID | Yes |
| `content` | string|null | Post body (header and the site footer removed) | Yes |
| `category` | string|null | Text inside the title's `[...]` tag | Only when the title has a tag |
| `push_count` | number|null | `push_up` minus `push_down` | Usually |
| `push_up` | number|null | Number of pushes (推) | Yes |
| `push_down` | number|null | Number of boos (噓) | Yes |
| `comment_count` | number|null | Total push lines (pushes + boos + arrows) | Yes |
| `ip` | string|null | Poster IP from the post footer. **`null` by default**; only filled when `includeAuthorIp` is `true` | Only when opted in and the footer has one |
| `created_at` | string|null | Post time as PTT prints it, e.g. `Fri Jul  3 21:57:03 2026` | Yes |
| `post_url` | string | Full post URL | Yes |
| `source_mode` | string | `"post"` | Yes |
| `source_query` | string | The input URL | Yes |
| `scraped_at` | string | Scrape time, ISO 8601 | Yes |

#### Single post mode (`post`): push comment rows

Every push line becomes its own row:

| Field | Type | Description | Always present? |
|---|---|---|---|
| `comment_id` | string | `{post_id}_{floor}` | Yes |
| `post_id` | string|null | Parent post ID | Yes |
| `board` | string|null | Board name | Yes |
| `floor` | number | Floor, starting at 1 | Yes |
| `push_type` | `"推"`|`"噓"`|`"→"`|null | Push (推, upvote), boo (噓, downvote) or arrow (→, neutral reply) | Yes |
| `author` | string|null | Commenter's PTT ID | Yes |
| `content` | string|null | Comment text | Yes |
| `ip` | string|null | Commenter IP. **`null` by default**; only filled when `includeAuthorIp` is `true` and the board shows IPs | Null by default |
| `created_at` | string|null | Comment time, `MM/DD HH:mm` (no year) | Yes |
| `scraped_at` | string | Scrape time, ISO 8601 | Yes |

Example post row and first two push rows, from a real post on the Stock board (body shortened):

```json
[
    {
        "post_id": "M.1783087025.A.C75",
        "board": "Stock",
        "title": "[心得] 現在應該把台股部位轉到mag7",
        "author": "darbylu",
        "content": "我覺得費半今年大概要進入橫盤震盪整理了 …",
        "category": "心得",
        "push_count": 68,
        "push_up": 77,
        "push_down": 9,
        "comment_count": 160,
        "ip": null,
        "created_at": "Fri Jul  3 21:57:03 2026",
        "post_url": "https://www.ptt.cc/bbs/Stock/M.1783087025.A.C75.html",
        "source_mode": "post",
        "source_query": "https://www.ptt.cc/bbs/Stock/M.1783087025.A.C75.html",
        "scraped_at": "2026-07-03T00:00:00.000Z"
    },
    {
        "comment_id": "M.1783087025.A.C75_1",
        "post_id": "M.1783087025.A.C75",
        "board": "Stock",
        "floor": 1,
        "push_type": "推",
        "author": "Gipmydanger",
        "content": "高手",
        "ip": null,
        "created_at": "07/03 21:58",
        "scraped_at": "2026-07-03T00:00:00.000Z"
    },
    {
        "comment_id": "M.1783087025.A.C75_2",
        "post_id": "M.1783087025.A.C75",
        "board": "Stock",
        "floor": 2,
        "push_type": "推",
        "author": "as3366700",
        "content": "所以你單呢",
        "ip": null,
        "created_at": "07/03 21:59",
        "scraped_at": "2026-07-03T00:00:00.000Z"
    }
]
```

***

### Modes

| mode | Input fields | Output | Billing event |
|---|---|---|---|
| `board` | `boards[]` board names | Newest posts of each board | `search-listing`, $0.002 per row |
| `post` | `postUrls[]` full post URLs | Post text plus all push comments | `product-detail`, $0.008 per post, plus `review-item`, $0.003 per push comment |

***

### Input

| Field | Type | Description | Default |
|---|---|---|---|
| `mode` | `"board"` | `"post"` | Mode (detected automatically if omitted) | auto |
| `boards` | string\[] | Board names for board mode. Case-sensitive; letters, digits, `_` and `-` only | none |
| `postUrls` | string\[] | Full `www.ptt.cc` post URLs for post mode (other hosts are rejected) | none |
| `keywords` | string\[] | Optional title filter for board mode; a post is kept if its title contains any keyword. Titles are Traditional Chinese, so use Chinese keywords | none |
| `dateFrom` | string | Optional, board mode. Only posts after this time: `3d`, `12h`, `2w` (relative) or `MM/DD/YY` (absolute). Judged from the timestamp in the post ID, accurate to the second. Paging stops once a whole page is older, which keeps scheduled runs cheap | none |
| `dateTo` | string | Optional, board mode. Only posts before this time, same formats | none |
| `bulkInput` | string | Paste one board name or post URL per line; merged into the matching field | none |
| `maxItems` | integer | Maximum posts per board in board mode (up to 2000) | `50` |
| `includeAuthorIp` | boolean | Output poster and commenter IPs in the `ip` fields. **Off by default.** IPs are personal data, so you are responsible for lawful use if you turn it on. When off, `ip` is `null` and IPs embedded in push timestamps are removed | `false` |
| `proxyConfiguration` | object | Proxy settings. Usually not needed, PTT accepts direct connections | no proxy |

***

### Input examples

#### Example 1: newest 20 posts of the Stock board

```json
{
    "mode": "board",
    "boards": ["Stock"],
    "maxItems": 20
}
```

#### Example 2: several boards with a title keyword filter

```json
{
    "mode": "board",
    "boards": ["Stock", "Tech_Job", "Baseball"],
    "keywords": ["心得", "新聞"],
    "maxItems": 50
}
```

#### Example 3: an 18+ board (you are responsible for the age requirement)

```json
{
    "mode": "board",
    "boards": ["Gossiping"],
    "keywords": ["問卦"],
    "maxItems": 10
}
```

#### Example 4: one post with all of its comments

```json
{
    "mode": "post",
    "postUrls": [
        "https://www.ptt.cc/bbs/Stock/M.1783087025.A.C75.html"
    ]
}
```

#### Example 5: paste a list of boards

```json
{
    "mode": "board",
    "bulkInput": "Stock\nTech_Job\nHatePolitics",
    "maxItems": 30
}
```

#### Example 6: daily keyword monitor

Run this on an Apify Schedule once a day. `dateFrom` makes every run collect only the last day's posts, so cost stays flat as history grows.

```json
{
    "mode": "board",
    "boards": ["Stock"],
    "keywords": ["台積電"],
    "dateFrom": "1d",
    "maxItems": 500
}
```

(`台積電` is TSMC.)

***

### Notes

1. **18+ boards and your responsibility.** PTT marks some boards (for example Gossiping and sex) as 18+ and asks that their content not be passed to anyone under 18. This Actor sends the age-consent cookie for you, which is only a technical step: it does not verify anyone's age. You are responsible for making sure you and the people who use the data meet the age requirement and applicable law.
2. **Poster IP addresses are opt-in.** PTT shows a poster's IP on posts and on some boards' pushes. By default this Actor outputs `ip: null` everywhere and removes any IP embedded in push timestamps. Set `includeAuthorIp` to `true` to get them. IP addresses are personal data under Taiwan's Personal Data Protection Act, so collection and use after you opt in is your responsibility.
3. **Paging.** Board mode walks from the newest page to older ones and stops at `maxItems`, after 5 consecutive pages with nothing new, or, when `dateFrom` is set, once a whole page of non-pinned posts is older than `dateFrom`.
4. **Board names are case-sensitive.** Use the real name (`Stock`, not `stock`).
5. **Deleted posts** are skipped in board listings.
6. **`push_count` special values.** `爆` is output as `100`, `XX` as `-100`. For the exact count use `post` mode.
7. **Speed.** At most 5 concurrent requests. PTT serves static pages, so runs are fast and rarely need a proxy.
8. **Input checks.** `postUrls` accepts only `www.ptt.cc` (or `ptt.cc`) post URLs, and board names may contain only letters, digits, `_` and `-`. Anything else is rejected with an explanation.
9. **Changelog (2026-11-28).** Poster IPs are opt-in and off by default.

***

### FAQ

**Does PTT have an official API?**
No. PTT is a BBS whose web mirror at ptt.cc is public. This Actor reads those public pages and returns structured rows.

**Is the data in English?**
No. Titles, post bodies and comments are in Traditional Chinese, as written by PTT users. Only field names and documentation are English. A common setup is to scrape here and translate or classify the text with an LLM in a later step.

**Can I scrape Gossiping, the most famous PTT board?**
Yes. The age-consent cookie is sent automatically, no account needed. Age verification and responsible use are on you (see Notes 1).

**Does the data include poster IP addresses?**
Not by default: `ip` is `null`. Set `includeAuthorIp` to `true` to output them, and take responsibility for personal-data compliance.

**Why is `push_count` exactly 100 on some posts?**
PTT shows `爆` instead of a number once the net score reaches 100. Use `post` mode for the exact push and boo counts.

**How far back can board mode go?**
As far as `maxItems` (up to 2000) allows, until 5 consecutive pages bring nothing new, or until `dateFrom` is reached.

**Is there a limit on comments per post?**
No. All push lines are returned, one row each (billed as `review-item`).

**Can I scrape private boards?**
No. Private boards need a login, which this Actor does not use.

**What does `dateFrom` filter on?**
On `posted_at`, derived from the timestamp inside the post ID and accurate to the second. `created_at` is the `M/DD` text from the listing, with no year.

***

### 📚 Related tutorials & tools

Hands-on guides and free tools built on this actor, at **[AI Social API](https://aisocialapi.com/?utm_source=apify\&utm_medium=readme\&utm_campaign=ptt-scraper-en)**:

- 📖 Guide: [PTT Crawler and Taiwan Forum Data: Getting Posts and Comments From PTT, Mobile01 and Bahamut](https://aisocialapi.com/learn/topics/taiwan-forums/?utm_source=apify\&utm_medium=readme\&utm_campaign=ptt-scraper-en)
- 📖 Tutorial: [Build a no-code forum sentiment pipeline with Apify + n8n + GPT](https://aisocialapi.com/learn/apify-n8n-forum-sentiment-pipeline/?utm_source=apify\&utm_medium=readme\&utm_campaign=ptt-scraper-en)
- 📊 Data: [Asian forum scrapability × cost table](https://aisocialapi.com/tools/forum-scrapability/?utm_source=apify\&utm_medium=readme\&utm_campaign=ptt-scraper-en) — measured on live runs: which forums need only a plain request, which need a residential IP, and what one item costs
- 🛠 Free tools: [Forum sentiment quick-check](https://aisocialapi.com/tools/forum-sentiment/?utm_source=apify\&utm_medium=readme\&utm_campaign=ptt-scraper-en) · [Apify cost calculator](https://aisocialapi.com/tools/apify-cost/?utm_source=apify\&utm_medium=readme\&utm_campaign=ptt-scraper-en)
- 🤝 Rather not run it yourself? [I run it for you](https://aisocialapi.com/monitor/?utm_source=apify\&utm_medium=readme\&utm_campaign=ptt-scraper-en) — scheduled daily, delivered to your Google Sheet or Slack, from US$299/mo.

Maintained by an operator running 30+ live Apify actors.

***

### Disclaimer

This Actor is intended for personal research, academic analysis and brand monitoring. Follow PTT's terms of service (ptt.cc) and applicable law, including Taiwan's Personal Data Protection Act. Do not scrape at abusive volume or resell the raw data. Age verification for 18+ boards and compliance when you enable IP output are the user's responsibility. If the site operator or a data subject asks for takedown or deletion, email hello@aisocialapi.com and we will comply and stop using the data. The author accepts no liability for damages arising from use of this tool.

***

PTT scraper, Gossiping scraper, PTT API, PTT API alternative, PTT crawler, Taiwan forum scraper, scrape PTT, PTT push comments, Taiwan social listening, Taiwan sentiment analysis, Taiwanese stock forum, Stock board PTT, Traditional Chinese social media data, forum monitoring

# Actor input Schema

## `mode` (type: `string`):

What do you want to scrape? Pick a mode, then fill in the matching fields below.

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

Board names for board mode, e.g. Stock, Tech_Job, Gossiping. Names are case-sensitive and may contain only letters, digits, "\_" and "-". Boards such as Gossiping and sex are age-restricted (18+): this Actor sends the age-consent cookie automatically, but you are responsible for making sure you and the people who use the data meet the age requirement.

## `keywords` (type: `array`):

(Optional) Keep only posts whose title contains any of these keywords. PTT titles are Traditional Chinese, so use Chinese keywords, e.g. 心得, 新聞. Leave empty for no filter.

## `dateFrom` (type: `string`):

Accepts relative times (3d, 12h, 2w) or an absolute date (MM/DD/YY). Judged from the timestamp inside the post ID, accurate to the second. When set, paging stops as soon as a whole page is older than this time, which saves cost on scheduled monitoring.

## `dateTo` (type: `string`):

Accepts relative times (3d, 12h, 2w) or an absolute date (MM/DD/YY). Judged from the timestamp inside the post ID, accurate to the second.

## `postUrls` (type: `array`):

Full post URLs for single-post mode, e.g. https://www.ptt.cc/bbs/Stock/M.1783087025.A.C75.html. Only www.ptt.cc post URLs are accepted. Posts on 18+ boards carry the same age-restriction responsibility as the boards.

## `bulkInput` (type: `string`):

**One per line**, press Enter for a new line. Paste board names for board mode or post URLs for post mode; they are merged into the matching field above at run time.

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

Board mode: maximum number of posts per board. More items cost more. Upper limit 2000.

## `includeAuthorIp` (type: `boolean`):

Off by default. When on, the Actor outputs the post's poster IP and each commenter's IP (PTT shows them on some boards). When off, the ip fields are null (kept in the output) and any IP embedded in push timestamps is removed. IP addresses are personal data (Taiwan's Personal Data Protection Act): if you turn this on, you are responsible for lawful collection and use.

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

PTT is friendly to direct connections, so a proxy is usually not needed. Turn it on only if you get blocked.

## Actor input object example

```json
{
  "mode": "board",
  "boards": [
    "Stock"
  ],
  "keywords": [],
  "postUrls": [],
  "bulkInput": "",
  "maxItems": 50,
  "includeAuthorIp": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

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

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

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

```

## MCP server setup

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

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/0XCTpEiSbynaVXiC2/builds/XdJ1pDYeZ42IZOEzk/openapi.json
