{
  "openapi": "3.0.1",
  "info": {
    "title": "XML Sitemap Extractor to CSV & New-URL Monitor",
    "description": "Extract every URL from any site's XML sitemaps to CSV, Excel or JSON (robots.txt discovery, nested indexes, .gz, txt, RSS, broken XML) with lastmod, images, news and hreflang. Changes mode returns only new, removed and updated URLs since the last run: schedule it to monitor competitors.",
    "version": "1.0",
    "x-build-id": "Rm1l5sPVupzhDeNFI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/adamhaleworks~sitemap-extractor-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-adamhaleworks-sitemap-extractor-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/adamhaleworks~sitemap-extractor-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-adamhaleworks-sitemap-extractor-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/adamhaleworks~sitemap-extractor-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-adamhaleworks-sitemap-extractor-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",
        "required": [
          "sites"
        ],
        "properties": {
          "sites": {
            "title": "Sites or sitemap URLs",
            "type": "array",
            "description": "Domains (example.com), site URLs or direct sitemap URLs (https://example.com/sitemap_index.xml). For domains, sitemaps are found via robots.txt and common paths.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "all",
              "changes"
            ],
            "type": "string",
            "description": "\"All URLs\" returns every URL in the sitemaps. \"Changes only\" remembers the previous run and returns only new, removed and updated URLs. Schedule it daily to monitor sites.",
            "default": "all"
          },
          "emitBaselineOnFirstRun": {
            "title": "Output all URLs on the first monitoring run",
            "type": "boolean",
            "description": "In \"Changes only\" mode, the first run for a site has nothing to compare with. If on, it outputs all URLs with changeType \"baseline\". If off, it saves the snapshot silently and outputs nothing for that site.",
            "default": true
          },
          "trackLastmodChanges": {
            "title": "Report updated pages (lastmod changed)",
            "type": "boolean",
            "description": "In \"Changes only\" mode, also report URLs whose <lastmod> date changed.",
            "default": true
          },
          "includeRemoved": {
            "title": "Report removed URLs",
            "type": "boolean",
            "description": "In \"Changes only\" mode, also report URLs that disappeared from the sitemaps. They are skipped automatically when some sitemaps failed to load, to avoid false alarms.",
            "default": true
          },
          "snapshotStoreName": {
            "title": "Snapshot store name",
            "type": "string",
            "description": "Named key-value store (in your account) that keeps the previous URL list per site for \"Changes only\" mode. Use different names for independent monitors.",
            "default": "sitemap-monitor-snapshots"
          },
          "includePatterns": {
            "title": "Include URL patterns (regex)",
            "type": "array",
            "description": "Only keep URLs matching at least one of these regular expressions, for example /blog/ or /products/.",
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Exclude URL patterns (regex)",
            "type": "array",
            "description": "Drop URLs matching any of these regular expressions, for example /tag/ or \\?page=.",
            "items": {
              "type": "string"
            }
          },
          "lastmodAfter": {
            "title": "Only URLs modified after",
            "type": "string",
            "description": "Keep only URLs whose <lastmod> is on or after this date (2026-09-01) or within a relative period (\"7 days\", \"24 hours\"). URLs without lastmod are dropped when this is set."
          },
          "maxUrlsPerSite": {
            "title": "Max URLs per site",
            "minimum": 0,
            "maximum": 5000000,
            "type": "integer",
            "description": "Stop reading a site's sitemaps after this many URLs (0 = up to 5,000,000).",
            "default": 100000
          },
          "includeExtensions": {
            "title": "Include image, video, news and hreflang data",
            "type": "boolean",
            "description": "Add image URLs (first 10 and the total count), video details, Google News title and date, and hreflang alternates when the sitemap has them.",
            "default": true
          },
          "checkStatus": {
            "title": "Check HTTP status of output URLs",
            "type": "boolean",
            "description": "Send a HEAD request (no redirects followed) to each output URL and add statusCode, redirectLocation and X-Robots-Tag. Free while in launch; under the planned pricing, charged per URL checked. URLs that robots.txt disallows for this actor are skipped, and URLs the site refuses (HTTP 403, 429 or a bot challenge) are marked BLOCKED_BY_SITE; neither is charged.",
            "default": false
          },
          "maxStatusChecks": {
            "title": "Max status checks per run",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Upper limit on status checks in one run.",
            "default": 10000
          },
          "statusConcurrency": {
            "title": "Status check concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Parallel status checks. Keep this low to be gentle with the target sites.",
            "default": 10
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt for guessed sitemap paths",
            "type": "boolean",
            "description": "Skip guessed sitemap locations that robots.txt disallows. Sitemaps declared in robots.txt and sitemap URLs you enter are always read. Status checks always follow robots.txt.",
            "default": true
          },
          "maxSitemapsPerSite": {
            "title": "Max sitemap files per site",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Safety limit for huge sitemap indexes.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Sites in parallel",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many sites are processed at the same time.",
            "default": 5
          },
          "sitemapConcurrency": {
            "title": "Sitemap files in parallel per site",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many sitemap files of one site are downloaded at the same time.",
            "default": 4
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Timeout per HTTP request. Large sitemaps can take a while to download.",
            "default": 30
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Retries for network errors, HTTP 429 and 5xx responses, with exponential backoff.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}