{
  "openapi": "3.0.1",
  "info": {
    "title": "Taobao & Tmall Scraper",
    "description": "[💰 $4.99 / 1K products] Scrape Taobao and Tmall (淘宝 天猫) products by keyword, link or shop: every variant's price and stock, yuan price, seller credit and scores, reviews, English titles. 100 in about a minute. Search fields only $0.99 / 1K. No account, no proxy. Export JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "5SDx9u2UrGbTg2dzw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sleepmodesystems~taobao-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sleepmodesystems-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/sleepmodesystems~taobao-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sleepmodesystems-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/sleepmodesystems~taobao-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sleepmodesystems-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",
            "maxItems": 100,
            "type": "array",
            "description": "Words in Chinese or English, one per line: <code>蓝牙耳机</code>, <code>手机壳</code>, <code>phone case</code>. Or paste a Taobao search or category link (<code>s.taobao.com/search?q=…</code>, <code>www.taobao.com/list/category/50005050.htm</code>). Each gives products in Taobao's order, as deep as the catalogue goes: 蓝牙耳机 has ~35,000 listed and a run reads up to 10,000. Up to 100 terms.",
            "items": {
              "type": "string"
            }
          },
          "products": {
            "title": "Products (ids or links)",
            "maxItems": 10000,
            "type": "array",
            "description": "Product ids or links, one per line, any shape: <code>765833709683</code>, <code>https://item.taobao.com/item.htm?id=765833709683</code>, Tmall and Tmall HK links, mobile links, <code>m.tb.cn</code> share text, and shopping-agent links (CNFans, Mulebuy, Hoobuy, KakoBuy…). One complete row each. Up to 10,000.",
            "items": {
              "type": "string"
            }
          },
          "shops": {
            "title": "Shops",
            "maxItems": 100,
            "type": "array",
            "description": "Shop links or ids, one per line: <code>https://shop111052165.taobao.com</code>, <code>111052165</code>, or a product link (that product's shop). The shop's catalogue, up to <i>Maximum products</i> per shop. Up to 100 shops.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum products",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Products per search term and per shop (up to 10,000). A product you named always gives its row.",
            "default": 500
          },
          "sort": {
            "title": "Order",
            "enum": [
              "relevance",
              "bestSellers",
              "priceLowToHigh",
              "priceHighToLow"
            ],
            "type": "string",
            "description": "Taobao's own orders for search terms: <b>Best sellers first</b> is Taobao's sales ranking. Shops come in the shop's own order.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Lowest price (¥)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products from this price, in yuan: <code>50</code>. On searches and shops."
          },
          "maxPrice": {
            "title": "Highest price (¥)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products up to this price, in yuan: <code>300</code>. On searches and shops."
          },
          "tmallOnly": {
            "title": "Tmall only (天猫)",
            "type": "boolean",
            "description": "Only products from Tmall stores. Needs product details.",
            "default": false
          },
          "inStockOnly": {
            "title": "In stock only",
            "type": "boolean",
            "description": "Leave out products whose every variant is sold out. Needs product details.",
            "default": false
          },
          "details": {
            "title": "Product details",
            "type": "boolean",
            "description": "On (default): the complete row, every variant with its price and stock, attributes, description images, the seller's scores and credit, review count and tags, and Taobao's own yuan price where Taobao shows it. Off: search and shop rows only (id, titles, price, image, position) at the lower price, for daily trackers.",
            "default": true
          },
          "freshData": {
            "title": "Live price and stock check",
            "type": "boolean",
            "description": "Check each product's price and stock with Taobao right before saving it (about 2-3 s more per product), for price and stock trackers.",
            "default": false
          },
          "minItems": {
            "title": "Minimum products",
            "minimum": 0,
            "type": "integer",
            "description": "Fail the run when fewer products come back (for monitoring). 0 = never fail for a small result.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}