{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Change Monitor: Competitor Pricing & Terms",
    "description": "Track competitors' pricing, terms and privacy, careers, changelog and sitemap pages on a schedule and get only meaningful changes: plan and price changes, changed legal sections, new pages and roles, each with a plain-English summary, severity and webhook alert. $0.30 per 1,000 page checks.",
    "version": "1.0",
    "x-build-id": "9WVr5tbNjF6fIiuk4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fairquery~competitor-change-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fairquery-competitor-change-tracker",
        "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/fairquery~competitor-change-tracker/runs": {
      "post": {
        "operationId": "runs-sync-fairquery-competitor-change-tracker",
        "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/fairquery~competitor-change-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-fairquery-competitor-change-tracker",
        "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 to watch",
            "type": "array",
            "description": "Competitor pages to track. Each item: {\"url\": \"https://example.com/pricing\", \"type\": \"pricing\", \"label\": \"Acme pricing\", \"cssSelector\": \"#pricing\"}. type is optional (auto-detected from the URL): pricing, terms, privacy, careers, changelog, blog, product (a sitemap URL or a site root = new/removed pages via sitemap.xml) or generic. cssSelector is optional and limits the comparison to that DOM region. A plain URL string also works."
          },
          "urls": {
            "title": "URLs (page type auto-detected)",
            "type": "array",
            "description": "Optional plain list of URLs. The page type is guessed from the path (/pricing, /terms, /privacy, /careers, /changelog, /blog, sitemap.xml); anything else is tracked as a generic page.",
            "items": {
              "type": "string"
            }
          },
          "domains": {
            "title": "Competitor domains (auto-discover pages)",
            "type": "array",
            "description": "Optional. For each domain (e.g. acme.com) the Actor reads the homepage links once (robots.txt respected) to find the page types below, falling back to at most 2 common paths per type. Results are cached for 30 days in your state store. Discovery requests are free.",
            "items": {
              "type": "string"
            }
          },
          "pageTypes": {
            "title": "Page types to discover for domains",
            "type": "array",
            "description": "Which pages to look for on each domain. product = new or removed pages in the site's sitemap.xml.",
            "items": {
              "type": "string",
              "enum": [
                "pricing",
                "product",
                "terms",
                "privacy",
                "careers",
                "changelog",
                "blog"
              ],
              "enumTitles": [
                "Pricing",
                "Product pages (sitemap diff)",
                "Terms of service",
                "Privacy policy",
                "Careers / jobs",
                "Changelog / release notes",
                "Blog / news"
              ]
            },
            "default": [
              "pricing",
              "terms",
              "privacy",
              "careers",
              "changelog",
              "product"
            ]
          },
          "mode": {
            "title": "Run mode",
            "enum": [
              "watch",
              "digest"
            ],
            "type": "string",
            "description": "watch writes one dataset row per page change. digest still checks pages, then writes one row per competitor domain combining pricing, terms and changelog changes with technologies added or removed (Website Tech, SEO and AI Readiness). Each digest row includes since (ISO time of the previous successful digest for this watchlist, or null on the first run), changes_count, changed and is_baseline. The first digest is a baseline, not a quiet result. In digest mode a webhook receives one payload per domain.",
            "default": "watch"
          },
          "digestTech": {
            "title": "Digest: tech-stack changes",
            "type": "boolean",
            "description": "In digest mode, call fairquery/website-tech-seo-ai-readiness and report technologies added or removed since the last digest for this watchlist. That Actor bills $1.50 per 1,000 sites on the free plan. Ignored in watch mode.",
            "default": true
          },
          "cssSelector": {
            "title": "CSS selector for page watches",
            "type": "string",
            "description": "Optional CSS selector applied to every page that does not set its own cssSelector. Only that DOM region is compared, for example \"#pricing\" or \"main .plans\". A per-page cssSelector overrides this. Invalid selectors are reported and those pages are not checked. Maximum 300 characters."
          },
          "watchlistName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Name of this watchlist. Page baselines and, in digest mode, the previous successful digest time are stored under this name in your Apify key-value store (stateStoreName). Use the same name on every run. The store stays in your account until you delete it. This Actor does not send that state to Fairquery.",
            "default": "default"
          },
          "maxPages": {
            "title": "Max pages per run",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Safety cap on pages checked in one run (explicit + discovered). Extra pages are listed as skipped, not charged.",
            "default": 50
          },
          "minSeverity": {
            "title": "Minimum severity to output",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "Only changes at or above this level are written to the dataset (and charged). high = price changes, plans added/removed, sensitive legal edits; medium = notable text, product-page, hiring or keyword changes; low = minor edits, routine new posts.",
            "default": "low"
          },
          "careersKeywords": {
            "title": "Careers keywords",
            "type": "array",
            "description": "Words to count in job titles (e.g. 'machine learning', 'Kubernetes', 'Germany'). Count changes are reported; new roles matching a keyword raise severity to medium.",
            "items": {
              "type": "string"
            }
          },
          "watchKeywords": {
            "title": "Keywords to watch on every page",
            "type": "array",
            "description": "Alert (medium) when one of these words appears on or disappears from a page, e.g. 'free trial', 'SOC 2', 'AI', 'per seat'. Whole-word, case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "ignorePatterns": {
            "title": "Extra noise patterns to ignore (regex)",
            "type": "array",
            "description": "Optional regular expressions (max 20, 200 chars each) removed from text before comparing, for page-specific noise such as rotating promo banners. Timestamps, dates, relative times, tokens, cookie banners, navigation and footers are already ignored.",
            "items": {
              "type": "string"
            }
          },
          "minChangeChars": {
            "title": "Minimum changed characters (non-legal pages)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Text edits smaller than this (after noise filtering) are not reported on generic, product, careers and blog pages; small edits accumulate against the old snapshot until they cross it. Legal pages use 10, pricing uses structured price comparison.",
            "default": 20
          },
          "includeDiff": {
            "title": "Include changed sentences",
            "type": "boolean",
            "description": "Add the added/removed sentences per changed section to each change row.",
            "default": true
          },
          "webhookUrl": {
            "title": "Alert webhook URL (optional)",
            "type": "string",
            "description": "Public HTTPS URL that receives one POST per run when there are changes at or above the webhook severity (Slack/Discord incoming webhooks, n8n, Make, Zapier, your API). Stored as a secret."
          },
          "webhookFormat": {
            "title": "Webhook format",
            "enum": [
              "json",
              "slack",
              "discord"
            ],
            "type": "string",
            "description": "json = {watchlist, count, text, changes[]}; slack = {text}; discord = {content}.",
            "default": "json"
          },
          "webhookMinSeverity": {
            "title": "Webhook minimum severity",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "Only changes at or above this level are sent to the webhook.",
            "default": "medium"
          },
          "renderJs": {
            "title": "Headless browser fallback",
            "enum": [
              "never",
              "auto",
              "always"
            ],
            "type": "string",
            "description": "never = plain HTTP only (cheapest). auto = render with a headless browser only when plain HTML has no readable prices (pricing pages) or almost no text (JavaScript-only pages); robots.txt still applies. always = render every page. Browser rendering needs a run with at least 1024 MB memory and is charged per rendered page.",
            "default": "never"
          },
          "confirmChanges": {
            "title": "Confirm changes with a second read",
            "type": "boolean",
            "description": "When a change is found on a plain HTML page, read the page once more (after the polite delay) and report only changes seen on both reads. Filters out A/B tests and rotating page variants. The extra read is not charged.",
            "default": true
          },
          "sitemapInclude": {
            "title": "Sitemap URL include patterns (regex)",
            "type": "array",
            "description": "For product (sitemap) tracking: only URLs matching one of these patterns are tracked, e.g. '/features/', '/integrations/'. Empty = all URLs.",
            "items": {
              "type": "string"
            }
          },
          "sitemapExclude": {
            "title": "Sitemap URL exclude patterns (regex)",
            "type": "array",
            "description": "For product (sitemap) tracking: URLs matching these are ignored, e.g. '/blog/', '/de/'.",
            "items": {
              "type": "string"
            }
          },
          "maxSitemapFiles": {
            "title": "Max sitemap files per site",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Sitemap indexes can list many files; each file read counts as one page check. If the cap is hit, removed pages are not reported for that run.",
            "default": 10
          },
          "requestDelaySecs": {
            "title": "Delay between requests to one site (seconds)",
            "minimum": 1,
            "maximum": 30,
            "type": "number",
            "description": "Politeness delay between requests to the same host (minimum 1 s). A longer robots.txt Crawl-delay always wins; sites asking for more than 30 s are skipped.",
            "default": 1.5
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store in your Apify account that keeps snapshots between runs (one store can hold many watchlists). Digest mode also stores the last successful digest time and the detected-technology list for each watchlistName in this store. Nothing is copied to Fairquery.",
            "default": "fairquery-competitor-tracker"
          },
          "resetBaseline": {
            "title": "Reset baseline",
            "type": "boolean",
            "description": "Ignore stored snapshots and save a fresh baseline for every page in this run (no changes are reported).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}