{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Change Monitor — Diff, Screenshot & AI Summary",
    "description": "Watch pricing pages, product availability, terms, docs or any URL. Get only what changed since the last run — added/removed text, change %, screenshot — plus an optional AI summary of what the change means.",
    "version": "0.1",
    "x-build-id": "83URgFWWUuUvyktKK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/almoutasem_nabil~page-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-almoutasem_nabil-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/almoutasem_nabil~page-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-almoutasem_nabil-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/almoutasem_nabil~page-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-almoutasem_nabil-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",
        "required": [
          "pages",
          "trackingId"
        ],
        "properties": {
          "pages": {
            "title": "Pages to watch",
            "minItems": 1,
            "type": "array",
            "description": "Each entry is a URL, or an object { url, name, selector, ignoreSelectors, renderJs }. Use 'selector' to watch one element (a price, a status line) — it is the single best way to avoid false alarms."
          },
          "trackingId": {
            "title": "Tracking ID",
            "type": "string",
            "description": "Name of this watch. The previous run's snapshot is stored under this key in the 'page-monitor-state' key-value store, so use one ID per set of pages and keep it stable."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "changes",
              "snapshot"
            ],
            "type": "string",
            "description": "'changes' returns only pages that changed (plus errors) — the normal way to run this on a schedule. 'snapshot' returns every page's current state each run.",
            "default": "changes"
          },
          "textOnly": {
            "title": "Compare text, not HTML",
            "type": "boolean",
            "description": "Compare the visible text. Turn off to compare markup too, which catches attribute and structural changes but reports far more noise.",
            "default": true
          },
          "renderJs": {
            "title": "Render JavaScript",
            "type": "boolean",
            "description": "Load every page in a headless browser. Slower and needs 2048 MB. Leave off: pages whose HTML comes back as an empty shell are automatically retried in a browser anyway.",
            "default": false
          },
          "ignorePatterns": {
            "title": "Ignore patterns",
            "type": "array",
            "description": "Regular expressions for text to ignore — timestamps, view counters, CSRF tokens, 'Last updated' lines. This is the main tool for stopping a page from reporting a change on every single run.",
            "items": {
              "type": "string"
            }
          },
          "minChangePercent": {
            "title": "Minimum change %",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Ignore changes smaller than this share of the page text. Raise it for noisy pages; a watched keyword always reports regardless of this setting.",
            "default": 0.5
          },
          "watchKeywords": {
            "title": "Watch keywords",
            "type": "array",
            "description": "Report whenever one of these appears or disappears, however small the change — 'Sold out', 'Out of stock', 'Discontinued', a competitor's plan name.",
            "items": {
              "type": "string"
            }
          },
          "screenshotOnChange": {
            "title": "Screenshot on change",
            "type": "boolean",
            "description": "Capture a full-page PNG when a page changes and return its URL. Needs a browser, so budget 2048 MB.",
            "default": false
          },
          "aiSummary": {
            "title": "AI summary of changes",
            "type": "boolean",
            "description": "For each changed page, add a plain-language summary of what changed, a category (price, availability, legal, content, outage) and an importance score from 1 to 5.",
            "default": false
          },
          "summaryLanguage": {
            "title": "Summary language",
            "type": "string",
            "description": "ISO code for the AI summary language. 'ar' produces Modern Standard Arabic.",
            "default": "en"
          },
          "emitBaselineAsChanged": {
            "title": "Report the first run",
            "type": "boolean",
            "description": "On the first run for a tracking ID, report every page as new. Off = the first run quietly records the baseline so your first alert is a real change.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many pages are checked in parallel.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxies for the requests. Datacenter is enough for most pages; switch to residential for sites that block cloud IPs.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}