{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap Change Monitor: New, Removed & Broken URLs",
    "description": "Sitemap change monitor: compare any XML sitemap, sitemap index or robots.txt with the last snapshot. Get new URLs, removed URLs, changed lastmod and optional HTTP status checks for broken links. Built for scheduled monitoring of sitemap changes.",
    "version": "1.0",
    "x-build-id": "chABhe3849QhkDFj2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ferrolark~sitemap-delta/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ferrolark-sitemap-delta",
        "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/ferrolark~sitemap-delta/runs": {
      "post": {
        "operationId": "runs-sync-ferrolark-sitemap-delta",
        "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/ferrolark~sitemap-delta/run-sync": {
      "post": {
        "operationId": "run-sync-ferrolark-sitemap-delta",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Sitemap or website URLs",
            "type": "array",
            "description": "Sitemap URLs (XML, sitemap index, .xml.gz or plain-text) or website URLs. For a website URL the sitemaps are discovered from robots.txt, with /sitemap.xml as fallback.",
            "items": {
              "type": "string"
            }
          },
          "snapshotName": {
            "title": "Snapshot name",
            "type": "string",
            "description": "Name of the saved snapshot to compare against and update. Defaults to the host of the first URL. Use different names to track different sections of the same site."
          },
          "compareWithStoredSnapshot": {
            "title": "Compare with the stored snapshot",
            "type": "boolean",
            "description": "Compare with the snapshot saved by the previous run under the same name (stored in your account, key-value store \"sitemap-delta-snapshots\").",
            "default": true
          },
          "previousSnapshotUrl": {
            "title": "Previous snapshot URL (optional)",
            "type": "string",
            "description": "Compare against a JSON file instead: a snapshot from this Actor, a JSON array of URLs, or an array of {url, lastmod} objects. Gzip is fine."
          },
          "previousDatasetId": {
            "title": "Previous dataset ID (optional)",
            "type": "string",
            "description": "Compare against the dataset of an earlier run (baseline/unchanged/added rows are used as the previous URL list)."
          },
          "saveSnapshot": {
            "title": "Save this run as the new snapshot",
            "type": "boolean",
            "description": "Store the current URL list for the next run. Partial runs (sitemap errors or limits) never overwrite the snapshot.",
            "default": true
          },
          "firstRunOutput": {
            "title": "First run output",
            "enum": [
              "inventory",
              "silent"
            ],
            "type": "string",
            "description": "When there is no previous snapshot: 'inventory' writes every URL as a 'baseline' row (charged per row); 'silent' only saves the snapshot (you pay only for sitemaps).",
            "default": "inventory"
          },
          "includeUnchanged": {
            "title": "Include unchanged URLs",
            "type": "boolean",
            "description": "Also output URLs that did not change (charged per row).",
            "default": false
          },
          "checkStatus": {
            "title": "Check HTTP status",
            "enum": [
              "none",
              "added",
              "changes",
              "all"
            ],
            "type": "string",
            "description": "Send a HEAD request (GET fallback) to find broken URLs. Redirects are reported, not followed. Charged per checked URL.",
            "default": "none"
          },
          "maxStatusChecks": {
            "title": "Max status checks",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper bound on HTTP status checks per run.",
            "default": 500
          },
          "includePattern": {
            "title": "Include URLs matching (regex)",
            "type": "string",
            "description": "Only keep URLs matching this regular expression, for example /blog/."
          },
          "excludePattern": {
            "title": "Exclude URLs matching (regex)",
            "type": "string",
            "description": "Drop URLs matching this regular expression, for example \\?page=."
          },
          "maxUrls": {
            "title": "Max URLs",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Stop collecting after this many unique URLs. Hitting the limit makes the run partial.",
            "default": 50000
          },
          "maxSitemaps": {
            "title": "Max sitemap files",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on sitemap files downloaded (index files count too).",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}