# PChome 24h Product & Price Scraper (Taiwan) (`superslowsloth/pchome-products`) Actor

Search PChome 24h (Taiwan) by keyword and get one flat row per product: price and list price in TWD, discount percent, rating, review count, brand, author, category ids, image and product URL. Sort by price, sales or newest. For Taiwan e-commerce price watching and keyword price tracking.

- **URL**: https://apify.com/superslowsloth/pchome-products.md
- **Developed by:** [Superslow Sloth](https://apify.com/superslowsloth) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 product scrapeds

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

## PChome 24h Product & Price Scraper (Taiwan)

Search [PChome 24h](https://24h.pchome.com.tw) (Taiwan's large e-commerce site)
for one or more keywords and get one flat row per product: the selling price and
the list price in **TWD**, the discount percent, rating and review count, brand,
author and publish date for books, category ids, coupon ids, image and the
product URL. Run it on a schedule and diff the dataset to get a **PChome keyword
price watch**: track what an iPhone, a Switch game or a 48-roll pack of toilet
paper costs today against last week.

No account, no API key, no login, no browser. One request returns 100 products.

### Input

| Field | Notes |
|---|---|
| `searchTerms` | One or more search terms, one per line. Required. Chinese and English both work (`iphone 17`, `羅技 滑鼠`). A product found by two terms is returned once, under the first. PChome matches loosely: `iphone` finds 48,528 products, mostly cases and accessories. |
| `maxItems` | Products to read per search term (default 100, up to 10,000). 100 per page. |
| `sort` | `relevance` (default), `best-selling`, `price-asc`, `price-desc`, `newest`. |
| `proxyConfiguration` | Apify **datacenter** proxy by default. **Do not choose the RESIDENTIAL group** (see "How it fetches"). |

#### About the sorts

Only the sorts PChome's own search page offers are exposed, and each was checked
against the live API.

- `price-asc` and `price-desc` are **verified on every page**: the prices must
  run in order, and the actor fails the term (at no charge) rather than return
  rows in an order that was not asked for. PChome silently ignores a sort value
  it does not know and serves the default order, so this check is the only way
  to notice.
- `best-selling` and `newest` are PChome's `sale` and `new` sorts. The response
  carries no sort field, so these cannot be checked from the data; they were
  confirmed by comparing the leading rows with what the PChome site shows for
  the same sort.
- Ordering is PChome's. Under a price sort the same product can appear on two
  neighbouring pages (130 repeats in 4,000 rows measured); the actor returns it
  once.

### Output

Prices are numbers in New Taiwan dollars; `currency` is always `TWD`.

| Field | Notes |
|---|---|
| `query`, `position` | The search term that first found the product, and its place in PChome's result list for that term and sort (1 is the first result). |
| `product_id`, `url` | PChome's product id (`DYAJNV-1900KFKV5`) and the `https://24h.pchome.com.tw/prod/<id>` link. Books are served from `/books/prod/<id>`; PChome redirects there. |
| `name`, `description` | As PChome shows them. `description` is the one-line blurb; the literal `\r\n` text PChome leaves in it is turned into spaces. Null when empty. |
| `price`, `original_price` | The selling price now, and the list price. They are equal when the product is not discounted. |
| `on_sale`, `discount_percent` | `on_sale` is true when `original_price` is above `price`. `discount_percent` is worked out from the two prices (one decimal place) and is **null when the product is not on sale**, never 0. |
| `rating`, `review_count` | Star rating out of 5 and the review count. **Null when the product has no reviews**: PChome sends null, and the actor does not turn that into 0. |
| `brand`, `author`, `publish_date` | `brand` is the brand for goods and the publisher for books. `author` (author and translator, as PChome lists them) and `publish_date` (ISO `YYYY-MM-DD`) are books only. Null otherwise; PChome sends an empty string and the actor reports it as null. |
| `is_book`, `is_adult` | `is_book` is PChome's `isBook` flag. `is_adult` is its `isNC17` flag: an 18+ restricted product. |
| `category_ids`, `coupon_ids` | PChome category ids and the ids of the coupon activities attached to the product. The search response gives ids only, not coupon terms or category names. Empty list when none. |
| `image_url` | The product photo on `img.pchome.com.tw`. |
| `is_pchome`, `business_unit` | PChome's `isPChome` flag and `BU` tag, passed through as sent (true and `ec` on every one of 1,400 products sampled). |

#### Honest nulls

A field PChome did not send is `null`, never `0` or `""`. A product with no
price in the response has a null `price`; it is still returned, because the
product exists.

### Pricing

Pay per event:

- **$0.002** per run (`actor-start`), charged only after your input is
  validated, so a run that fails on bad input costs nothing.
- **$0.0014** per product row written (`product-scraped`), i.e. $1.40 per
  1,000 products. A row that is not written is not charged.

### How it fetches

It calls the JSON API behind PChome's own search page
(`ecshweb.pchome.com.tw/search/v4.3/all/results`), 100 products per request,
paging with `page` and `pageCount`. Measured 2026-10-14: HTTP 200 and JSON from
Apify datacenter exits and from a plain home connection, no key or cookie
needed. PChome rate limits one address at roughly 175 requests in 30 seconds
(HTTP 429); the actor treats that as the address being blocked and rotates. A refusal (403, 429, 5xx),
a 200 that is not the search JSON, or a dropped connection is treated as the
address being blocked, and the actor rotates to a fresh one and retries.

**Use the default datacenter proxy. Do not pick the RESIDENTIAL group.** PChome
completes the TLS handshake on residential exits and then closes the connection
(curl error 56, "connection closed"), so the requests fail. The actor logs a
warning if the RESIDENTIAL group is selected.

Things worth knowing, all measured:

- **Depth ceiling: 10,000 products per term.** PChome reports `TotalPage` capped
  at 100 and answers page 101 with an empty HTTP 400, whatever the match count
  says. At 100 per page that is 10,000 products per search term. The actor stops
  there and **logs a warning when a term had more matches than that**
  (`iphone` has 48,528); make the term more specific (add a brand, model or
  size) to see the rest.
- **Repeated products.** PChome's result pages overlap: a product can appear on
  two pages of one search, and in the relevance order whole pages of products
  already seen turn up mid-walk (pages 50, 69 and 73 of `iphone`). The actor
  returns each product once, keeps walking past an isolated page of repeats,
  and ends a term only after three pages in a row bring nothing new. So a
  term's 10,000 slots hold fewer than 10,000 distinct products. Measured over
  all 100 pages: relevance gave 7,563 distinct products for `iphone`, 5,980 for
  `耳機` and 7,343 for `samsung`; best selling 7,981 for `iphone`; price low to
  high 9,696; newest first 10,000. To read as much of a big term as possible,
  use `newest` or a price sort.
- **Page size.** PChome serves at most 100 per page; asking for more is silently
  answered with 20, so the actor never does.
- **Past the end.** A page number past the last is an HTTP 400, not an empty
  page. The actor never asks for one; if the result set shrinks between two
  requests and a later page 400s, the rows already read are kept.
- **No matches.** A term with no results is a normal empty answer, not an error.
  It is logged and the run continues with the next term.
- **Loose matching.** PChome matches words loosely, so a short term returns
  thousands of products, many of them accessories. An empty term is refused.
- **Not offered.** Category and price-range filters exist on the site but are not
  wired into this actor.

# Actor input Schema

## `searchTerms` (type: `array`):

What you would type into the PChome 24h search box, one term per line (for example iphone 17, 羅技 滑鼠 or 衛生紙 48捲). Chinese and English both work. Each term is searched and read separately. A product that two terms both find is returned once, under the first. PChome matches loosely, so a broad word returns thousands of products; PChome serves at most 10,000 per term (100 pages of 100).

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

Read at most this many products for each search term. PChome serves 100 per page. Up to 10,000 per term are accepted, which is the deepest PChome will page into any one search; a term with more matches than that is logged so you can narrow it.

## `sort` (type: `string`):

The order PChome lists the results in. 'Relevance' is its default. The two price sorts are checked against the prices on every page and a term fails (at no charge) rather than return rows in an order that was not asked for. 'Best selling' and 'Newest' are PChome's own sorts and cannot be checked from the response.

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

Use Apify's automatic datacenter proxy (the default). Do NOT pick the RESIDENTIAL group: PChome closes the connection on residential exits (curl error 56) and every request fails. A refused request is retried from a fresh datacenter address.

## Actor input object example

```json
{
  "searchTerms": [
    "iphone"
  ],
  "maxItems": 100,
  "sort": "relevance",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `items` (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 = {
    "searchTerms": [
        "iphone"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("superslowsloth/pchome-products").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 = {
    "searchTerms": ["iphone"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("superslowsloth/pchome-products").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 '{
  "searchTerms": [
    "iphone"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call superslowsloth/pchome-products --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,superslowsloth/pchome-products"
        }
    }
}
```

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/gQ53QRvhFsdu8PokN/builds/rgaqCeXEP4ObLYmpF/openapi.json
