{
  "openapi": "3.0.1",
  "info": {
    "title": "PChome 爬蟲｜商品、價格、庫存一鍵下載（免 API）",
    "description": "一個 Actor 抓 PChome 24h 商品:關鍵字搜尋列表、商品詳情(價格、庫存、圖片)。走公開 JSON API、不用登入、不用 token。批量貼上關鍵字或商品 ID/網址,輸出 snake_case 結構化資料,缺值補 null,附 ISO 時間戳。分項計費:搜尋每筆 $0.002、商品詳情每筆 $0.008。",
    "version": "1.0",
    "x-build-id": "p7ZdOIWwPaVQUUh1i"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/claude_code_reviewer~pchome-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-claude_code_reviewer-pchome-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/claude_code_reviewer~pchome-scraper/runs": {
      "post": {
        "operationId": "runs-sync-claude_code_reviewer-pchome-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/claude_code_reviewer~pchome-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-claude_code_reviewer-pchome-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",
        "properties": {
          "mode": {
            "title": "🎯 模式",
            "enum": [
              "search",
              "detail"
            ],
            "type": "string",
            "description": "要抓什麼?選一個模式,填下面對應欄位就好。",
            "default": "search"
          },
          "keywords": {
            "title": "🔎 關鍵字",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "搜尋模式的關鍵字。例如:羅技滑鼠、機械鍵盤、氣泡水機。一個概念一個關鍵字最準。",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "🔀 排序",
            "enum": [
              "relevance",
              "sales",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "搜尋結果排序,只有搜尋模式吃這個設定。",
            "default": "relevance"
          },
          "priceMin": {
            "title": "💰 最低價",
            "minimum": 0,
            "type": "integer",
            "description": "只留售價 ≥ 此金額的商品(搜尋模式)。留空表示不限。"
          },
          "priceMax": {
            "title": "💰 最高價",
            "minimum": 0,
            "type": "integer",
            "description": "只留售價 ≤ 此金額的商品(搜尋模式)。留空表示不限。"
          },
          "productIds": {
            "title": "📦 商品 ID",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "PChome 商品 ID,例如 DCANNU-A900ARQAX(在商品網址 /prod/ 後面那段)。詳情模式用這個。",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "📦 商品網址",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "PChome 24h 商品完整網址,例如 https://24h.pchome.com.tw/prod/DCANNU-A900ARQAX。會自動抽出 ID。",
            "items": {
              "type": "string"
            }
          },
          "bulkInput": {
            "title": "📋 批量貼上",
            "type": "string",
            "description": "**一行一個**,按 Enter 換行,不要加引號或逗號。搜尋模式當關鍵字、詳情模式當商品 ID/網址,執行時自動併入上面對應欄位。從 Google Sheet / Excel 複製一整欄貼進來最快。"
          },
          "maxItems": {
            "title": "📊 最多抓幾筆",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "每個關鍵字最多抓幾筆(搜尋模式)。越多費用越高。詳情模式不受此限(依 ID 數量)。",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy (進階,通常不用開)",
            "type": "object",
            "description": "PChome 對 datacenter 請求友善,預設不用 proxy 即可運作。只有大量抓取遇到被擋 (429) 時才建議開啟。",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}