{
  "openapi": "3.0.1",
  "info": {
    "title": "Taobao & Tmall Shop Scraper - Store Products, Prices & Ratings",
    "description": "Scrape Taobao and Tmall shops: every product a visitor can reach (several sort orders merged, no duplicates), CNY/HKD/TWD prices, promo labels, selling points, images, ranks, shop ratings, Tmall flag, age, location. No login. Pay per row.",
    "version": "0.1",
    "x-build-id": "3xTUP59oeBrnloyCN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hexagone-data~taobao-shop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hexagone-data-taobao-shop-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/hexagone-data~taobao-shop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hexagone-data-taobao-shop-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/hexagone-data~taobao-shop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hexagone-data-taobao-shop-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",
        "required": [
          "shopUrls"
        ],
        "properties": {
          "shopUrls": {
            "title": "Shop URLs or ids",
            "type": "array",
            "description": "One Taobao or Tmall shop per line: https://world.taobao.com/dianpu/63978904.htm, shop63978904.taobao.com, inman.taobao.com, uniqlo.tmall.com, or the shop id alone (63978904). Product pages (item.taobao.com, detail.tmall.com) need a Taobao login and are refused with a reason: paste the shop address instead. Two addresses of the same shop are read once.",
            "items": {
              "type": "string"
            }
          },
          "sortOrders": {
            "title": "Sort orders to read and merge",
            "type": "array",
            "description": "Taobao shows a visitor 60 products per sort order; each order read adds the products the others did not show (measured: 191 distinct products for 5 orders on a 407-product shop, 60 for one). Each order costs one page request, not a charge: you pay per delivered row. credit-des gave the same list as default on 10 of 10 shops.",
            "items": {
              "type": "string",
              "enum": [
                "default",
                "sales-des",
                "new-des",
                "credit-des",
                "price-asc",
                "price-des"
              ],
              "enumTitles": [
                "Default (shop's order)",
                "Best sellers",
                "Newest",
                "Credit (same as default, measured)",
                "Price: low to high",
                "Price: high to low"
              ]
            },
            "default": [
              "default",
              "sales-des",
              "new-des",
              "price-asc",
              "price-des"
            ]
          },
          "maxProductsPerShop": {
            "title": "Max products per shop",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each shop after this many products (in the order the sort orders were read). 0 = every product the sort orders show.",
            "default": 0
          },
          "maxItems": {
            "title": "Max rows per run (shop rows included)",
            "minimum": 0,
            "type": "integer",
            "description": "Total rows delivered by the run, shop rows included: the run stops there. 0 = no limit.",
            "default": 0
          },
          "includeShopRow": {
            "title": "One shop row per shop",
            "type": "boolean",
            "description": "Add one row per shop (recordType shop) before its products: name, ratings, products announced vs read, sorts read, status, profile. It is a delivered row.",
            "default": true
          },
          "shopDetails": {
            "title": "Shop profile (Tmall or not, age, location, ratings vs peers)",
            "type": "boolean",
            "description": "Read the shop's home page once more (one request) for isTmall, shop age, location, original name and how its ratings compare to similar shops. These come from the data the page loads for a visitor; Taobao does not print them on screen. Some older shop pages carry no profile: the fields stay null.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Default: Apify residential proxy in Hong Kong. Taobao applies the sort orders only to visitors from Hong Kong, Taiwan or Singapore (measured; ignored for datacenter and US IPs) and shows its login wall to most server IPs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "HK"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}