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.
Run this endpoint
Endpoint
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.
string
Required
Search text, 1 to 120 characters, for example iphone.
coffee shops
integer
Optional
One-based page number, 20 results per page (default 1).
1
string
Optional
Shop segment: all, 24h, 24b, vdr or tour.
example
string
Optional
One of sale/dc, rnk/dc, prc/dc, prc/ac or new/dc.
relevance
number
Optional
Lowest price in TWD.
10
number
Optional
Highest price in TWD.
10
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
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"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.
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"
}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.