{
  "openapi": "3.0.1",
  "info": {
    "title": "Taobao & Tmall Scraper — Products, Prices, Shops & Ratings",
    "description": "Scrape Taobao and Tmall products by keyword, category, shop or item URL: CNY prices, discounts, shop names, seller ratings, ship-from location and review summary. No login.",
    "version": "0.1",
    "x-build-id": "3AHAunulrbGBcL0Bd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tortuga~taobao-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tortuga-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/tortuga~taobao-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tortuga-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/tortuga~taobao-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tortuga-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search on Taobao and Tmall, one per line. Chinese keywords give the best results (e.g. 手机壳, 蓝牙耳机). English keywords are not translated: they match listings whose titles contain the English words. Taobao shows visitors the first 20 best sellers of a search; turn on Deep scan to collect more.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Taobao / Tmall URLs: item pages (item.taobao.com/item.htm?id=..., detail.tmall.com/item.htm?id=..., world.taobao.com/item/<id>.htm), shop pages (shop<id>.taobao.com, world.taobao.com/dianpu/<id>.htm), category pages (world.taobao.com/category/<id>.htm, 20 best sellers) and search pages (s.taobao.com/search?q=..., world.taobao.com/product/<keyword>.htm). Item URLs always include the item page details.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "itemIds": {
            "title": "Item IDs",
            "type": "array",
            "description": "Taobao / Tmall item IDs (the id=... number of an item URL), one per line. Each is scraped with item page details: a watchlist for price monitoring.",
            "items": {
              "type": "string"
            }
          },
          "shopIds": {
            "title": "Shop IDs",
            "type": "array",
            "description": "Taobao / Tmall shop IDs (every result has shopId; the number in shop<id>.taobao.com), one per line. Returns the shop's listed products (60 per sort order) with the shop's ratings.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "sales",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Order of keyword search results. 'sales' = best sellers first (Taobao's default). Price orders use Taobao's price sort for the first page (if Taobao has no sorted page for a keyword, best sellers in your price range are returned instead) and read the deep-scan price bands cheapest or dearest first. Price orders also apply to shops; category pages are always best sellers.",
            "default": "sales"
          },
          "minPrice": {
            "title": "Min price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Only items priced at or above this many yuan. Sent to Taobao's search and checked again on every result (results outside the range are dropped, not charged)."
          },
          "maxPrice": {
            "title": "Max price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Only items priced at or below this many yuan. Sent to Taobao's search and checked again on every result."
          },
          "deepScan": {
            "title": "Deep scan (more results per search)",
            "type": "boolean",
            "description": "Taobao shows visitors one page per listing (20 results for a keyword, 60 for a shop). Deep scan also reads the keyword's best sellers in 9 price bands (up to ~200 unique items) and a shop in two more sort orders (up to 180). Turn off to read just the first page.",
            "default": true
          },
          "includeDetails": {
            "title": "Include item details",
            "type": "boolean",
            "description": "Open each item page for Tmall/Taobao platform, price before discount, ship-from location, category path, seller profile (shop age, credit level, item count, service scores vs. industry), rating split, review count and highlights, and the latest review. Charged as an extra 'detail' event per item.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many items in total. With several searches and deep scan, each search gets an equal share. You pay per item saved, so this caps the cost.",
            "default": 100
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed items",
            "type": "boolean",
            "description": "Remember what earlier runs of this search returned and output only new items or items whose price/status changed. Use with a Schedule; unchanged items are not charged.",
            "default": false
          },
          "monitoringKey": {
            "title": "Monitoring key",
            "type": "string",
            "description": "Name for this watch, so several schedules on the same search stay separate; defaults to a key derived from the search input"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Taobao shows its public catalogue only to visitors outside mainland China (Chinese IPs get a login page), so the default is Apify RESIDENTIAL proxy in the US; country CN is replaced automatically. Datacenter proxy is cheaper but gets captchas on sorted, price-filtered and deep-scan searches. Residential traffic is billed to your Apify account: about 20 KB per 20-item page and 10-60 KB per item page.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}