{
  "openapi": "3.0.1",
  "info": {
    "title": "Smart E-Commerce Price & Stock Monitor",
    "description": "Monitor competitor e-commerce prices and stock availability with zero-code JSON-LD parsing, stateful diffing, and secure Webhook notifications for n8n, Make, Telegram, and Discord.",
    "version": "1.0",
    "x-build-id": "eyDRguEnipQJ6eCOw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/harry.automazione~smart-ecommerce-price-stock-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-harry.automazione-smart-ecommerce-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/harry.automazione~smart-ecommerce-price-stock-monitor/runs": {
      "post": {
        "operationId": "runs-sync-harry.automazione-smart-ecommerce-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/harry.automazione~smart-ecommerce-price-stock-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-harry.automazione-smart-ecommerce-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",
        "required": [
          "productUrls"
        ],
        "properties": {
          "productUrls": {
            "title": "Product URLs to Monitor",
            "type": "array",
            "description": "Paste 1 or more product page URLs you want to monitor. Works great with Shopify, WooCommerce, Zalando, Nike, Zara, ASOS, Decathlon, Gymshark, and any brand store. Click '+ Add' to monitor multiple products.",
            "items": {
              "type": "string"
            }
          },
          "webhookUrl": {
            "title": "Webhook Target URL (Optional)",
            "type": "string",
            "description": "Optional HTTP Webhook URL (n8n, Make, Telegram bot, Discord) to get instant alerts on price drops or stock changes."
          },
          "webhookAuthToken": {
            "title": "Webhook Secret Token (Optional)",
            "type": "string",
            "description": "Optional secret key to sign Webhook requests with HMAC-SHA256 for advanced security. Leave empty if not needed."
          },
          "minPriceChangePercentage": {
            "title": "Min Price Change % Threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Leave at 0 to get notified on any price change, or set to e.g. 5 to ignore tiny cent fluctuations.",
            "default": 0
          },
          "notifyOnFirstRun": {
            "title": "Notify On First Run",
            "type": "boolean",
            "description": "Leave FALSE for silent initial setup (recommended). Set TRUE if you want immediate alerts for all products on the first run.",
            "default": false
          },
          "notifyOnStockChangeOnly": {
            "title": "Notify On Stock Change Only",
            "type": "boolean",
            "description": "Set TRUE if you only care when products go out of stock or come back in stock, ignoring price changes.",
            "default": false
          },
          "maxConcurrencyPerDomain": {
            "title": "Max Concurrency Per Domain",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Leave at default (5) for safe direct scraping. If using Apify Residential Proxies, you can increase this up to 20 for ultra-fast parallel scraping.",
            "default": 5
          },
          "customSelectors": {
            "title": "Custom CSS Selectors (Fallback - Optional / Advanced)",
            "type": "object",
            "description": "Advanced / Optional. Leave empty — automatic JSON-LD detection handles 95%+ of brand e-commerce stores (Shopify, WooCommerce, Zalando, Nike, Zara, etc.) automatically. Only needed for old or custom-built stores without Schema.org metadata.",
            "default": {
              "title": "h1.product-title, h1.product_title, h1",
              "price": ".product-price, [data-price], .price, .current-price, [itemprop=\"price\"]",
              "stock": ".in-stock, .availability, [itemprop=\"availability\"], #availability"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Select Apify Proxies (or Residential Proxies) to bypass strict anti-bot protections on stores protected by Cloudflare or Akamai.",
            "default": {
              "useApifyProxies": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}