{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Change Monitor and Competitor Price Tracker",
    "description": "Monitor any web page for changes with a line-by-line diff, and track competitor prices: old price, new price and percent change for any product page. Keyword watching, severity scoring and alerts to Slack, Discord, Telegram or a webhook. Schedule it hourly or daily.",
    "version": "1.0",
    "x-build-id": "Chdc5Bacg1ZsxTS4L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fayoussef~website-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fayoussef-website-change-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/fayoussef~website-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-fayoussef-website-change-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/fayoussef~website-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-fayoussef-website-change-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs to monitor",
            "type": "array",
            "description": "The web pages to watch for changes — competitor pricing pages, product pages, terms of service, job boards, anything. The first run saves a baseline; every following run reports exactly what changed.",
            "items": {
              "type": "string"
            }
          },
          "cssSelector": {
            "title": "CSS selector (optional)",
            "type": "string",
            "description": "Watch only part of the page, e.g. `.pricing-table` or `#content`. Leave empty to monitor the whole page text. Ignores menus/scripts automatically."
          },
          "watchKeywords": {
            "title": "Watch keywords",
            "type": "array",
            "description": "Changes containing any of these words (e.g. `price`, `discount`, `sold out`) are always flagged as MAJOR severity.",
            "items": {
              "type": "string"
            }
          },
          "trackPrice": {
            "title": "Track the price",
            "type": "boolean",
            "description": "Find the price on each page (from the page's own product data, or the CSS selector below) and report price, previous price and the change. Off by default, so existing saved inputs behave exactly as before.",
            "default": false
          },
          "priceSelector": {
            "title": "Price CSS selector",
            "type": "string",
            "description": "Optional. A CSS selector for the element that holds the price, for example `.product-price` or `[data-price]`. Leave empty and the Actor reads the page's structured product data (JSON-LD, meta tags, itemprop), which most online shops publish."
          },
          "minPriceChangePercent": {
            "title": "Ignore price moves smaller than (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "A price change smaller than this percentage is not treated as a change. 0 reports every move.",
            "default": 0
          },
          "notifyOnFirstRun": {
            "title": "Notify on first run (baseline)",
            "type": "boolean",
            "description": "Send a notification even on the first run, when the baseline snapshot is created.",
            "default": false
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Incoming-webhook URL of your Slack channel. Change alerts are posted there."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Webhook URL of your Discord channel."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Your own Telegram bot token (from @BotFather). Used together with the chat ID below."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "The chat that receives Telegram alerts."
          },
          "webhookUrl": {
            "title": "Generic webhook URL",
            "type": "string",
            "description": "Any HTTPS endpoint — receives the full change item as JSON POST (works with Make, Zapier, n8n)."
          },
          "monitorMode": {
            "title": "Comparison mode",
            "enum": [
              "text",
              "html"
            ],
            "type": "string",
            "description": "`text` compares the visible text (recommended — ignores markup noise); `html` compares the raw HTML.",
            "default": "text"
          },
          "minChangePercent": {
            "title": "Minimum change (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Ignore changes smaller than this percentage of the page (0 = report every change). Useful for pages with rotating minor content.",
            "default": 0
          },
          "ignorePatterns": {
            "title": "Ignore patterns (regex)",
            "type": "array",
            "description": "Regular expressions removed from the content before comparing — great for timestamps, view counters or session IDs. Example: `\\d{2}:\\d{2}:\\d{2}`",
            "items": {
              "type": "string"
            }
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Baselines are stored under this name. Use different names to run independent monitors of the same URLs (e.g. one hourly, one daily).",
            "default": "default"
          },
          "resetBaseline": {
            "title": "Reset baseline",
            "type": "boolean",
            "description": "Discard saved baselines and start fresh — every URL becomes NEW_BASELINE on this run.",
            "default": false
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many pages to check in parallel.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Use Apify Proxy (datacenter or residential) or your own proxies for sites that block direct traffic. Leave disabled for a direct connection.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}