Skip to content
Scrappa Get API key
PChome 24h API 1 credit / request

PChome Search API Documentation

GET https://scrappa.co/api/pchome/search

PChome Search API searches products on PChome 24h in Taiwan. Each item has the price, original price and discount as TWD numbers, the brand, seller, category id and a full-size image url.

Filter by shop segment, sort, price range and brand. The shop parameter is the upstream shop segment, not a category tree. Brand is applied to the returned page, so pagination counts and has_next describe the unfiltered set; pagination.filtered_out reports how many items were dropped. When a row has no brand, a fixed brand vocabulary is matched against the name and description with a word boundary. ASCII tokens need at least 3 letters and CJK tokens at least 2 characters. Every returned item follows the filters you send. There are 20 results per page and page N returns the real page N.

Search carries no rating, review count or availability. Read the aggregate rating of one product from the reviews route. The product id feeds the product, offers, variants and reviews routes unchanged. Costs 1 credit per successful request. Empty results and failed requests are free.

PChome Search API Documentation 1 credit / request

Endpoint

Request preview
GET
https://scrappa.co/api/pchome/search
Auth header
x-api-key
Cost
1 credit / request
query = coffee shops
Response preview
200 OK
{
    "data": {
        "query": "iphone",
        "results": [
            {
                "url": "https://24h.pchome.com.tw/prod/DYAJKE-A900FVZ88",
                "brand": "Apple",
                "image": "https://d.ecimg.tw/abc.jpg",
                "price": 32900,
                "title": "iPhone",
                "seller": "PChome 24h",
                "currency": "TWD",
                "product_id": "DYAJKE-A900FVZ88",
                "category_id": "A1",
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

6 optional filters available.

query string Required

Search text, 1 to 120 characters, for example iphone.

Example value coffee shops
page integer Optional

One-based page number, 20 results per page (default 1).

Example value 1
shop string Optional

Shop segment: all, 24h, 24b, vdr or tour.

Example value example
sort string Optional

One of sale/dc, rnk/dc, prc/dc, prc/ac or new/dc.

Example value relevance
min_price number Optional

Lowest price in TWD.

Example value 10
max_price number Optional

Highest price in TWD.

Example value 10
brand string Optional

Brand text to match. Matched on the returned page and filled from a fixed brand vocabulary when the row has no brand.

Example value example

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "query": "iphone",
        "results": [
            {
                "url": "https://24h.pchome.com.tw/prod/DYAJKE-A900FVZ88",
                "brand": "Apple",
                "image": "https://d.ecimg.tw/abc.jpg",
                "price": 32900,
                "title": "iPhone",
                "seller": "PChome 24h",
                "currency": "TWD",
                "product_id": "DYAJKE-A900FVZ88",
                "category_id": "A1",
                "original_price": 35900,
                "discount_percent": 8.36
            }
        ],
        "currency": "TWD",
        "pagination": {
            "page": 1,
            "has_next": true,
            "per_page": 20,
            "filtered_out": 0,
            "total_results": 48909
        }
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A required parameter or a value is invalid. This response is not billable.

{
    "errors": {
        "query": [
            "A search text is required."
        ]
    },
    "message": "The request validation failed"
}
503

Upstream Unavailable

The source could not be reached. This response is not billable. Retry shortly.

{
    "meta": {
        "credits": 0,
        "billable": false,
        "retryable": true,
        "endpoint_family": "search"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "The source could not be reached."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.