{
  "openapi": "3.0.1",
  "info": {
    "title": "WeChat Mini Program Catalog Monitor — Price & Stock Changes",
    "description": "Compare customer-provided WeChat Mini Program product snapshots and detect new or removed SKUs, price changes, restocks, stockouts, low stock, assortment shifts, and evidence-linked catalog changes. This is a snapshot analyzer, not a Mini Program scraper.",
    "version": "0.1",
    "x-build-id": "w2YOuZ4l6gEQqf0iC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrupulous_buckler~wechat-mini-program-catalog-price-stock-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrupulous_buckler-wechat-mini-program-catalog-price-stock-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/scrupulous_buckler~wechat-mini-program-catalog-price-stock-monitor/runs": {
      "post": {
        "operationId": "runs-sync-scrupulous_buckler-wechat-mini-program-catalog-price-stock-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/scrupulous_buckler~wechat-mini-program-catalog-price-stock-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-scrupulous_buckler-wechat-mini-program-catalog-price-stock-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": "Data source",
            "enum": [
              "demo",
              "datasetSnapshots",
              "uploadedSnapshots"
            ],
            "type": "string",
            "description": "Run the paid synthetic example, compare two existing Apify Datasets, or compare two pasted JSON product snapshots.",
            "default": "demo"
          },
          "currentDatasetId": {
            "title": "Current product Dataset ID",
            "type": "string",
            "description": "Apify Dataset containing the latest customer-owned or authorized Mini Program product export.",
            "default": ""
          },
          "previousDatasetId": {
            "title": "Previous product Dataset ID",
            "type": "string",
            "description": "Optional earlier product snapshot. Leave empty to create a first baseline report.",
            "default": ""
          },
          "uploadedCurrentProducts": {
            "title": "Current product records",
            "type": "array",
            "description": "Latest JSON product snapshot. Common product ID, SKU, title, price, stock, brand, category, store, URL and image aliases are recognized.",
            "default": []
          },
          "uploadedPreviousProducts": {
            "title": "Previous product records",
            "type": "array",
            "description": "Optional earlier JSON product snapshot used to calculate changes.",
            "default": []
          },
          "hasRightToAnalyze": {
            "title": "I have the right to analyze these records",
            "type": "boolean",
            "description": "Required outside demo mode. Confirm the supplied or referenced product records are customer-owned, authorized, public, or otherwise lawfully processed.",
            "default": false
          },
          "catalogLabel": {
            "title": "Catalog or competitor label",
            "type": "string",
            "description": "Name the Mini Program, competitor, store, campaign, category or catalog represented by the snapshots.",
            "default": "WeChat Mini Program catalog"
          },
          "defaultCurrency": {
            "title": "Default currency",
            "type": "string",
            "description": "Used only when a product row does not contain its own currency code.",
            "default": "CNY"
          },
          "priceChangePercentThreshold": {
            "title": "Minimum price-change percentage",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Price movements below this absolute percentage remain visible in row data but are not promoted as price-change signals.",
            "default": 1
          },
          "lowStockThreshold": {
            "title": "Low-stock quantity threshold",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Current quantities at or below this number are flagged as low stock. Rows without numeric stock are not guessed.",
            "default": 5
          },
          "maxProductsPerSnapshot": {
            "title": "Products per snapshot (maximum 2,000)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "One $4.99 report reads and normalizes at most 2,000 product rows from each snapshot.",
            "default": 2000
          },
          "includeUnchangedProducts": {
            "title": "Deliver unchanged matched products",
            "type": "boolean",
            "description": "Off by default to keep the output focused on baselines and changes. The report still counts unchanged matched products.",
            "default": false
          },
          "includeProductImages": {
            "title": "Keep supplied product image URLs",
            "type": "boolean",
            "description": "Keeps image URLs already present in the supplied records. The Actor does not download or inspect product images.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}