{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap URL Extractor: All Website URLs from Sitemaps",
    "description": "Sitemap URL extractor: get all URLs of a website from its XML sitemaps, with status code checking and change mode reporting new, removed and updated pages since the last run. Never charges for a failed or empty result.",
    "version": "0.1",
    "x-build-id": "pOBJrWtbJbgrQ0HZu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pavel.tashev~sitemap-url-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pavel.tashev-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/pavel.tashev~sitemap-url-extractor/runs": {
      "post": {
        "operationId": "runs-sync-pavel.tashev-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/pavel.tashev~sitemap-url-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-pavel.tashev-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": "Websites or sitemap URLs",
            "maxItems": 50,
            "type": "array",
            "description": "Websites or domains (for example apify.com; sitemaps are found automatically through robots.txt and the usual locations) or direct links to a sitemap, sitemap index, .xml.gz, .txt sitemap or RSS/Atom feed. Up to 50 websites per run; extra entries are ignored.",
            "items": {
              "type": "string"
            }
          },
          "maxUrls": {
            "title": "Maximum URLs per website",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Stop collecting from a website after this many URLs (after filters and duplicates are removed). Sitemap files themselves are never charged; a website is read up to 500 sitemap files per run.",
            "default": 10000
          },
          "changeMode": {
            "title": "Report changes since last run",
            "enum": [
              "off",
              "new",
              "new-and-removed"
            ],
            "type": "string",
            "description": "For scheduled monitoring. \"Off\" returns every URL. \"New and modified pages\" returns only URLs that were not in the sitemap last time, plus URLs whose lastmod date changed. \"New, modified and removed pages\" also returns URLs that disappeared. The previous URL list is kept per website in a key-value store named sitemap-url-extractor-state in your Apify account. You pay only for the changes returned.",
            "default": "off"
          },
          "firstRunOutput": {
            "title": "First run in change mode",
            "enum": [
              "all",
              "none"
            ],
            "type": "string",
            "description": "What to return the first time a website is monitored, when there is nothing to compare with yet. \"Return all URLs\" saves the baseline and returns every URL with changeType \"initial\" (charged). \"Save baseline only\" returns nothing and costs nothing; changes are reported from the next run.",
            "default": "all"
          },
          "removalSafetyPercent": {
            "title": "Removal safety threshold (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "If a website returns fewer URLs than this percentage of last run's count, the run assumes a sitemap failed to load: no pages are reported as removed and the saved URL list is kept. Set 0 to turn the check off.",
            "default": 50
          },
          "includePatterns": {
            "title": "Include URLs matching",
            "type": "array",
            "description": "Keep only URLs matching at least one pattern. Use a glob (*/blog/*), plain text (/products/) or a regular expression between slashes (/\\/20(25|26)\\//). Leave empty to keep all.",
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Exclude URLs matching",
            "type": "array",
            "description": "Drop URLs matching any pattern (same pattern syntax as above), for example */tag/* or /\\?page=/.",
            "items": {
              "type": "string"
            }
          },
          "lastmodAfter": {
            "title": "Modified after",
            "type": "string",
            "description": "Keep only URLs whose sitemap lastmod date is on or after this date (URLs without a lastmod date are dropped). Format: 2026-01-31."
          },
          "onlyDomain": {
            "title": "Only URLs on the same website",
            "type": "boolean",
            "description": "Drop URLs that point to other domains. Subdomains of the website are kept.",
            "default": true
          },
          "deduplicate": {
            "title": "Remove duplicate URLs",
            "type": "boolean",
            "description": "Save each URL once, even when it appears in several sitemaps. Duplicates are not charged.",
            "default": true
          },
          "includeExtensions": {
            "title": "Include images, videos and news data",
            "type": "boolean",
            "description": "Add image, video and Google News details from sitemap extensions when the sitemap has them.",
            "default": true
          },
          "checkStatus": {
            "title": "Check HTTP status of each URL",
            "type": "boolean",
            "description": "Request every URL (HEAD, falling back to GET) and save its status code and final URL after redirects. Slower, and charged as a separate event per URL checked.",
            "default": false
          },
          "statusConcurrency": {
            "title": "Parallel status checks",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many URLs are checked at the same time when status checks are on. Keep it low to be polite to the website.",
            "default": 5
          },
          "maxDepth": {
            "title": "Maximum sitemap index depth",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many levels of nested sitemap indexes to follow.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}