{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap Extractor & Change Monitor (new/removed/updated URLs)",
    "description": "Extract every URL from any website's sitemaps (robots.txt, sitemap index, nested, .gz, news/image/video, RSS/Atom fallback) with lastmod, changefreq and priority. Schedule it to get only added, removed and updated URLs, and optional page-content change checks.",
    "version": "0.1",
    "x-build-id": "azCY47AuEPaL90W5j"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datlab~sitemap-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datlab-sitemap-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/datlab~sitemap-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-datlab-sitemap-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/datlab~sitemap-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-datlab-sitemap-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": {
          "startUrls": {
            "title": "Websites",
            "type": "array",
            "description": "Domains or any page URL (e.g. `example.com`, `https://www.example.com/blog`). Sitemaps are found from robots.txt `Sitemap:` lines, then common paths (/sitemap.xml, /sitemap_index.xml, /wp-sitemap.xml, …), then RSS/Atom feeds. A URL that is itself a sitemap or feed (ends in .xml, .xml.gz, .txt, /feed …) is read directly.",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrls": {
            "title": "Sitemap or feed URLs",
            "type": "array",
            "description": "Optional. Exact sitemap, sitemap index, .gz, RSS or Atom URLs to read as-is (no discovery).",
            "items": {
              "type": "string"
            }
          },
          "includePatterns": {
            "title": "Include URLs matching",
            "type": "array",
            "description": "Keep only URLs matching at least one pattern. Plain text or a path like `/blog/` = substring (case-insensitive); `*` = wildcard over the whole URL (e.g. `https://example.com/blog/*`); `/regex/i` = regular expression.",
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Exclude URLs matching",
            "type": "array",
            "description": "Drop URLs matching any of these patterns (same syntax as include).",
            "items": {
              "type": "string"
            }
          },
          "maxUrls": {
            "title": "Max URLs per site",
            "minimum": 0,
            "type": "integer",
            "description": "Stop reading a site after this many URLs (after filters). 0 = no limit. When the cap is hit, the newest child sitemaps (by lastmod) are read first and removals are not reported for that run.",
            "default": 10000
          },
          "maxSitemapsPerSite": {
            "title": "Max sitemap files per site",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Safety cap on the number of sitemap files (including nested ones) read per site.",
            "default": 500
          },
          "discoverSitemaps": {
            "title": "Probe common sitemap paths",
            "type": "boolean",
            "description": "When robots.txt lists no sitemap, try /sitemap.xml, /sitemap_index.xml, /wp-sitemap.xml, /sitemap.xml.gz, /sitemap.txt and similar.",
            "default": true
          },
          "rssFallback": {
            "title": "Fall back to RSS/Atom feeds",
            "type": "boolean",
            "description": "When no sitemap exists, use the RSS/Atom feed linked from the home page (or /feed, /rss.xml, /atom.xml …).",
            "default": true
          },
          "includeExtensions": {
            "title": "Include news / image / video fields",
            "type": "boolean",
            "description": "Add Google News (title, publication, date), image URLs and video titles when the sitemap has them.",
            "default": true
          },
          "trackChanges": {
            "title": "Monitor changes between runs",
            "type": "boolean",
            "description": "Save the URL list after each run and mark every URL as added, lastmodChanged or unchanged, plus removed URLs. The first run records the baseline.",
            "default": false
          },
          "onlyChanges": {
            "title": "Output only changes",
            "type": "boolean",
            "description": "Output only added, removed and lastmod-changed URLs (and changed pages). Turns on monitoring. Ideal for schedules + webhooks/integrations.",
            "default": false
          },
          "outputBaseline": {
            "title": "Output all URLs on the first (baseline) run",
            "type": "boolean",
            "description": "With 'Output only changes', the first run normally outputs nothing and only records the baseline. Turn on to output the full list on that run too.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the saved state. Use a different name for each separate monitor (e.g. per task/schedule). State is kept in your named key-value store `sitemap-change-monitor-state`.",
            "default": "default"
          },
          "pageCheckUrls": {
            "title": "Pages to check for content changes",
            "type": "array",
            "description": "Optional. These pages are downloaded and their main text is hashed (scripts, navigation, header/footer removed) to detect content changes between runs. Max 1000. Respects robots.txt.",
            "items": {
              "type": "string"
            }
          },
          "pageCheckOnlyChanged": {
            "title": "Only check pages whose sitemap entry changed",
            "type": "boolean",
            "description": "With monitoring on, fetch only pages from the list that are new or whose sitemap lastmod changed (plus never-checked pages). Saves requests and cost.",
            "default": false
          },
          "pageCheckDetails": {
            "title": "Include title & meta",
            "type": "boolean",
            "description": "Also compare and output title, meta description, canonical URL and meta robots.",
            "default": true
          },
          "contentSelector": {
            "title": "Content CSS selector",
            "type": "string",
            "description": "Optional. Hash only the text inside this CSS selector (e.g. `#pricing`, `article .price`). Default: <main>, [role=main] or <article>, else the body without header/footer/nav."
          },
          "ignoreTextPatterns": {
            "title": "Ignore text matching",
            "type": "array",
            "description": "Text removed before hashing so it doesn't count as a change, e.g. `/\\d+ views/` or `Last updated`. Plain text or `/regex/flags`.",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel requests across all sites.",
            "default": 5
          },
          "perHostDelaySecs": {
            "title": "Seconds between requests to the same host",
            "minimum": 0.25,
            "maximum": 60,
            "type": "number",
            "description": "Polite per-host delay (min 0.25). A robots.txt Crawl-delay is honoured up to 30 s.",
            "default": 1
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute (total)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Upper limit on requests per minute across all hosts. A host's robots.txt Crawl-delay is always respected on top of this.",
            "default": 120
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed: sitemaps are public. Use a proxy only if a site blocks datacenter IPs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}