{
  "openapi": "3.0.1",
  "info": {
    "title": "Taobao & Tmall Scraper",
    "description": "Scrape Taobao and Tmall (淘宝 天猫) products by keyword, category, product URL or shop: price in your currency plus CNY, seller DSR scores, ratings, reviews, images, category path and seller leads.",
    "version": "1.0",
    "x-build-id": "7dTtFo8eEM8V1dlaq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parsebird~taobao-tmall-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parsebird-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/parsebird~taobao-tmall-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parsebird-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/parsebird~taobao-tmall-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parsebird-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": {
          "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 by shop id (returns one seller record per shop, not individual products).",
            "default": "search"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Enter search terms, one per line. Chinese terms return the most results (Taobao is a Chinese-language catalogue), but English terms work too. Used in Search mode.",
            "items": {
              "type": "string"
            }
          },
          "categoryIds": {
            "title": "Category IDs or URLs",
            "type": "array",
            "description": "Enter Taobao category ids (e.g. 50064014) or category URLs like https://world.taobao.com/category/50064014.htm. Used in Category mode.",
            "items": {
              "type": "string"
            }
          },
          "itemUrls": {
            "title": "Product IDs or URLs",
            "type": "array",
            "description": "Enter product ids (e.g. 730344766230) or any product URL: item.taobao.com, detail.tmall.com and world.taobao.com links all work. Category, shop and search links pasted here are routed to the right mode automatically.",
            "items": {
              "type": "string"
            }
          },
          "shopIds": {
            "title": "Shop IDs",
            "type": "array",
            "description": "Enter Taobao shop ids (e.g. 63978904), or shop URLs like https://world.taobao.com/dianpu/63978904.htm or https://shop63978904.taobao.com. 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",
              "mo",
              "au",
              "nz",
              "kr",
              "jp",
              "ca"
            ],
            "type": "string",
            "description": "Choose the Taobao overseas storefront. Search results come from that storefront's own listing selection, and prices are quoted in its currency at Taobao's own exchange rate. The yuan price is always returned in priceCny.",
            "default": "sg"
          },
          "maxItems": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many records (products or shops). Keep it modest for a first run: every record is billed.",
            "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 buyer-rating breakdown (Taobao listings), a customer review, the full category path, payment methods and ship-from 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 public storefront serves one page of 20 results per query. Deep scan re-queries each keyword or category across sort orders and price bands to collect several hundred unique products. Turn off to fetch only the first page.",
            "default": true
          },
          "expandKeywords": {
            "title": "Follow related keywords",
            "type": "boolean",
            "description": "Also scrape up to 10 related search terms that Taobao suggests for each keyword. Widens coverage; results drift further from your original keyword.",
            "default": false
          },
          "minPrice": {
            "title": "Min price (CNY)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products at or above this yuan price."
          },
          "maxPrice": {
            "title": "Max price (CNY)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products at or below this yuan price."
          },
          "freeShippingOnly": {
            "title": "Free shipping only",
            "type": "boolean",
            "description": "Apply Taobao's free-shipping filter to keyword searches. Taobao does not offer this filter on category pages.",
            "default": false
          },
          "urlsFromFile": {
            "title": "Import URLs from a file",
            "type": "string",
            "description": "Paste a list of Taobao / Tmall URLs or ids (one per line), or one link to a .txt / .csv file, Google Sheet or Google Drive file that contains them. Google Sheet and Drive share links are handled automatically."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is used by default. Pages refused on every attempt are automatically retried through an Apify residential exit. Choose RESIDENTIAL here to send every request that way from the start.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}