{
  "openapi": "3.0.1",
  "info": {
    "title": "PChome 24h Scraper - Products, Prices, Stock & Ratings",
    "description": "Scrape PChome 24h (24h.pchome.com.tw) products across Taiwan by keyword, category, store, brand or URL. Extract product names, prices, discounts, stock availability, variants, ratings, categories and images. Ideal for price monitoring, competitor analysis and market research.",
    "version": "0.1",
    "x-build-id": "LK4xGH9S5h4mbrUNV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~pchome-24h-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-pchome-24h-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/abotapi~pchome-24h-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-pchome-24h-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/abotapi~pchome-24h-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-pchome-24h-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What do you want to scrape?",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "Search runs the keywords below. URL mode scrapes the PChome 24h links you paste (search, category, store, brand, department or product pages) and ignores the search fields.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search keywords",
            "type": "array",
            "description": "One keyword per line, Chinese or English (for example iphone, 衛生紙, 哈利波特). Each keyword is walked page by page, 20 products per page, up to the site's 100 page limit, until Max items is reached.",
            "default": [
              "iphone"
            ],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "sale/dc",
              "rnk/dc",
              "prc/ac",
              "prc/dc",
              "new/dc"
            ],
            "type": "string",
            "description": "Order of the results for every keyword.",
            "default": "sale/dc"
          },
          "minPrice": {
            "title": "Minimum price (TWD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products priced at least this many NT dollars. Empty or 0 keeps all. Applied by the site, so pages hold only matching products."
          },
          "maxPrice": {
            "title": "Maximum price (TWD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products priced at most this many NT dollars. Empty or 0 keeps all. Applied by the site, so pages hold only matching products."
          },
          "urls": {
            "title": "PChome 24h links",
            "type": "array",
            "description": "PChome 24h links, one per line. Accepted: a search link (24h.pchome.com.tw/search/<keyword> or search/?q=, with page), a category, store, region (brand), department (sign) or legacy brand (sites) link, which lists that page's products, and a product link (24h.pchome.com.tw/prod/<id>, tracking parameters ignored). The home page and the mobile home page carry no products and are skipped with a warning. Filter fields are ignored in this mode.",
            "default": [
              "https://24h.pchome.com.tw/search/iphone",
              "https://24h.pchome.com.tw/search/?q=iphone",
              "https://24h.pchome.com.tw/category/DYAJ95C",
              "https://24h.pchome.com.tw/prod/DYAJ01-A900J9CU7",
              "https://24h.pchome.com.tw/prod/DYAJ01-A900J9CU7?fq=/S/DYAJ01&utm_source=x",
              "https://24h.pchome.com.tw/store/DYAJ01",
              "https://24h.pchome.com.tw/region/DYAJ",
              "https://24h.pchome.com.tw/sign/mobile",
              "https://24h.pchome.com.tw/sites/sandisk",
              "https://m.pchome.com.tw/"
            ],
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Add product details",
            "type": "boolean",
            "description": "Open each product to add its variants with per variant price and stock, stock quantity and state, category path, seller, warranty statement, package contents, dimensions, weight, shipping and the full image gallery. Off returns the listing fields only. Product links always read the product details to build the row, but the details charge applies only when this is on.",
            "default": true
          },
          "maxReviews": {
            "title": "Max reviews per product",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How many customer reviews to attach to each product, newest and most helpful first as the site orders them (rating, date, text, masked author, variant, seller reply, likes and photos), up to 100 per product. Default 20, 0 skips reviews. Only used when product details are on. Reviews are billed in blocks of 10 inside the product details charge, and only for rows that are returned.",
            "default": 20
          },
          "maxPages": {
            "title": "Max pages per search",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Search result pages to walk per keyword or link. This does not cap the run by default: empty or 0 means no page limit and it defers to Max items, which is the one default cap (20)."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "The single default cap of the run: maximum products to return across the whole run (default 20). Max pages has no finite default and defers to this field. 0 means no limit. In incremental mode, unchanged products count toward this number.",
            "default": 20
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy settings. The default Apify Proxy (datacenter) was measured to work for this site. Residential is recommended for the most reliable results; it is billed by traffic on your account. If the selected connection is refused, the run switches to Apify Residential and then to a backup connection on its own.",
            "default": {
              "useApifyProxy": true
            }
          },
          "resumeFromRunId": {
            "title": "Resume from run ID",
            "type": "string",
            "description": "Run ID (or dataset ID) of a previous run of this Actor. Products already collected there are skipped, so this run returns only the delta. Leave empty for a normal run. For recurring monitoring of the same search, use Incremental mode instead."
          },
          "incrementalMode": {
            "title": "Incremental changes for scheduled runs",
            "type": "boolean",
            "description": "For recurring price and stock monitoring. A product is returned as NEW the first time and as UPDATED when a tracked field changes: price, original price, lowest price, discount, stock quantity and status, sale status, promotion flag, variants and their prices and quantities, title, brand, description, shipping and package fields. Unchanged products are not returned or billed. Never compared: rank, source fields, collection time, image and video links, reviews, review count, rating, related products, hashtags, selling points, keywords, coupon campaigns, category path, seller and flags. State is kept per tracked search or link set, or per State key when you set one.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Optional name for a monitoring campaign. Runs sharing a key share their incremental state. Leave empty to scope it automatically to the search or links."
          },
          "baselineDatasetId": {
            "title": "Start from an existing dataset (incremental mode only)",
            "type": "string",
            "description": "Optional. Pick the dataset of an earlier full run of this Actor so the first incremental run returns only products that changed since then. Pick it unedited. Only used on the first run for a state key and not combined with Resume."
          },
          "emitExpired": {
            "title": "Emit expired products (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Also returns products that were tracked before and are no longer found, marked EXPIRED. Only produced after a complete scan, never when Max items, Max pages, a pasted page beyond 1, a category, store, brand or department link or Resume limited the run. These synthetic rows are returned and billed, so leave it off unless you need expiry tracking.",
            "default": false
          },
          "changeScope": {
            "title": "What counts as a change (incremental mode only)",
            "enum": [
              "all",
              "priceAndStock"
            ],
            "type": "string",
            "description": "All fields (default): any change to the tracked fields returns an UPDATED row. Price and stock only: only price changes (price, original, lowest and regular price, discount, each variant) and stock changes (quantity, stock and sale status, each variant) return an UPDATED row; titles, descriptions and other details never do.",
            "default": "all"
          },
          "compactUpdates": {
            "title": "Compact update rows (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. When on, UPDATED and EXPIRED rows are short: product id, url, title, current price, stock quantity and status, plus priceChanges and variantChanges with the old and new value of each moved field. NEW rows always carry the complete record.",
            "default": false
          },
          "expireAfterMissedScans": {
            "title": "Expire after N missed full scans (incremental mode only)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Only used with Emit expired products. A product is marked EXPIRED only after it was missing from this many complete scans in a row (default 1). Raise it so a product that briefly drops out of the results is not reported as gone.",
            "default": 1
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Extra field names that must not mark a product as UPDATED in incremental mode. Rank, links, counters and the rating are already ignored. Use a dotted name such as variants.name to ignore one key inside every variant while keeping the variant prices compared.",
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize a connector once under Apify Settings, Integrations, then select it here. The connector receives a condensed summary per item; the full record stays in the dataset. Leave empty to skip."
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL (or id) of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on items written to each connector per run. Does not affect the dataset.",
            "default": 50
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}