{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Change Monitor: Page Change Detection & Diffs",
    "description": "Watch web pages for changes, a website change tracker: give it page URLs (or a dataset of them) and each scheduled run returns only the pages that changed, with a line-by-line diff, the sections affected, and added and removed text. Unchanged pages cost less. Selector, ignore and keyword filters.",
    "version": "0.1",
    "x-build-id": "qzC5hZWpHwSGsBfAo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/humble-echidna~website-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-humble-echidna-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/humble-echidna~website-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-humble-echidna-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/humble-echidna~website-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-humble-echidna-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",
        "properties": {
          "urls": {
            "title": "Pages to watch",
            "type": "array",
            "description": "The pages to check for changes, one per line, e.g. https://example.com/pricing; a missing https:// is added. Each run compares every page with what this monitor saw last time and returns only the pages that are new, changed or removed. Pages the site's robots.txt disallows are skipped and listed in the log. Up to 2,000 pages per run. Ignored when datasetId is set.",
            "default": [
              "https://en.wikipedia.org/wiki/Main_Page"
            ],
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Or: page URLs from a dataset (chain after another actor)",
            "type": "string",
            "description": "Default empty. One of your Apify datasets, picked here or given by id, e.g. the pages Sitemap URL Extractor found on a site; to chain this actor after another in an integration, `{{resource.defaultDatasetId}}`. Each item's page URL is used as a line of urls (urls is ignored). Duplicates are checked once. Each row carries sourceTitle, sourcePlaceId and sourceIndex from its item. Reads at most 20,000 items, read-only."
          },
          "datasetUrlField": {
            "title": "Field with the page URL (dataset)",
            "type": "string",
            "description": "Only with datasetId: the item field that holds the page URL, e.g. `url`, or a dotted path such as `metadata.url`. Leave empty (the default) to find it automatically: the first of url, pageUrl, link, website and loadedUrl that has a web address in the first 100 items, then the same names one level down."
          },
          "contentScope": {
            "title": "Part of the page",
            "enum": [
              "main",
              "page"
            ],
            "type": "string",
            "description": "Default `main`: the page's main content, found the way reader views find it, so a new menu item, cookie banner or footer link isn't reported as a change. `page`: all visible text, menus and footers included. Ignored when cssSelector is set.",
            "default": "main"
          },
          "cssSelector": {
            "title": "Only this part of the page (CSS selector)",
            "type": "string",
            "description": "Default empty. Watch only the elements matching this CSS selector, e.g. `#pricing`, `.product-price` or `main table`; several matches are watched together, in page order. A page where it matches nothing is reported as failed (not charged)."
          },
          "ignorePatterns": {
            "title": "Ignore text matching",
            "type": "array",
            "description": "Default empty. Regular expressions (case-insensitive) for text that changes without meaning anything, e.g. `\\d+ (views|comments)`, `updated \\d+ minutes ago` or `\\d{1,2}:\\d{2}`. Each match is replaced by … before pages are compared, so a page whose only change is in that text is unchanged.",
            "items": {
              "type": "string"
            }
          },
          "watchFor": {
            "title": "Only report changes that mention",
            "type": "array",
            "description": "Default empty (every change is reported). Words or phrases, case-insensitive: a changed page is returned only when one of them is in an added or removed line, e.g. `price`, `out of stock`, `deadline`. Other changes are remembered and charged as an unchanged check, not returned.",
            "items": {
              "type": "string"
            }
          },
          "includeLinks": {
            "title": "Count changed link addresses as changes",
            "type": "boolean",
            "description": "Default false: a link's text is compared, not its address, because tracking parameters and session ids in links change on every visit. Turn it on to also report a link that now points somewhere else.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Default empty. Which memory this run compares with. A saved task gets its own memory automatically; runs started without a task (API calls, the Console form) share one called `default`. Give each monitor its own name when you run several without tasks, so they don't compare with each other's last run. The memory is kept in a key-value store named website-change-monitor-memory in your account."
          },
          "maxResults": {
            "title": "Max pages per run",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after checking this many pages, e.g. 50. Minimum 1; leave empty (the default) for no limit. The run also stops cleanly at the maximum cost per run you set in the run options, whichever comes first; pages not checked are checked next run."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}