{
  "openapi": "3.0.1",
  "info": {
    "title": "HKTVmall Scraper - Hong Kong Prices, Stores & Stock",
    "description": "Scrape HKTVmall (hktvmall.com) products by keyword, category, store or product code: HKD price, original price and discount, brand, store, stock, units sold, rating, best-seller rank and category. English or Chinese. Optional details: description, stock level, expiry, variants. Error rows are free.",
    "version": "0.1",
    "x-build-id": "t03QsiRm1bNsNaWVF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~hktvmall-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-hktvmall-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/scrapewise~hktvmall-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-hktvmall-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/scrapewise~hktvmall-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-hktvmall-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": "Keywords",
            "type": "array",
            "description": "Product words to search on HKTVmall, one search per line, in English or Chinese (for example air fryer, oat milk, 洗衣液). maxItems is shared evenly between your keywords and links.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Category, store, search or product links",
            "type": "array",
            "description": "Links from hktvmall.com, one per line: a category page (ends in /c/<code>), a store page (ends in /s/<code>), a search page (search_a?keyword=...) or a product page (ends in /p/<code>). English and Chinese links both work.",
            "items": {
              "type": "string"
            }
          },
          "productCodes": {
            "title": "Product codes",
            "type": "array",
            "description": "HKTVmall product codes, one per line, for example H0888001_S_10133333 (the end of a product link, after /p/). Use it to track the price and stock of a fixed list of products.",
            "items": {
              "type": "string"
            }
          },
          "catalogFiles": {
            "title": "Catalog files (whole store)",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "To walk the whole HKTVmall catalog instead of a search: number of catalog files to read in this run (about 2,500 products each, 0 = off). Use maxItems to cap the run and catalogStartFile to continue in the next run.",
            "default": 0
          },
          "catalogStartFile": {
            "title": "First catalog file",
            "minimum": 0,
            "type": "integer",
            "description": "Catalog file to start from (0 = first). Run 1 with 0, run 2 with 5 and so on to split the catalog into several runs.",
            "default": 0
          },
          "minPrice": {
            "title": "Min price (HKD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at this price or above, in Hong Kong dollars."
          },
          "maxPrice": {
            "title": "Max price (HKD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at this price or below, in Hong Kong dollars."
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "zh"
            ],
            "type": "string",
            "description": "Language of product names, brands, stores, categories and links.",
            "default": "en"
          },
          "includeDetails": {
            "title": "Include product details",
            "type": "boolean",
            "description": "Also open each product page for the full description, highlights, exact stock level, expiry date, purchase limit, delivery note, return policy, variants and every large image. Charged as an extra event per product.",
            "default": false
          },
          "maxItems": {
            "title": "Max products",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap for the whole run, shared evenly between keywords and links (a search with fewer products leaves its share to the next). 0 = no cap.",
            "default": 50
          },
          "onlyNew": {
            "title": "Only products not delivered before",
            "type": "boolean",
            "description": "Remembers the products delivered for each keyword, link or code list and returns only products not seen in earlier runs, with isNew set to true. Products already seen are skipped and not charged. Use it with a schedule to catch new listings every day.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Used for product details and the whole catalog. Default: Apify residential proxy in Hong Kong. Change only if you know what you need.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}