{
  "openapi": "3.0.1",
  "info": {
    "title": "Page Change Monitor",
    "description": "Watch public pages (pricing, terms, policies) and get alerted only when something matters. Smart alerts score each change 0–100, ignore timestamps, ads and rotating content, and say what changed in plain words. Respects robots.txt. By Steadfeed.",
    "version": "0.3",
    "x-build-id": "Od0wAu1CfitBhIlo2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadfeed~page-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadfeed-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/steadfeed~page-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-steadfeed-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/steadfeed~page-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-steadfeed-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"
        ],
        "properties": {
          "pages": {
            "title": "Pages to watch",
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "description": "1–50 public http(s) page objects. Each needs a url; optional CSS selector limits the compared region; optional label is a short name. Duplicate url+selector pairs are rejected. Does not log in or bypass paywalls.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "Url",
                  "description": "Public http(s) page URL",
                  "editor": "textfield"
                },
                "selector": {
                  "type": "string",
                  "title": "Selector",
                  "description": "Optional CSS selector for the compared region",
                  "editor": "textfield"
                },
                "label": {
                  "type": "string",
                  "title": "Label",
                  "description": "Optional short label for this watch",
                  "editor": "textfield"
                }
              }
            }
          },
          "ignorePatterns": {
            "title": "Ignore patterns",
            "type": "array",
            "description": "Optional substrings (case-insensitive) or /regex/ /regex/i patterns stripped before hashing and diffing. Use for rotating timestamps, view counters, or cookie banners. At most 30 patterns.",
            "items": {
              "type": "string"
            }
          },
          "summarizeChanges": {
            "title": "Summarize changes in plain words",
            "type": "boolean",
            "description": "On changed pages, add a `summary` with what was added, removed or reworded, price/date/number changes, and routine noise (timestamps, ads, cookie/footer text) filtered out. Deterministic and free: no AI is used unless you add your own key below.",
            "default": true
          },
          "skipNoiseOnlyChanges": {
            "title": "Quiet mode: report non-alert changes as unchanged",
            "type": "boolean",
            "description": "When a change is not worth an alert (only timestamps, ads, rotating boxes, reorders or cosmetic edits; or below your minimum score; or outside your watch words/categories), report the page as `unchanged` instead of `changed`. The stored snapshot is still refreshed. Off by default so behavior matches earlier versions.",
            "default": false
          },
          "maxSummaryChanges": {
            "title": "Max changes listed in summary",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on items in `summary.changes` (1–100).",
            "default": 25
          },
          "watchlistId": {
            "title": "Watchlist ID",
            "type": "string",
            "description": "Separates snapshot state when you run several schedules against the same named store. Letters, digits, _, -, . only; max 60.",
            "default": "default"
          },
          "smartFilter": {
            "title": "Smart noise filter",
            "type": "boolean",
            "description": "Also ignore cosmetic edits (case, punctuation, quote style), tracking/session URL parameters, lines that just moved, and rotating content (spots that change every run, or lines that leave and come back). Prices, stock status and policy wording are never treated as rotating. Free and deterministic; it keeps a small fingerprint history in the snapshot store.",
            "default": true
          },
          "watchKeywords": {
            "title": "Watch words",
            "type": "array",
            "description": "Optional words or phrases you care about (case-insensitive), e.g. refund, discontinued, Enterprise. A real change that mentions one is always an alert, scores at least 90, and is never filtered as noise. Up to 50.",
            "items": {
              "type": "string"
            }
          },
          "minSignificance": {
            "title": "Minimum score for an alert",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only changes scoring at least this much (0–100) count as alerts. Rough guide: price ≈ 85+, stock ≈ 80, policy ≈ 70, plan/feature ≈ 50, dates ≈ 45, general wording ≈ 20–40. 0 = every meaningful change is an alert (earlier behavior).",
            "default": 0
          },
          "alertCategories": {
            "title": "Only alert on these categories",
            "type": "array",
            "description": "Optional. Leave empty to alert on any category. Watch-word matches always alert.",
            "items": {
              "type": "string",
              "enum": [
                "price",
                "availability",
                "policy",
                "date",
                "product",
                "contact",
                "content"
              ],
              "enumTitles": [
                "Price",
                "Availability / stock",
                "Policy / terms",
                "Dates / deadlines",
                "Product / plan / features",
                "Contact details",
                "Other content"
              ]
            }
          },
          "onlyKeywordChanges": {
            "title": "Only alert on watch words",
            "type": "boolean",
            "description": "When on, a change is an alert only if it mentions one of your watch words.",
            "default": false
          },
          "stripNoiseElements": {
            "title": "Strip page furniture before comparing",
            "type": "boolean",
            "description": "Remove cookie banners, ad slots, newsletter popups, chat widgets, share bars, sidebars and 'trending' boxes from the HTML before snapshotting. Off by default because turning it on changes the stored snapshot text (the next run will show one change while it settles).",
            "default": false
          },
          "stateStoreName": {
            "title": "State key-value store name",
            "type": "string",
            "description": "Named Apify key-value store that holds page snapshots between scheduled runs. 3–63 characters.",
            "default": "steadfeed-page-change-monitor-state"
          },
          "emitOnFirstRun": {
            "title": "Emit rows on first snapshot",
            "type": "boolean",
            "description": "When true (default), the first successful fetch of a page outputs a status=new row and saves the baseline. When false, only the baseline is saved.",
            "default": true
          },
          "emitUnchanged": {
            "title": "Emit unchanged rows",
            "type": "boolean",
            "description": "When true (default), pages whose content hash matches the previous snapshot still produce a dataset row. Turn off to only receive new/changed/error rows.",
            "default": true
          },
          "maxDiffLines": {
            "title": "Max diff lines listed",
            "minimum": 5,
            "maximum": 200,
            "type": "integer",
            "description": "Cap on added+removed lines included in the diff summary (5–200). Counts always reflect the full diff.",
            "default": 40
          },
          "requestIntervalMs": {
            "title": "Min delay between requests to the same host (ms)",
            "minimum": 200,
            "maximum": 30000,
            "type": "integer",
            "description": "Polite per-host spacing. 200–30000; default 1000.",
            "default": 1000
          },
          "maxRetries": {
            "title": "Retries for transient failures",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for network errors and 408/429/5xx. 0–5; default 2.",
            "default": 2
          },
          "timeoutMs": {
            "title": "Request timeout (ms)",
            "minimum": 3000,
            "maximum": 60000,
            "type": "integer",
            "description": "Per-request timeout. 3000–60000; default 20000.",
            "default": 20000
          },
          "maxBytes": {
            "title": "Max response body bytes",
            "minimum": 50000,
            "maximum": 5000000,
            "type": "integer",
            "description": "Bodies larger than this are truncated before parsing. 50000–5000000; default 2000000.",
            "default": 2000000
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "When true (default), fetches /robots.txt per origin and skips URLs disallowed for this Actor's user-agent. Unreachable or 5xx robots.txt also skips the page.",
            "default": true
          },
          "maxPages": {
            "title": "Maximum pages per run",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Hard cap on pages array length for this run. 1–100; default 50.",
            "default": 50
          },
          "aiApiKey": {
            "title": "Optional: your own AI API key",
            "type": "string",
            "description": "Optional. Bring your own key for an OpenAI-compatible API to add a short AI-written summary on top of the built-in one. You pay your AI provider directly; Steadfeed never supplies or stores a key. Leave empty for free deterministic summaries only."
          },
          "aiBaseUrl": {
            "title": "AI API base URL",
            "type": "string",
            "description": "OpenAI-compatible base URL (https). Default https://api.openai.com/v1.",
            "default": "https://api.openai.com/v1"
          },
          "aiModel": {
            "title": "AI model",
            "type": "string",
            "description": "Model id your provider accepts. Default gpt-6-luna.",
            "default": "gpt-6-luna"
          },
          "maxAiSummaries": {
            "title": "Max AI summaries per run",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Caps how many AI calls (billed by your provider) one run may make (1–200).",
            "default": 25
          },
          "aiMinSignificance": {
            "title": "Only use AI for changes scoring at least",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Saves AI cost: only alerts with at least this built-in score (0–100) are sent to your AI provider. 0 = every alert.",
            "default": 0
          },
          "aiUseVerdict": {
            "title": "Let the AI's score decide the alert",
            "type": "boolean",
            "description": "When on, the AI's own 0–100 score and its 'does this matter' answer replace the built-in score for the alert decision (watch-word matches still always alert). Off by default.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}