{
  "openapi": "3.0.1",
  "info": {
    "title": "🛍️ AliExpress 商品爬蟲 — 搜尋與商品資料",
    "description": "從 AliExpress 搜尋結果擷取商品資料：標題、售價與原價、圖片、促銷標籤，以及有提供時的評分、售出數、AliExpress Choice 標籤、出貨地、預估送達時間與上架日期。支援多關鍵字批次搜尋，可依熱門或價格排序並設定價格範圍，無需登入。適合跨境選品、Dropshipping 研究與價格追蹤。",
    "version": "0.0",
    "x-build-id": "h5R1qDJb6rdN2XIbl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/futurizerush~aliexpress-products-scraper-zh-tw/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-futurizerush-aliexpress-products-scraper-zh-tw",
        "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/futurizerush~aliexpress-products-scraper-zh-tw/runs": {
      "post": {
        "operationId": "runs-sync-futurizerush-aliexpress-products-scraper-zh-tw",
        "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/futurizerush~aliexpress-products-scraper-zh-tw/run-sync": {
      "post": {
        "operationId": "run-sync-futurizerush-aliexpress-products-scraper-zh-tw",
        "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": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "🔍 搜尋關鍵字",
            "minItems": 1,
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "輸入最多 50 個 AliExpress 商品搜尋關鍵字，中文或英文都可以，例如 手機殼、手錶、耳機。",
            "items": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProducts": {
            "title": "📦 每個關鍵字最多商品數",
            "minimum": 10,
            "maximum": 3000,
            "type": "integer",
            "description": "每個關鍵字要擷取多少筆商品（10–3,000）。會視需要讀取多頁搜尋結果，AliExpress 沒有更多結果時會提早結束。",
            "default": 60
          },
          "sortBy": {
            "title": "↕️ 排序方式",
            "enum": [
              "best_match",
              "popular",
              "price_low_to_high",
              "price_high_to_low"
            ],
            "type": "string",
            "description": "選項與 AliExpress 的排序選單相同。順序由 AliExpress 決定，可能在每一頁重新開始（每頁最多 60 筆）。如需整份資料依同一順序排列，請在下載資料後依價格或售出數排序。",
            "default": "best_match"
          },
          "minPrice": {
            "title": "💲 最低價格（美元）",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "使用 AliExpress 自己的價格篩選：最低價格（美元），以搜尋結果顯示的價格為準。留空代表不設下限。"
          },
          "maxPrice": {
            "title": "💲 最高價格（美元）",
            "minimum": 0.01,
            "maximum": 1000000,
            "type": "number",
            "description": "使用 AliExpress 自己的價格篩選：最高價格（美元）。留空代表不設上限。"
          },
          "starRatingMin": {
            "title": "⭐ 最低評分",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "只保留評分達到這個分數的商品（0–5），例如 4.5。沒有評分的商品也會被移除。留空代表全部保留。"
          },
          "freeShippingOnly": {
            "title": "🚚 只保留免運標籤商品",
            "type": "boolean",
            "description": "只保留在搜尋結果中顯示免運標籤的商品。",
            "default": false
          },
          "shipsFromUsOnly": {
            "title": "🇺🇸 只保留從美國出貨的商品",
            "type": "boolean",
            "description": "只保留 AliExpress 商品資料標示從美國出貨的商品。會使用 AliExpress 自己的出貨地篩選來找這些商品；商品資料沒有標示出貨地的商品也會被移除。",
            "default": false
          },
          "choiceOnly": {
            "title": "✅ 只保留 AliExpress Choice",
            "type": "boolean",
            "description": "只保留帶有 AliExpress Choice 標籤的商品。",
            "default": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}