{
  "openapi": "3.0.1",
  "info": {
    "title": "Taobao & Tmall Scraper — Products, SKUs, Final Prices, English",
    "description": "Taobao scraper and Tmall scraper (淘宝 天猫) with a fast Taobao API workflow to extract Taobao product data in English and Chinese. Scrape product details, SKU variants, real final prices after coupons and 满减 deals, shop catalogues, search listings, CNY currency conversion, and agent links.",
    "version": "1.3",
    "x-build-id": "0ew7kvG4n2pupiwl2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/refined_granary_cnk~taobao-tmall-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-refined_granary_cnk-taobao-tmall-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/refined_granary_cnk~taobao-tmall-scraper/runs": {
      "post": {
        "operationId": "runs-sync-refined_granary_cnk-taobao-tmall-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/refined_granary_cnk~taobao-tmall-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-refined_granary_cnk-taobao-tmall-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Product, short share link (e.tb.cn / m.tb.cn), shop, search, or category URLs on Taobao/Tmall. Example: https://detail.tmall.com/item.htm?id=1079352038299 or https://m.tb.cn/h.5xyz123",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "itemIds": {
            "title": "Item IDs",
            "type": "array",
            "description": "Numeric Taobao or Tmall product IDs (5 to 20 digits). Example: [\"1079352038299\", \"1019865884154\", \"1069464409891\"]",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "keywords": {
            "title": "Search Keywords",
            "type": "array",
            "description": "Keywords to search on Taobao and Tmall. Example: [\"蓝牙耳机\", \"机械键盘\"]",
            "items": {
              "type": "string"
            },
            "default": [
              "机械键盘"
            ]
          },
          "maxItemsPerQuery": {
            "title": "Max Items Per Query",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum products to scrape per keyword, search URL, category URL, or shop URL. Example: 10",
            "default": 10
          },
          "minPrice": {
            "title": "Min Price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Minimum product price in Chinese Yuan (CNY) for search results. Example: 50"
          },
          "maxPrice": {
            "title": "Max Price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Maximum product price in Chinese Yuan (CNY) for search results. Example: 500"
          },
          "tmallOnly": {
            "title": "Tmall Only",
            "type": "boolean",
            "description": "Keep only Tmall (天猫) products in search results. Example: true",
            "default": false
          },
          "location": {
            "title": "Ship From Location",
            "type": "string",
            "description": "Filter search results by shipping province or city in Chinese. Example: 深圳 or 广州"
          },
          "sort": {
            "title": "Sort Order",
            "enum": [
              "default",
              "sales",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Sort order for search results. Example: sales",
            "default": "default"
          },
          "includeDetails": {
            "title": "Include Full Details & SKUs",
            "type": "boolean",
            "description": "Fetch full product details, SKU variants, attributes, and real final prices after coupons. Example: true",
            "default": false
          },
          "includeShopInfo": {
            "title": "Include Shop & Seller Ratings",
            "type": "boolean",
            "description": "Include shop name, URL, DSR seller scores, credit level, and shop age. Example: true",
            "default": true
          },
          "translateToEnglish": {
            "title": "Translate to English",
            "type": "boolean",
            "description": "Translate Chinese titles, SKU labels, and attributes to English while keeping Chinese originals. Example: true",
            "default": true
          },
          "translationProvider": {
            "title": "Translation Provider",
            "enum": [
              "gtx",
              "deepl",
              "google"
            ],
            "type": "string",
            "description": "Engine used for English translation: free Google (best-effort, may be rate-limited), DeepL API, or Google Cloud. Example: gtx",
            "default": "gtx"
          },
          "translationApiKey": {
            "title": "Translation API Key",
            "type": "string",
            "description": "API key for DeepL or Google Cloud when selected above. Example: your-deepl-key:fx"
          },
          "currency": {
            "title": "Target Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "INR",
              "CAD",
              "AUD",
              "JPY",
              "KRW",
              "SGD",
              "MYR",
              "HKD",
              "CNY"
            ],
            "type": "string",
            "description": "Currency code used to convert CNY prices into priceConverted. Example: USD",
            "default": "USD"
          },
          "agentLinks": {
            "title": "Shopping Agent Links",
            "uniqueItems": true,
            "type": "array",
            "description": "Cross-border shopping agent links to include on each product. Example: [\"superbuy\", \"cnfans\"]",
            "items": {
              "type": "string",
              "enum": [
                "superbuy",
                "cssbuy",
                "sugargoo",
                "cnfans",
                "hoobuy"
              ],
              "enumTitles": [
                "Superbuy",
                "CSSBuy",
                "Sugargoo",
                "CNFans",
                "Hoobuy"
              ]
            },
            "default": [
              "superbuy",
              "cssbuy",
              "sugargoo",
              "cnfans",
              "hoobuy"
            ]
          },
          "monitoringMode": {
            "title": "Monitoring Mode (Delta Only)",
            "type": "boolean",
            "description": "Emit only new or changed items compared to the previous run and include previousValues. Example: false",
            "default": false
          },
          "monitoringKey": {
            "title": "Monitoring State Key",
            "type": "string",
            "description": "Custom name to isolate monitoring history for a specific watchlist. Example: headphones-watchlist"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Use Apify Proxy (RESIDENTIAL) or custom proxyUrls with sticky sessions. Example: {\"useApifyProxy\": true, \"apifyProxyGroups\": [\"RESIDENTIAL\"]}",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "proxyCountry": {
            "title": "Residential Proxy Country",
            "enum": [
              "CN",
              "HK",
              "TW",
              "SG",
              "US",
              "JP"
            ],
            "type": "string",
            "description": "Preferred RESIDENTIAL proxy country (default CN, with automatic fallback across HK, TW, SG, and US if blocked or unavailable). Example: CN",
            "default": "CN"
          },
          "enableSessionWarmup": {
            "title": "Enable Session Warm-Up",
            "type": "boolean",
            "description": "Warm up each sticky proxy session by visiting Taobao pages with browser headers to collect _m_h5_tk, _m_h5_tk_enc, cna, and t cookies before signing MTOP requests, and retire sessions automatically on RGV587 blocks.",
            "default": true
          },
          "enablePlaywrightFallback": {
            "title": "Enable Playwright Browser Fallback",
            "type": "boolean",
            "description": "Fall back to one shared headless Chromium browser (mobile profile) when HTTP/MTOP endpoints are blocked. Turns itself off after 3 failed items in a row.",
            "default": true
          },
          "taobaoCookies": {
            "title": "Taobao Logged-In Cookies (Optional)",
            "type": "string",
            "description": "Optional logged-in Taobao/Tmall cookie string (key=value; ...) or Cookie-Editor JSON array as a last-resort bypass when anti-bot challenges block anonymous requests."
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum parallel requests (keep low between 1 and 5 for human-like pacing with 1-4s random delays). Example: 2",
            "default": 2
          },
          "cookie": {
            "title": "Taobao Cookie (Legacy Alias)",
            "type": "string",
            "description": "Legacy alias for taobaoCookies. Optional browser Cookie header for signed-in sessions. Example: _m_h5_tk=..."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}