{
  "openapi": "3.0.1",
  "info": {
    "title": "Taobao & Tmall Product Scraper: Search, Category, Shop",
    "description": "Returns Taobao/Tmall product rows (title, CNY price, shop ID and scores, category, search rank, URL) from the public catalogue by keyword, category ID or shop ID. No login. Example: keywords=[\"机械键盘\"]. Pay per event: $0.002 per product.",
    "version": "0.1",
    "x-build-id": "CNFqbsMqRudzfKdfJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kyungminlee~taobao-catalog-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kyungminlee-taobao-catalog-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/kyungminlee~taobao-catalog-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kyungminlee-taobao-catalog-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/kyungminlee~taobao-catalog-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kyungminlee-taobao-catalog-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": {
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "List of search terms; one Taobao search per item. Provide at least one of keywords, categoryIds or shopIds. Chinese works best, e.g. [\"机械键盘\", \"手机壳\"]; common English phrases are searched as typed unless translateKeywords is true. A URL like https://www.taobao.com/list/product/机械键盘.htm is also accepted.",
            "items": {
              "type": "string"
            }
          },
          "categoryIds": {
            "title": "Category IDs",
            "type": "array",
            "description": "Optional list of Taobao category IDs as strings, e.g. [\"110210\"], or URLs like https://www.taobao.com/list/category/110210.htm. Use the categoryId field of a previous output row. Yields about 20 products per category (up to ~100 if sort orders work for your proxy).",
            "items": {
              "type": "string"
            }
          },
          "shopIds": {
            "title": "Shop IDs",
            "type": "array",
            "description": "Optional list of Taobao shop IDs as strings, e.g. [\"58625444\"], or URLs: https://www.taobao.com/list/dianpu/<id>.htm, shop<id>.taobao.com, any link with shopId=<id>. Brand-domain links (brand.tmall.com) are not accepted; search the store name via keywords and copy shopId from a row. Yields up to 60 products per shop plus shop scores.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerQuery": {
            "title": "Max products per query",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on unique products returned per keyword, category or shop (1-5000, default 100). One catalogue page holds only 20-40 products, so numbers above that rely on refineByBrand/refineByAttribute. Typical yield: keyword 100-1000, category ~20, shop ~60. Each product returned is one charged event; the run's max charge also stops it.",
            "default": 100
          },
          "refineByBrand": {
            "title": "Widen coverage with brands",
            "type": "boolean",
            "description": "Keywords only. true = also search '<brand> <keyword>' for up to 30 brands Taobao lists for the keyword, adding up to 40 new products each. Those rows have foundBy such as 'brand: 罗技'. Set false to get only the exact-keyword results.",
            "default": true
          },
          "refineByAttribute": {
            "title": "Widen coverage with attribute values",
            "type": "boolean",
            "description": "Keywords only. true = after brands, also search '<value> <keyword>' for up to 30 attribute values Taobao lists (e.g. 青轴 for keyboards). Rows have foundBy such as 'attribute: 青轴'. Set false for exact-keyword results only.",
            "default": true
          },
          "splitByPriceBands": {
            "title": "Use sort orders and price bands when available",
            "type": "boolean",
            "description": "true = if Taobao honours sort/price parameters for your proxy region (not US IPs, the Apify Proxy default), also query every sort order and automatic CNY price bands to reach more products. No effect when unsupported.",
            "default": true
          },
          "minPrice": {
            "title": "Min price (CNY)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional integer, CNY (yuan). Drops products priced below it; dropped products are not charged. Example: 100. Leave null for no minimum."
          },
          "maxPrice": {
            "title": "Max price (CNY)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional integer, CNY (yuan), must be >= 1. Drops products priced above it; dropped products are not charged. Example: 500. Leave null for no maximum."
          },
          "convertPricesTo": {
            "title": "Convert prices to",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "JPY",
              "KRW",
              "HKD",
              "SGD",
              "AUD",
              "CAD",
              "NZD",
              "MYR",
              "THB",
              "PHP",
              "IDR",
              "INR",
              "CHF",
              "SEK",
              "NOK",
              "DKK",
              "PLN",
              "CZK",
              "HUF",
              "RON",
              "TRY",
              "ILS",
              "ZAR",
              "BRL",
              "MXN",
              "ISK",
              "NONE"
            ],
            "type": "string",
            "description": "Currency code (enum) for the extra priceConverted field, next to the original CNY price, using the ECB daily reference rate. Default USD. NONE = omit priceConverted.",
            "default": "USD"
          },
          "deduplicateAcrossQueries": {
            "title": "De-duplicate across queries",
            "type": "boolean",
            "description": "true (default) = a product matching several keywords, categories or shops is returned and charged once, for the first query that found it. false = it is returned (and charged) once per query.",
            "default": true
          },
          "translateKeywords": {
            "title": "Translate English keywords to Chinese",
            "type": "boolean",
            "description": "true = English keywords made of common product words (e.g. 'phone case', 'LED strip lights') are searched in Chinese with a built-in offline dictionary; unknown words are searched as typed. Rows then include searchedKeyword (Chinese term used); query stays your input. Default false. Free.",
            "default": false
          },
          "trackPriceChanges": {
            "title": "Track price changes between runs",
            "type": "boolean",
            "description": "true = store each product's last price in a named key-value store (see priceHistoryStoreName) and add priceStatus (new/changed/unchanged), previousPrice, priceChange, priceChangePct, firstSeenAt, priceChangedAt to rows. Default false. No extra charge; all rows are still returned unless onlyNewOrChangedPrices is true.",
            "default": false
          },
          "onlyNewOrChangedPrices": {
            "title": "Only return new or price-changed products",
            "type": "boolean",
            "description": "true = implies trackPriceChanges; products whose price equals the last tracked run are skipped and NOT charged, so only new/changed products cost money. First run returns everything as 'new'. Default false.",
            "default": false
          },
          "priceHistoryStoreName": {
            "title": "Price history store name",
            "type": "string",
            "description": "Name of the key-value store used for price history when tracking is on: lowercase letters, digits, hyphens only, e.g. 'taobao-keyboard-watch'. Default 'taobao-price-history'. Use one name per monitoring project, the same name on every scheduled run.",
            "default": "taobao-price-history"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy settings object, e.g. {\"useApifyProxy\": true} (default, datacenter proxy). The IP rotates every 30 requests and after a block. Usually works without a proxy too ({\"useApifyProxy\": false}).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}