# Pantip Scraper – Thailand's Biggest Forum (No API) (`claude_code_reviewer/pantip-scraper-en`) Actor

Scrape Pantip, Thailand's biggest web forum, without an API or login: site-wide keyword search for topics, plus full topic content and all comments (incl. nested replies) with author, tags, score and time. Export JSON/CSV/Excel. Ideal for Thai social listening, brand monitoring and market research.

- **URL**: https://apify.com/claude\_code\_reviewer/pantip-scraper-en.md
- **Developed by:** [Chad](https://apify.com/claude_code_reviewer) (community)
- **Categories:** AI, News, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 topics

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?

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

## Pantip Scraper – Thailand's Biggest Forum, Threads, Comments & Social Listening

Scrape public content from **Pantip (pantip.com)** — one of Thailand's biggest and highest-traffic discussion forums: **site-wide keyword search** for topics, and **full topic content with all comments (including nested replies)**. Runs on public endpoints — no login, no token, no browser (pure HTTP). Bulk-paste keywords, topic IDs or URLs; get structured snake\_case output, `null` for missing values, and an ISO 8601 `scraped_at` on every row.

Great for: **social listening / brand monitoring** in the Thai market, consumer voice and competitor share-of-voice, product-launch reactions, and market research.

### Output fields

| Field | Type | Description |
|---|---|---|
| `topic_id` | string | Topic ID (the `topic/{id}` in the URL) |
| `site` | string | Always `"pantip"` |
| `comment_id` | string | null | On comment rows, `{topic_id}-{floor}`; null on topic/search rows |
| `floor` | string | null | Comment floor; nested replies are `{comment_no}-{reply_no}` |
| `is_reply` | boolean | Whether this is a nested reply (meaningful on comment rows) |
| `title` | string | null | Topic title (search/main-post rows) |
| `author` | string | null | Poster / commenter display name |
| `author_id` | string | null | Member ID |
| `content` | string | null | Main post or comment body (HTML converted to plain text); null on search rows |
| `content_images` | array | Image URLs found in the content (stickers / attachments) |
| `tags` | array | Topic tags (main-post rows); empty array on search rows |
| `comment_count` | number | null | Comment count shown on the search card |
| `score` | number | null | Comment vote score (Pantip good\_bad\_vote.point) |
| `created_at` | string | null | Post/comment time (ISO 8601; search cards are day-level precision) |
| `topic_url` | string | null | Topic link |
| `source_mode` | string | `search` or `topic` |
| `source_query` | string | The matched keyword or topic ID |
| `scraped_at` | string | Scrape time (ISO 8601) |

### Modes

| Mode | Input | Output | Billing |
|---|---|---|---|
| `search` (default) | `keywords[]` (site-wide search), `dateFrom`, `maxItems` | Topic list per keyword | `search-listing` $0.002/item |
| `topic` | `topicIds[]`／`topicUrls[]`, `maxItems` (comment cap per topic) | Main post + all comments (incl. nested replies) | `product-detail` $0.008/topic ＋ `review-item` $0.003/comment |

### Input fields

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search` (site-wide search) or `topic` (full topic) |
| `keywords` | array | — | Search keywords (Thai/English/brand names). Required for `search` mode |
| `topicIds` | array | — | Topic IDs (numbers). Used by `topic` mode |
| `topicUrls` | array | — | Full topic URLs; ID extracted automatically |
| `bulkInput` | string | — | One per line; keywords in `search`, IDs/URLs in `topic` |
| `maxItems` | integer | 50 | `search`: topics per keyword; `topic`: comments per topic (main post always returned). Max 500 |
| `dateFrom` | string | — | Applies to `search`; relative `3d`／`12h`／`2w` or absolute `MM/DD/YY` |
| `proxyConfiguration` | object | Apify datacenter | On by default; without a proxy you share an egress IP and risk rate-limiting |

### JSON examples

**1) Search brand share-of-voice**

```json
{ "mode": "search", "keywords": ["iPhone", "Samsung"], "maxItems": 10 }
```

**2) Only topics from the last 30 days**

```json
{ "mode": "search", "keywords": ["โตโยต้า"], "maxItems": 20, "dateFrom": "30d" }
```

**3) Fetch a full topic (main post + all comments)**

```json
{ "mode": "topic", "topicIds": ["44209153"], "maxItems": 200 }
```

**4) Fetch multiple topics by URL**

```json
{ "mode": "topic", "bulkInput": "https://pantip.com/topic/44209153\nhttps://pantip.com/topic/44008597" }
```

**5) One row per comment (incl. nested replies)**

```json
{ "mode": "topic", "topicIds": ["44209153"], "maxItems": 500 }
```

### Notes

- **`search` is a site-wide Pantip keyword search** (not in-room filtering), but v1 returns the **first page** per keyword (~10 most relevant); multi-page search uses Pantip's authenticated API and is scoped to v1.1. Schedule periodic runs and use `dateFrom` to keep new topics for continuous monitoring.
- **Comment pagination in `topic` mode**: Pantip shows 100 comments per page; the Actor auto-paginates up to `maxItems`. A single hot topic can have thousands of comments — use `maxItems` to control cost.
- Sticker/image-only comments have `content` = null; the image URLs are in `content_images`.
- Times: main post and comments are exact timestamps; search cards are day-level precision (Thai Buddhist-era dates, converted to Gregorian).
- Defaults to Apify datacenter proxy; for local testing set `proxyConfiguration.useApifyProxy = false`.

### FAQ

- **Do I need a login or API key?** No — only public content is scraped.
- **Can it get comments?** Yes — `topic` mode returns the main post and all comments (including nested replies), one row each.
- **Can I monitor only certain keywords?** Yes — use `search` mode with keywords, plus `dateFrom` for the most economical scheduled monitoring.
- **Output format?** Export via the Apify Dataset as JSON／CSV／Excel／HTML／API.

### Disclaimer

This Actor only scrapes publicly visible content on Pantip, for research and sentiment-analysis purposes. Please comply with Pantip's terms of service and local regulations, and do not use it to violate personal data or for commercial abuse. Keep your scraping frequency reasonable to avoid burdening the source site.

***

*Keywords: Pantip scraper, scrape Pantip, Thai forum, Thailand social listening, brand monitoring Thailand, share of voice, sentiment analysis, market research, pantip.com, threads, comments, forum data.*

# Actor input Schema

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

What do you want to scrape? Pick one mode and fill only the matching fields below.

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

Keywords to search (Thai, English or brand names). Each keyword runs one site-wide Pantip search. Used by search mode. Note: v1 returns the first page of results per keyword (~10 most relevant); multi-page search is v1.1.

## `topicIds` (type: `array`):

Pantip topic IDs (the number in the topic/{id} URL), e.g. 44209153. Used by full-topic mode.

## `topicUrls` (type: `array`):

Full Pantip topic URLs, e.g. https://pantip.com/topic/44209153. The topic ID is extracted automatically.

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

**One item per line**, press Enter for a new line, no quotes or commas. In search mode these are treated as keywords; in full-topic mode as topic IDs or URLs; merged into the matching field above at run time. Fastest way: copy a whole column from Google Sheets / Excel and paste it here.

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

Search mode: max topics per keyword. Full-topic mode: max comments per topic (the main post is always returned and not counted against this limit). Max 500.

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

Applies to search mode, matched against the topic post date (Pantip search cards have day-level precision). Format: relative time 3d (within 3 days), 12h, 2w, or absolute date MM/DD/YY. Leave empty for no filter. Handy for scheduled monitoring to keep only new topics.

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

Defaults to Apify datacenter proxy: without a proxy you share an egress IP with other runs on the platform and are easily rate-limited by forum sites (429, missing pages). Responses are small, so proxy traffic cost is negligible. Turn off only with your own proxy or for local testing.

## Actor input object example

```json
{
  "mode": "search",
  "keywords": [
    "iPhone"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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": "search",
    "keywords": [
        "iPhone"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("claude_code_reviewer/pantip-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": "search",
    "keywords": ["iPhone"],
}

# Run the Actor and wait for it to finish
run = client.actor("claude_code_reviewer/pantip-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": "search",
  "keywords": [
    "iPhone"
  ]
}' |
apify call claude_code_reviewer/pantip-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/pantip-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/Sj4npxRLZMHBrGEUq/builds/UeqqGWbSg0zBPDfbb/openapi.json
