{
  "openapi": "3.0.1",
  "info": {
    "title": "Taobao Scraper - Search, Item Details & Shops | 淘宝",
    "description": "Taobao and Tmall products by search word, category, shop or item id: full title, price in yuan, promotion label, shop and its scores, category. Add the item page for ship-from city, shop age and credit level, and review counts.",
    "version": "0.1",
    "x-build-id": "hGRV7r5W5wKhVYPxD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~taobao-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-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/dami_studio~taobao-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-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/dami_studio~taobao-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-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": {
          "keywords": {
            "title": "Search words",
            "type": "array",
            "description": "Words to look up on Taobao, one per line. Chinese words find the most (保鲜盒, 手机壳, 连衣裙); some English ones work too. Taobao keeps public pages only for words people search often, so a long or very specific search may find nothing: you get a free note row saying so.",
            "items": {
              "type": "string"
            }
          },
          "itemIds": {
            "title": "Item ids or links",
            "type": "array",
            "description": "Taobao or Tmall item ids (1038060809278) or links that carry one (item.taobao.com/item.htm?id=..., detail.tmall.com/item.htm?id=..., world.taobao.com/item/....htm). Each gives one row with the item page's details.",
            "items": {
              "type": "string"
            }
          },
          "shopIds": {
            "title": "Shop ids or links",
            "type": "array",
            "description": "Taobao shop ids (59925401), or world.taobao.com/dianpu/....htm links. Each gives one shop row (name, seller id, three shop scores) and, if you leave the switch below on, the 60 products the shop's page lists first.",
            "items": {
              "type": "string"
            }
          },
          "categoryIds": {
            "title": "Category ids or links",
            "type": "array",
            "description": "Taobao category ids (50000567) or world.taobao.com/category/....htm links. Each gives the 20 best-selling products the category's page lists.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerKeyword": {
            "title": "Products per search word",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Up to 200. The first 40 are the word's best sellers; past those the run reads the best sellers in nine price bands, cheapest first, then by seller rating, about 20 new products a page. Some words have fewer.",
            "default": 100
          },
          "maxItems": {
            "title": "Most products in the run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The run stops adding products here, across search words, categories, shops and item ids. Shop rows don't count toward it.",
            "default": 1000
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "sales",
              "price-asc",
              "price-desc",
              "seller-credit"
            ],
            "type": "string",
            "description": "Best sellers (the default), price low to high, price high to low, or seller rating. A price order starts with Taobao's own cheapest or dearest listings, which can include 1-yuan samples; set a price range to skip them.",
            "default": "sales"
          },
          "brand": {
            "title": "Brand",
            "type": "string",
            "description": "Only this brand, as Taobao lists it for the search word: a name (乐扣乐扣, Lock&Lock) or its brand id. If the word has no such brand, you get a free note row with the brands it does list."
          },
          "freeShippingOnly": {
            "title": "Free shipping only",
            "type": "boolean",
            "description": "Taobao's own free-shipping filter for the search. The rows don't show a shipping cost, so it can't be checked product by product.",
            "default": false
          },
          "relatedKeywords": {
            "title": "Related search words",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Also search up to this many of the words Taobao suggests for each search word (0 to 10). A product already returned for the word or another of its related words is not returned again. Rows carry relatedTo.",
            "default": 0
          },
          "onlyNew": {
            "title": "Only products new since my last run",
            "type": "boolean",
            "description": "Leave out products this actor returned in an earlier run of yours with the same key below. The list is kept in a store in your own Apify account. The first run returns everything.",
            "default": false
          },
          "stateKey": {
            "title": "Key for 'only new'",
            "type": "string",
            "description": "Runs with the same key share one list. Use a different key for each search you follow. Letters, digits, - and _.",
            "default": "default"
          },
          "includeShopProducts": {
            "title": "Add the shop's products",
            "type": "boolean",
            "description": "With shop ids: also return the products on the shop's page (up to 60 a shop).",
            "default": true
          },
          "includeDetails": {
            "title": "Open each product's page",
            "type": "boolean",
            "description": "Adds what the item page shows: Tmall or Taobao, price before promotion, where it ships from, category path, the shop's age, size, credit level and three scores, and the review counts with good, neutral and bad shares. A product whose page was read costs the detailed-product price instead of the plain one. Slower: about 3 seconds a product.",
            "default": false
          },
          "minPrice": {
            "title": "Minimum price (¥)",
            "minimum": 0,
            "type": "number",
            "description": "Leave empty for no lower limit. Products below it are left out and not charged."
          },
          "maxPrice": {
            "title": "Maximum price (¥)",
            "minimum": 0,
            "type": "number",
            "description": "Leave empty for no upper limit. Products above it are left out and not charged."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}