{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Denim Restock & Price Monitor",
    "description": "Monitor official Japanese denim brand stores (WAREHOUSE & Co., TCB jeans): back in stock, sold out, price changes, new models and sizes per waist, with lot number, fabric weight (oz), wash and fit fields.",
    "version": "0.0",
    "x-build-id": "9nlQ0X786ZUsefMRa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datalab-jp~japan-denim-restock-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datalab-jp-japan-denim-restock-monitor",
        "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/datalab-jp~japan-denim-restock-monitor/runs": {
      "post": {
        "operationId": "runs-sync-datalab-jp-japan-denim-restock-monitor",
        "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/datalab-jp~japan-denim-restock-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-datalab-jp-japan-denim-restock-monitor",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "changes",
              "snapshot"
            ],
            "type": "string",
            "description": "What to return, e.g. 'changes' for monitoring or 'snapshot' for a full list. 'changes' returns only what changed since the previous run (restocked, sold_out, price_up, price_down, new_product, new_variant, preorder_started, purchase_limit_changed, removed); the first run per store saves a baseline and returns rows as 'first_run'. Defaults to 'snapshot' when omitted. Both modes compare with and update the state in `stateStoreName`.",
            "default": "snapshot"
          },
          "stores": {
            "title": "Denim stores",
            "uniqueItems": true,
            "type": "array",
            "description": "Official Japanese denim brand stores to read, e.g. ['warehouse'] or ['warehouse', 'tcb-jeans']. Only stores whose terms do not prohibit this use are supported (neither store publishes a usable terms text, which is not the same as permission): WAREHOUSE & Co. (Osaka, Japanese titles) and TCB jeans (Kojima, English titles). Defaults to both when omitted. Each store's whole public catalogue is read once per run (1–2 requests) and the filters are applied afterwards.",
            "items": {
              "type": "string",
              "enum": [
                "warehouse",
                "tcb-jeans"
              ],
              "enumTitles": [
                "WAREHOUSE & Co. ウエアハウス (Osaka)",
                "TCB jeans (Kojima, Okayama)"
              ]
            },
            "default": [
              "warehouse",
              "tcb-jeans"
            ]
          },
          "garmentTypes": {
            "title": "Garment types",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only these kinds of items, e.g. ['bottoms'] for jeans and trousers or ['bottoms', 'jacket'] for jeans and denim jackets. The type comes from each store's product type, corrected by the title (a TCB tee filed under Shirts is 'tshirt'). Defaults to ['bottoms', 'jacket', 'overall'] when omitted; pass [] for every item including T-shirts, sweats, hats and accessories. 'jacket' includes coveralls and vests.",
            "items": {
              "type": "string",
              "enum": [
                "bottoms",
                "jacket",
                "overall",
                "shirt",
                "tshirt",
                "sweat",
                "headwear",
                "footwear",
                "accessory",
                "care",
                "other"
              ],
              "enumTitles": [
                "Jeans, trousers & shorts",
                "Jackets, coveralls & vests",
                "Overalls",
                "Shirts",
                "T-shirts",
                "Sweatshirts & hoodies",
                "Caps & hats",
                "Footwear (collaborations)",
                "Accessories (bandanas, bags, belts, socks…)",
                "Denim care (detergent)",
                "Other"
              ]
            },
            "default": [
              "bottoms",
              "jacket",
              "overall"
            ]
          },
          "denimStatedOnly": {
            "title": "Only items the store says are denim",
            "type": "boolean",
            "description": "Keep only rows whose title, colour option, tags or fabric line say denim (デニム, INDIGODENIM, 'Jeans', '10oz selvedge denim'), e.g. true to drop chinos, duck and hickory items. The check is strict on purpose: TCB does not write 'denim' in the titles of several denim jackets (e.g. 'New S40's Jacket 14oz'), so those are dropped too. Defaults to false. Use `garmentTypes` alone if you do not want to miss such items.",
            "default": false
          },
          "washes": {
            "title": "Washes (optional)",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only these washes, e.g. ['non_wash'] for raw / unwashed denim or ['one_wash']. The wash is read from the title (NON WASH, One-Wash), the colour option (INDIGODENIM ONEWASH) or an explicit sentence such as 「この商品はワンウォッシュです」. Defaults to no wash filter. Items whose wash the store does not state have wash null and are dropped when this filter is set.",
            "items": {
              "type": "string",
              "enum": [
                "one_wash",
                "non_wash",
                "used_wash"
              ],
              "enumTitles": [
                "One wash ワンウォッシュ",
                "Non wash / rigid ノンウォッシュ",
                "Used wash ユーズド"
              ]
            },
            "default": []
          },
          "minFabricOz": {
            "title": "Min fabric weight (oz)",
            "minimum": 0,
            "type": "number",
            "description": "Drop items lighter than this fabric weight in ounces, e.g. 13.5 or 14 for heavyweight jeans. The weight is read from the title (\"14oz\"), a tag (\"14.5OZ\") or the fabric line of the description (\"(13.5 Oz)\"). Defaults to no minimum when empty. Items with no stated weight (common at WAREHOUSE) are dropped when this or `maxFabricOz` is set."
          },
          "maxFabricOz": {
            "title": "Max fabric weight (oz)",
            "minimum": 0,
            "type": "number",
            "description": "Drop items heavier than this fabric weight in ounces, e.g. 12 or 10.5 for lighter denim. Same sources as `minFabricOz` (title, tag or fabric line). Defaults to no maximum when empty. Must be greater than or equal to `minFabricOz`; items with no stated weight are dropped when set."
          },
          "sizes": {
            "title": "Sizes (optional)",
            "type": "array",
            "description": "Keep only these sizes, e.g. ['32', '33'] for waist 32–33 or ['38', 'M'] for a jacket size. A row matches when the store's size label or the parsed waist (inches, trousers only) equals one of the values, case-insensitive. Defaults to all sizes when empty. Combine with mode 'changes' and changeTypes ['restocked'] to be told when your size is back.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Drop variants cheaper than this price, e.g. 20000 or 30000 (yen). The comparison uses each row's own `currency`; the Actor asks both stores for prices in JPY (TCB can show other currencies). Defaults to no minimum when empty. Removed rows are judged by their last known price."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Drop variants more expensive than this price, e.g. 30000 or 50000 (yen). The comparison uses each row's own `currency` (JPY unless the store answered otherwise). Defaults to no maximum when empty. Must be greater than or equal to `minPrice`."
          },
          "keywords": {
            "title": "Keywords (optional)",
            "type": "array",
            "description": "Keep only items whose title, variant, product type, sub-brand, lot number, tags or SKU contain any of these words, e.g. ['1001XX'] or ['S40', '50\\'s Jeans']. WAREHOUSE titles are lot numbers with Japanese colour names, TCB titles English model names; a word that matches nothing in a store is retried once with a verified alias (デニム→denim, 牛仔→denim/デニム). Defaults to no keyword filter. Combined with the other filters (all must match).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "changeTypes": {
            "title": "Change types to return",
            "uniqueItems": true,
            "type": "array",
            "description": "In 'changes' mode, return only these kinds of change, e.g. ['restocked'] for back-in-stock alerts or ['price_up', 'price_down'] for price tracking. A row matches if any of its changes is listed (a size can be restocked and repriced at once). Defaults to all change types when empty. Ignored in 'snapshot' mode; changes filtered out here are still recorded in the state and are not reported again.",
            "items": {
              "type": "string",
              "enum": [
                "new_product",
                "new_variant",
                "restocked",
                "preorder_started",
                "sold_out",
                "price_up",
                "price_down",
                "purchase_limit_changed",
                "removed",
                "first_run"
              ],
              "enumTitles": [
                "New product",
                "New size/colour",
                "Back in stock",
                "Pre-order started (title/tag says pre-order)",
                "Sold out",
                "Price increase",
                "Price decrease",
                "Purchase limit added/changed/removed",
                "Removed from store",
                "First run (baseline)"
              ]
            },
            "default": []
          },
          "onlyAvailable": {
            "title": "Only in-stock items (snapshot)",
            "type": "boolean",
            "description": "In 'snapshot' mode, drop variants that are currently sold out, e.g. to list only sizes that can be ordered right now. Availability is the store's own in-stock flag for each colour × size. Defaults to false (sold-out variants are included with available=false). Ignored in 'changes' mode, where sell-outs are reported as 'sold_out' events.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum rows for the whole run, e.g. 100 for a quick check or 1500 for every jean, jacket and overall in both stores (about 1,000 variants in October 2026). Each row is one billable result, so this is your cost cap; it is shared fairly between the selected stores. Defaults to 100 when omitted; accepts 1–20000. If a store's change output is cut off, its state is not updated, so the missing changes come next run (a first-run baseline is always saved in full).",
            "default": 100
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Name of the key-value store in YOUR Apify account that keeps the previous run's prices and stock, e.g. 'japan-denim-restock-monitor' or 'w32-raw-denim-alerts'. Letters, digits and hyphens only (max 63). Defaults to 'japan-denim-restock-monitor'. Use a different name for each schedule with different filters so one monitor does not consume another's changes; a new name starts a new baseline.",
            "default": "japan-denim-restock-monitor"
          },
          "autoRetryKeywordMapping": {
            "title": "Retry zero-hit keywords with aliases",
            "type": "boolean",
            "description": "When a keyword matches nothing in a store, retry it once with a verified alias, e.g. 'デニム' → 'denim' at TCB or '牛仔' → 'denim' / 'デニム'. Only aliases checked against real store data are used. Defaults to true. The run log and the RUN_REPORT record show which word was actually used for each store.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy for reading the stores' public product feeds, e.g. {'useApifyProxy': true} (Apify datacenter proxy) or {'useApifyProxy': false} (direct). Shopify rate-limits per IP and has answered HTTP 429 to busy cloud IPs, so the datacenter proxy is on by default. Defaults to Apify datacenter proxy; a run on Apify on 2026-10-10 read both stores this way, so residential proxy is not needed. Requests go one at a time with pauses and automatic retries on 429.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}