{
  "openapi": "3.0.1",
  "info": {
    "title": "Taobao & Tmall Scraper - Products, Prices, Sellers & Reviews",
    "description": "Scrape Taobao and Tmall by keyword, category, product ID or shop. Prices in 13 currencies, seller DSR scores and credit level, buyer-rating breakdown, real reviews and full category paths. Shop mode builds seller lead lists. No login, no browser - pay per result.",
    "version": "0.1",
    "x-build-id": "BDt80T0BXTNO22heG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~taobao-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-taobao-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/scrapesage~taobao-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-taobao-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/scrapesage~taobao-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-taobao-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": "What to scrape",
            "enum": [
              "search",
              "category",
              "item",
              "shop"
            ],
            "type": "string",
            "description": "Search = find products by keyword. Category = scrape a Taobao category id. Item = scrape specific product IDs or URLs. Shop = scrape sellers/shops by shop id (returns shop records, not products).",
            "default": "search"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms. Chinese terms return the most results (Taobao is a Chinese-language catalogue), but English terms work too. Used in Search mode.",
            "default": [
              "手机"
            ],
            "items": {
              "type": "string"
            }
          },
          "categoryIds": {
            "title": "Category IDs or URLs",
            "type": "array",
            "description": "Taobao category ids (e.g. 50064014) or full category URLs like https://world.taobao.com/category/50064014.htm. Used in Category mode. Sub-categories found on the page are followed automatically.",
            "items": {
              "type": "string"
            }
          },
          "itemUrls": {
            "title": "Product IDs or URLs",
            "type": "array",
            "description": "Product ids (e.g. 730344766230) or any Taobao/Tmall product URL - item.taobao.com, detail.tmall.com and world.taobao.com links are all accepted. Used in Item mode.",
            "items": {
              "type": "string"
            }
          },
          "shopIds": {
            "title": "Shop IDs",
            "type": "array",
            "description": "Taobao shop ids (e.g. 188555483). Every scraped product carries its shopId, so you can feed those back here to build a seller list. Used in Shop mode.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region / currency",
            "enum": [
              "sg",
              "world",
              "my",
              "th",
              "vn",
              "ph",
              "kh",
              "mo",
              "au",
              "nz",
              "kr",
              "jp",
              "ca"
            ],
            "type": "string",
            "description": "Which Taobao overseas storefront to read. This sets the currency prices are quoted in and the localised listing selection. The yuan price is always returned as well, in priceCny.",
            "default": "sg"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many records. Keep it modest for a first run - every record is billed per result.",
            "default": 50
          },
          "scrapeDetails": {
            "title": "Scrape full product detail",
            "type": "boolean",
            "description": "Open each product page to add the seller profile (DSR scores, credit level, shop age, catalogue size), the rating breakdown, customer reviews, the full category path and the item location. Turn off for a faster, cheaper listing-only scrape.",
            "default": true
          },
          "deepScan": {
            "title": "Deep scan (more results per query)",
            "type": "boolean",
            "description": "Taobao's crawlable surface serves one page of ~40 results per query. Deep scan re-queries each keyword across sort orders and price bands to reach several hundred unique products instead. Turn off to fetch just the first page.",
            "default": true
          },
          "expandKeywords": {
            "title": "Follow related keywords",
            "type": "boolean",
            "description": "Also scrape the related search terms Taobao links from each results page. Widens coverage a lot; results drift further from your original keyword.",
            "default": false
          },
          "minPrice": {
            "title": "Min price (CNY)",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep products at or above this yuan price."
          },
          "maxPrice": {
            "title": "Max price (CNY)",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep products at or below this yuan price."
          },
          "freeShippingOnly": {
            "title": "Free shipping only",
            "type": "boolean",
            "description": "Restrict search results to items Taobao flags as free shipping.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Taobao rate-limits single IPs hard, so RESIDENTIAL proxy is strongly recommended - it measured 100% success against 33-67% on datacenter. Every retry automatically rotates to a new IP.",
            "default": {
              "useApifyProxy": true
            }
          },
          "urlsFromFile": {
            "title": "Import URLs from a file",
            "type": "string",
            "description": "Paste a list of URLs (one per line), OR one link to a .txt/.csv file, Google Sheet or Google Drive file containing them. Lets you import many Start URLs at once instead of typing each. Google Sheet/Drive share links are handled automatically."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}