{
  "openapi": "3.0.1",
  "info": {
    "title": "Taobao Tmall Product Scraper",
    "description": "Extract Taobao & Tmall product data with clean structured output. Four scrapers in one — product details, keyword search, shop catalogs, customer reviews. Perfect for dropshippers, sourcing agents & e-commerce researchers.",
    "version": "1.0",
    "x-build-id": "jNmzswKN8bRffstTl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~taobao-tmall-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-taobao-tmall-product-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/sian.agency~taobao-tmall-product-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-taobao-tmall-product-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/sian.agency~taobao-tmall-product-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-taobao-tmall-product-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": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "🎯 Operation — what do you want to scrape?",
            "enum": [
              "productDetail",
              "keywordSearch",
              "shopCatalog",
              "productReviews"
            ],
            "type": "string",
            "description": "🎯 **PICK ONE OPERATION PER RUN.** Each run produces one clean dataset matching the chosen mode.\n\n- **🛍️ Product Detail** — deep scrape of a single product by item ID (title, images, SKUs, pricing, seller, description, Q&A, coupons)\n- **🔍 Keyword Search** — search Taobao / Tmall by keyword, paginate through results\n- **🏪 Shop Catalog** — pull the full product catalog for a seller (by numeric user / seller ID)\n- **💬 Product Reviews** — paginate customer reviews for a product, including photos and variant info\n\n💡 **TIP:** To combine operations, run the actor multiple times with different configurations.",
            "default": "keywordSearch"
          },
          "itemId": {
            "title": "🛍️ Item ID (Product Detail / Reviews)",
            "type": "string",
            "description": "🛍️ **Required for `Product Detail` and `Product Reviews` operations.**\n\nThe numeric Taobao/Tmall item ID. You can find it:\n- In any Taobao product URL after `id=` (e.g. `https://item.taobao.com/item.htm?id=744983869996` → `744983869996`)\n- In the `itemId` field of any search or shop-catalog result row\n\n💡 **TIP:** For bulk product lookups, run the actor once per item ID, or use `Keyword Search` / `Shop Catalog` to build the list first.\n\n⚠️ **Ignored** for Keyword Search and Shop Catalog operations."
          },
          "detailVersion": {
            "title": "🛍️ Detail Depth",
            "enum": [
              "v1",
              "v5",
              "v9"
            ],
            "type": "string",
            "description": "🛍️ **Applies to `Product Detail` only.**\n\n- **Standard** — full payload: SKUs, pricing tiers, Q&A, item description HTML, coupons, shipping, return policy\n- **Lite** — normalized compact response: item + delivery + seller (faster)\n- **Full** — flat response with coupon-adjusted pricing, attributes, specs, SKU images, seller type, and promotion info\n\nDefault is Standard for most users. Switch to Full for coupon pricing and complete attribute/spec data.",
            "default": "v1"
          },
          "orderType": {
            "title": "💬 Review sort order (for Product Reviews)",
            "enum": [
              "feedbackdate",
              "general"
            ],
            "type": "string",
            "description": "💬 **Applies to `Product Reviews` operation only.**\n\n- `feedbackdate` (default) — sort by review date\n- `general` — sort by general relevance",
            "default": "feedbackdate"
          },
          "keyword": {
            "title": "🔍 Search Keyword",
            "type": "string",
            "description": "🔍 **Required for `Keyword Search` operation.**\n\nAny Taobao / Tmall search query. Supports Chinese, English, and mixed queries:\n- `iphone 15`\n- `无线耳机` (wireless earphones)\n- `sony camera a7`\n- `running shoes men`\n\n💡 **TIP:** More specific queries return higher-quality results. Use `Tmall only` + price range to filter to brand merchants."
          },
          "startPrice": {
            "title": "💰 Min Price (CNY) — optional",
            "minimum": 0,
            "type": "integer",
            "description": "💰 Minimum price in Chinese Yuan (integer). Leave blank for no minimum. Applies to `Keyword Search` only."
          },
          "endPrice": {
            "title": "💰 Max Price (CNY) — optional",
            "minimum": 0,
            "type": "integer",
            "description": "💰 Maximum price in Chinese Yuan (integer). Leave blank for no maximum. Applies to `Keyword Search` only."
          },
          "tmallOnly": {
            "title": "🏬 Tmall only (filter out Taobao C2C sellers)",
            "type": "boolean",
            "description": "🏬 When enabled, search results are restricted to Tmall (brand / official stores). Default: false (searches both Taobao and Tmall).",
            "default": false
          },
          "userId": {
            "title": "🏪 Seller User ID",
            "type": "string",
            "description": "🏪 **Required for `Shop Catalog` operation.**\n\nThe numeric `userId` (aka seller ID) of the Taobao / Tmall shop. You can find it:\n- In the `userId` field of any search or detail result row\n- In a seller's shop URL query string\n\n💡 **TIP:** For a brand's full catalog, first run a Keyword Search for the brand name, note the top `userId`, then run Shop Catalog with that ID."
          },
          "shopId": {
            "title": "🏪 Shop ID (required for extended/latest catalog)",
            "type": "string",
            "description": "🏪 **Required when `Catalog mode` is extended or latest.** Ignored for standard.\n\nThe numeric shop ID (distinct from the seller user ID). You can find it in the `shopId` field of any detail or search result row.\n\n💡 **TIP:** Run a Product Detail or Keyword Search first to discover the shopId for a given seller."
          },
          "catalogVersion": {
            "title": "📦 Catalog Mode",
            "enum": [
              "v1",
              "v2"
            ],
            "type": "string",
            "description": "📦 **Applies to `Shop Catalog` only.**\n\n- **Standard** — classic mode, requires only `userId`, 2 sort options, ~30 items/page\n- **Extended** — requires `shopId` + `userId`, 5 sort options (price, hot, new arrivals), **60 items/page**\n\n💡 **TIP:** Use extended for larger catalogs (60 items/page = fewer API calls) or when you need price/new-arrival sorting.",
            "default": "v1"
          },
          "sort": {
            "title": "📊 Sort order",
            "enum": [
              "_sale",
              "_bid",
              "bid",
              "_coefp",
              "_default",
              "coefp",
              "hotsell",
              "oldstarts"
            ],
            "type": "string",
            "description": "📊 Sort order for search or shop catalog results.\n\n**Keyword Search** options:\n- `_sale` (Sales, default)\n- `_bid` (Price high→low)\n- `bid` (Price low→high)\n- `_coefp` (General)\n\n**Shop Catalog (standard)** options: `_sale` (default), `_default`\n\n**Shop Catalog (extended/latest)** options: `coefp` (Comprehensive, default), `hotsell`, `oldstarts` (New arrivals), `bid` (Price low→high), `_bid` (Price high→low)",
            "default": "_sale"
          },
          "maxPages": {
            "title": "📄 Max pages to fetch",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "📄 **Applies to paginated operations** (Keyword Search, Shop Catalog, Product Reviews). Ignored for Product Detail.\n\n- **Keyword Search:** 10 items per page\n- **Shop Catalog (standard):** ~30 items per page · **extended:** 60 items per page\n- **Product Reviews:** 20 reviews per page\n\n💡 **TIP:** Start small (1–3 pages) to preview results before scaling up.\n\n⚠️ Hard cap: 50 pages to prevent runaway runs.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}