{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Change Monitor: New Items & Telegram Alerts",
    "description": "Monitor web pages and get Telegram, Slack or webhook alerts only on real changes. Watch a CSS selector per page, or get only new items from job boards, feeds and tenders. Errors never count as changes. No browser: fast and cheap. You pay only for pages checked successfully.",
    "version": "0.1",
    "x-build-id": "lww3DgL66gsJ7frHf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gouguah~reliable-page-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gouguah-reliable-page-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/gouguah~reliable-page-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-gouguah-reliable-page-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/gouguah~reliable-page-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-gouguah-reliable-page-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",
        "properties": {
          "pages": {
            "title": "Pages",
            "type": "array",
            "description": "Pages to monitor, each with optional CSS selector, label and compare mode: [{ \"url\": \"https://...\", \"cssSelector\": \"#price\", \"label\": \"Shop A\", \"compareMode\": \"newItems\" }]. A page without compareMode uses the global \"Compare mode\". Checked before the URLs below; the same URL + selector pair is checked only once. Up to 50 pages in total."
          },
          "urls": {
            "title": "Page URLs",
            "maxItems": 50,
            "type": "array",
            "description": "Pages to monitor (http or https) that share the CSS selector below. Kept for existing tasks; prefer \"Pages\" for per-page selectors.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cssSelector": {
            "title": "CSS selector",
            "type": "string",
            "description": "Optional. Selector used for every URL in \"Page URLs\". Only text inside matching elements is compared. When empty, the whole <body> text is used (without script, style and noscript).",
            "default": ""
          },
          "compareMode": {
            "title": "Compare mode",
            "enum": [
              "text",
              "newItems"
            ],
            "type": "string",
            "description": "Default mode for every page that does not set its own compareMode in \"Pages\" (and for all \"Page URLs\"). \"text\": line diff of the whole text (added lines first). \"newItems\": every element matched by the CSS selector is one item (every non-empty line without a selector); alerts list only items never seen before, ignoring order. Removals and reordering alone update the state without an alert (status CHANGED_NO_NEW_ITEMS). Best for feeds and listings.",
            "default": "text"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. Receives a JSON POST for every change (and errors if enabled)."
          },
          "slackWebhookUrl": {
            "title": "Slack incoming webhook URL",
            "type": "string",
            "description": "Optional. Slack incoming webhook that receives a text message per change."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional. Token of your Telegram bot. Requires Telegram chat ID too."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Optional. Chat that receives the messages."
          },
          "notifyOnError": {
            "title": "Notify on errors",
            "type": "boolean",
            "description": "Also send a separate notification when a page cannot be checked (HTTP error, timeout, blocked, selector missing).",
            "default": false
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Timeout for each page request. A timed-out request is retried once.",
            "default": 30
          },
          "stateStore": {
            "title": "State store (recommended)",
            "type": "string",
            "description": "Key-value store that keeps the last seen version of each page between runs. Create one in Storage → Key-value stores and select it here. Use one store per independent monitor. Without a usable store, every run is a free baseline with no alerts."
          },
          "stateStoreName": {
            "title": "State store name (fallback)",
            "type": "string",
            "description": "Used only when no \"State store\" is selected: named key-value store for the page state. If the platform does not allow access to it, the run continues without saved state (free, no alerts).",
            "default": "page-change-monitor-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}