{
  "openapi": "3.0.1",
  "info": {
    "title": "Taobao Tmall Product Scraper",
    "description": "Scrape Taobao and Tmall into clean structured datasets — product details, keyword search, shop catalogs, customer reviews and buyer Q&A. Five operations in one actor, one clean dataset per run. No account, no API key, no setup.",
    "version": "1.4",
    "x-build-id": "Efgp9MivVzGInHpaI"
  },
  "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",
        "properties": {
          "operation": {
            "title": "🎯 Operation — what do you want to scrape?",
            "enum": [
              "productDetail",
              "productDetailAlt",
              "keywordSearch",
              "shopCatalog",
              "productReviews",
              "productQuestions"
            ],
            "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, coupons). Premium versions add final / coupon-adjusted SKU pricing.\n- **🔄 Product Detail — Alternate Source** — the same kind of product lookup, served from a **different source**. Use it when `Product Detail` cannot return an item: coverage differs, so a product one source cannot serve often resolves on the other. Returns a compact flat row — price, CNY price, stock, per-SKU variants, images, description, brand and tags. ⚠️ **It returns a different field set from Product Detail** (only `itemId` and `title` are shared) — filter on `_operation`. Billed at the **same** per-result rate as Product Detail.\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- **❓ Product Q&A** — paginate buyer questions and their answers for a product\n\n💡 **TIP:** To combine operations, run the actor multiple times with different configurations.",
            "default": "keywordSearch"
          },
          "itemId": {
            "title": "🛍️ Item ID (Product Detail / Reviews / Q&A)",
            "type": "string",
            "description": "🛍️ **Required for `Product Detail`, `Product Detail — Alternate Source`, `Product Reviews`, and `Product Q&A` 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.",
            "default": "744983869996"
          },
          "detailVersion": {
            "title": "🛍️ Detail Version (data depth vs. speed — read this)",
            "enum": [
              "v3",
              "v1",
              "v9",
              "v4",
              "v5"
            ],
            "type": "string",
            "description": "🛍️ **Applies to `Product Detail` only.** Controls which detail profile is used. They differ in field set, depth and speed — pick deliberately:\n\n- **⭐ Recommended (default)** — the fastest and most consistently available profile, and the best choice for bulk jobs. Flat, easy-to-map fields: title, price and original price, stock, units sold, full image gallery, SKU table, shop and brand, plus extras the other profiles do not carry (`detail_url`, `delist_time`, `video`, `location`).\n- **🔋 Standard** — the richest payload: full SKU matrix, tiered pricing, item description HTML, coupons, shipping and return policy. Noticeably slower, and less consistently available than Recommended. Pick it when you specifically need the deep pricing/policy blocks.\n- **🆕 Full** — an alternative field set for the same product. Useful mainly as a cross-check, or when a specific item resolves here and nowhere else.\n- **💎 Premium — final / coupon pricing** — focused on the **final, coupon-adjusted price** of the item and every SKU variant (`finalPriceYuan`, `finalSkuPrice`, original-vs-final per SKU, stock). Best when accurate checkout pricing is the priority.\n- **⚡ Lite — RETIRED.** No longer available. Kept in this list **only so existing saved tasks keep running** — a run that asks for it is served by **Recommended** instead. Do not pick it for new work.\n\n🔄 **Automatic fallback:** the profiles cover slightly different products, so if the one you pick cannot return an item the actor automatically tries the others and returns whichever answers. **The profile that answers decides the raw field names** — they differ a lot. Build your pipeline on the curated fields — `itemId`, `title`, `pictUrls`, `totalStock`, `soldCount`, `originalPrice`, `discountPrice`, `recordTime` — which are **identical across every profile**. The 💎 Premium profile is never substituted in or out: ask for it and you get it, or you get an error row.\n\n💡 **Freshness:** every profile except the retired Lite one returns live, non-cached data stamped with `recordTime` — check that field on each row to verify capture time.",
            "default": "v3"
          },
          "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.",
            "default": "iphone 15"
          },
          "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.",
            "default": "713464357"
          },
          "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",
              "v3"
            ],
            "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- **Latest** — requires `shopId` + `userId`; pulls from the newest catalog endpoint. **~10 items/page** (smaller pages than Extended), returns `totalResults` for full pagination.\n\n💡 **TIP:** Use **Extended** for the most items per call (60/page = fewer API calls). Use **Latest** when you specifically want the newest-endpoint listing; note it returns fewer items per page.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}