{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap URL Extractor: All Pages, New & Removed URLs",
    "description": "Get every URL of a website: from sitemaps (index, gzip) or a polite crawl when there is none. Flags new and removed pages between runs, checks HTTP status, many domains per run. Respects robots.txt. $0.15–$0.30 per 1,000 URLs.",
    "version": "1.0",
    "x-build-id": "oTxifAX6VBqgwgrDT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/urlwright~sitemap-url-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-urlwright-sitemap-url-extractor",
        "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/urlwright~sitemap-url-extractor/runs": {
      "post": {
        "operationId": "runs-sync-urlwright-sitemap-url-extractor",
        "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/urlwright~sitemap-url-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-urlwright-sitemap-url-extractor",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Domains or sitemap URLs",
            "type": "array",
            "description": "List of domains (example.com), site origins (https://example.com), or direct sitemap URLs (https://example.com/sitemap.xml).",
            "items": {
              "type": "string"
            }
          },
          "checkStatus": {
            "title": "Check HTTP status for each URL",
            "type": "boolean",
            "description": "When enabled, perform a polite HEAD (GET fallback) status check per extracted URL.",
            "default": false
          },
          "maxUrls": {
            "title": "Max URLs",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Hard cap on URLs written to the dataset across the whole run.",
            "default": 10000
          },
          "maxSitemapDepth": {
            "title": "Max sitemap index depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How deep to follow nested sitemap indexes (0 = only leaf urlsets from the first level).",
            "default": 5
          },
          "crawlFallback": {
            "title": "Crawl fallback",
            "enum": [
              "off",
              "whenNoSitemap",
              "always"
            ],
            "type": "string",
            "description": "When to BFS-crawl for href/canonical links: off | whenNoSitemap (also if sitemap yields 0 URLs) | always. Crawl always honors robots.txt + crawl-delay per host. Default whenNoSitemap.",
            "default": "whenNoSitemap"
          },
          "includeSubdomains": {
            "title": "Include subdomains in crawl",
            "type": "boolean",
            "description": "When true, crawl (including redirect hops) may follow subdomains of the same registrable domain (Public Suffix List, e.g. beispiel.de → shop.beispiel.de). Foreign domains are never followed. Each subdomain uses its own robots.txt. Default false = exact hostname only.",
            "default": false
          },
          "maxCrawlPages": {
            "title": "Max crawl pages",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Max HTML pages to fetch during crawl fallback (PPE crawled-page charged per successful page).",
            "default": 100
          },
          "maxCrawlDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Max link depth from the site origin during crawl fallback (0 = homepage only).",
            "default": 2
          },
          "compareWithPrevious": {
            "title": "Compare with previous run",
            "type": "boolean",
            "description": "Store the URL set per domain in a named key-value store and set changeStatus (new|removed|unchanged). Ideal for Apify Schedules.",
            "default": false
          },
          "onlyChanges": {
            "title": "Only output changes",
            "type": "boolean",
            "description": "When compareWithPrevious is on, write only new and removed URLs (skip unchanged). Cheaper for scheduled monitoring.",
            "default": false
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Max parallel HTTP requests for status checks, sitemap fetches, and crawl pages.",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout per HTTP request.",
            "default": 20
          },
          "requestsPerSecond": {
            "title": "Requests per second (polite rate limit)",
            "minimum": 0.5,
            "maximum": 20,
            "type": "number",
            "description": "Per-host polite rate limit (minimum 0.5). Combined with robots.txt crawl-delay when present (stricter wins). Domains whose robots.txt crawl-delay exceeds 10 seconds are skipped.",
            "default": 2
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Honor Disallow / crawl-delay for sitemap discovery, sitemap URL extraction, and status checks. Crawl fallback always respects robots.txt (and crawl-delay) per host, regardless of this option. Always recommended.",
            "default": true
          },
          "userAgent": {
            "title": "User-Agent",
            "type": "string",
            "description": "HTTP User-Agent used for all requests.",
            "default": "UrlwrightBot/1.0 (sitemap; +https://urlwright.com/bot)"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}