{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap Monitor: New, Updated & Removed Pages Tracker",
    "description": "Watch the sitemaps of any website (competitors, clients, your own) and get the new, updated and removed pages since the last run. Finds sitemaps in robots.txt, follows sitemap indexes, reads .xml.gz and text sitemaps. Respects robots.txt.",
    "version": "0.1",
    "x-build-id": "o0yNVOsDhkt4Oyjgc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/latamdatatools~sitemap-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-latamdatatools-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/latamdatatools~sitemap-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-latamdatatools-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/latamdatatools~sitemap-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-latamdatatools-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 or sitemap URLs",
            "type": "array",
            "description": "One per line: a domain (example.com), a homepage, or a sitemap URL (sitemap.xml, sitemap_index.xml, .xml.gz, .txt). For a domain, sitemaps are found in robots.txt and at the usual paths.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset (from another Actor run)",
            "type": "string",
            "description": "Optional: read the websites from an Apify dataset. Use \"URL field\" to say which field holds the URL or domain."
          },
          "csvUrl": {
            "title": "CSV file URL",
            "type": "string",
            "description": "Optional: public CSV with a header row (or just one URL per line). Google Sheets links work if shared as \"Anyone with the link\"."
          },
          "urlField": {
            "title": "URL field",
            "type": "string",
            "description": "Field / column with the website or sitemap URL.",
            "default": "url"
          },
          "outputMode": {
            "title": "What to output",
            "enum": [
              "changes",
              "all"
            ],
            "type": "string",
            "description": "Only changes: new, updated (lastmod changed) and removed pages since the previous run. All URLs: every URL, each with its change type.",
            "default": "changes"
          },
          "outputBaselineOnFirstRun": {
            "title": "Output all URLs on the first run",
            "type": "boolean",
            "description": "The first run of a site saves a baseline. On: the baseline URLs are also returned (changeType = baseline). Off: the first run only saves it (nothing charged) and later runs report changes.",
            "default": true
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Snapshots are stored per monitor name in the named key-value store \"sitemap-monitor-state\". Use different names for separate monitors of the same site (e.g. with different filters).",
            "default": "default"
          },
          "includeUrlPatterns": {
            "title": "Only URLs containing",
            "type": "array",
            "description": "Optional: keep only URLs that contain one of these texts, e.g. /blog/. Regular expressions between slashes work too: /\\/product\\/\\d+/.",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Skip URLs containing",
            "type": "array",
            "description": "Optional: drop URLs that contain one of these texts, e.g. /tag/.",
            "items": {
              "type": "string"
            }
          },
          "maxUrlsPerSite": {
            "title": "Max URLs per site",
            "minimum": 10,
            "maximum": 500000,
            "type": "integer",
            "description": "Stop reading a site's sitemaps after this many URLs (removed pages are then not reported for that site).",
            "default": 50000
          },
          "maxSitemapsPerSite": {
            "title": "Max sitemap files per site",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after reading this many sitemap files for one site.",
            "default": 500
          },
          "maxConcurrency": {
            "title": "Sites in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many sites are read at the same time (requests to one host are always spaced).",
            "default": 3
          },
          "minDelayMs": {
            "title": "Delay between requests to the same host (ms)",
            "minimum": 200,
            "maximum": 10000,
            "type": "integer",
            "description": "Politeness. A Crawl-delay in robots.txt is respected when it is longer.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}