{
  "openapi": "3.0.1",
  "info": {
    "title": "Taobao & Tmall Scraper",
    "description": "Scrape Taobao and Tmall products by link, item id, keyword or category: CNY price, images, category, seller, shop scores, review summary. No login. Drop-in compatible with memo23, pizani and zen-studio inputs.",
    "version": "0.2",
    "x-build-id": "kdA68QVJm9vXMxLa1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jakvbs~taobao-tmall/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jakvbs-taobao-tmall",
        "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/jakvbs~taobao-tmall/runs": {
      "post": {
        "operationId": "runs-sync-jakvbs-taobao-tmall",
        "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/jakvbs~taobao-tmall/run-sync": {
      "post": {
        "operationId": "run-sync-jakvbs-taobao-tmall",
        "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": "Product URLs or item ids",
            "type": "array",
            "description": "Taobao or Tmall product links (item.taobao.com, detail.tmall.com, detail.tmall.hk, m.intl.taobao.com, world.taobao.com/item/…), bare numeric item ids, or world.taobao.com keyword / category links. One row per product; duplicates are removed. e.tb.cn share links only open from mainland China, so paste the full product link instead.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Chinese or English keywords (蓝牙耳机, phone case). Each returns Taobao's top 20 products for it with a `rank` (Taobao shows logged-out visitors only the first page; add more specific keywords or categories for more). Taobao publishes these pages for common product terms only; a keyword without a page is named in FAILED_INPUTS and costs nothing.",
            "items": {
              "type": "string"
            }
          },
          "categoryIds": {
            "title": "Category ids",
            "type": "array",
            "description": "The number in world.taobao.com/category/<id>.htm. Top 20 products each.",
            "items": {
              "type": "string"
            }
          },
          "scrapeDetails": {
            "title": "Complete list results from each product page",
            "type": "boolean",
            "description": "Adds seller id, Tmall flag, shop credit level, shop scores, shop age, review summary, latest review, ship-from city and category path to keyword and category results. One extra page per product, so each row is charged as a full product (`productDetail`) instead of a list row (`product`).",
            "default": true
          },
          "tmallOnly": {
            "title": "Tmall stores only",
            "type": "boolean",
            "description": "Keep products sold by Tmall stores. Needs the product pages, so it turns on the option above.",
            "default": false
          },
          "maxItems": {
            "title": "Max products",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many products in total.",
            "default": 100
          },
          "priceMin": {
            "title": "Min price (CNY)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep products priced at or above this, in yuan. Products without a price are kept. Filtered products are never charged."
          },
          "priceMax": {
            "title": "Max price (CNY)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep products priced at or below this, in yuan."
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "One residential IP per parallel lane; each lane paces itself and slows down when Taobao pushes back.",
            "default": 4
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Accepted for compatibility; the actor routes through Apify residential proxy (US) itself.",
            "default": {
              "useApifyProxy": true
            }
          },
          "product_url": {
            "title": "Product URL (pizani-compatible)",
            "type": "string",
            "description": "One product link or id."
          },
          "items": {
            "title": "Product URLs or ids (zen-studio-compatible)",
            "type": "array",
            "description": "Same as Product URLs above.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Sort (memo23-compatible)",
            "enum": [
              "relevance",
              "sales",
              "price_desc"
            ],
            "type": "string",
            "description": "Relevance only for now; other values are logged and ignored.",
            "default": "relevance"
          },
          "translateKeywords": {
            "title": "Translate keywords (memo23-compatible)",
            "type": "boolean",
            "description": "Not needed: Taobao's pages accept English keywords as given.",
            "default": true
          },
          "includeVariants": {
            "title": "Variants (memo23-compatible)",
            "type": "boolean",
            "description": "Not available yet: SKU-level prices and stock are not on Taobao's public pages.",
            "default": false
          },
          "includeReviews": {
            "title": "Review rows (memo23-compatible)",
            "type": "boolean",
            "description": "Not available yet: rows carry the review summary and the latest review.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Reviews per product (memo23-compatible)",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Accepted, not used yet.",
            "default": 20
          },
          "fetchReviews": {
            "title": "Reviews (zen-studio-compatible)",
            "type": "boolean",
            "description": "Accepted, not used yet.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}