{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap URL Extractor: All URLs from XML Sitemaps & Changes",
    "description": "Extract all URLs from a website's XML sitemaps: finds them via robots.txt, follows sitemap indexes, reads .xml.gz. Returns lastmod, changefreq, priority, image, news, video and hreflang data. Filter by URL pattern and date, or monitor sitemap changes: only new and removed URLs since the last run.",
    "version": "1.3",
    "x-build-id": "PCjRrANFXaeWVjRGx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/humble-echidna~sitemap-urls/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-humble-echidna-sitemap-urls",
        "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/humble-echidna~sitemap-urls/runs": {
      "post": {
        "operationId": "runs-sync-humble-echidna-sitemap-urls",
        "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/humble-echidna~sitemap-urls/run-sync": {
      "post": {
        "operationId": "run-sync-humble-echidna-sitemap-urls",
        "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": {
          "sites": {
            "title": "Websites or sitemap URLs",
            "type": "array",
            "description": "One per line. A domain or site address (example.com, https://www.example.com/) finds the site's sitemaps through its robots.txt, then /sitemap.xml and /sitemap_index.xml. A sitemap address (https://example.com/sitemap.xml, .xml.gz or a plain-text .txt sitemap) is read directly. Sitemap indexes are followed automatically. API callers may also send the list as `startUrls` (strings or {\"url\": ...} objects). Ignored when datasetId is set.",
            "default": [
              "sitemaps.org"
            ],
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Or: websites from a dataset (chain after another actor)",
            "type": "string",
            "description": "Default empty. One of your Apify datasets, picked here or given by id, e.g. a Google Maps scraper's results; to chain this actor after another in an integration, `{{resource.defaultDatasetId}}`. Each item's website becomes a line of sites (sites is ignored): its home page, or a sitemap URL as given. A site shared by several items is read once. Each URL carries sourceTitle, sourcePlaceId and sourceIndex from its item. Reads at most 20,000 items and 10,000 websites, read-only."
          },
          "datasetUrlField": {
            "title": "Field with the website (dataset)",
            "type": "string",
            "description": "Only with datasetId: the item field that holds the website, e.g. `website`, or a dotted path such as `contact.website`. Leave empty (the default) to find it automatically: the first of website, url, domain, site and homepage that has a website in the first 100 items, then the same names one level down (contact.website). Google Maps links are never used."
          },
          "includeUrlPatterns": {
            "title": "Only URLs matching",
            "type": "array",
            "description": "Keep only URLs that match at least one of these patterns. * matches anything (https://example.com/blog/*); a pattern without * matches anywhere in the URL (/blog/). Case-insensitive. Leave empty to keep every URL.",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Skip URLs matching",
            "type": "array",
            "description": "Drop URLs that match any of these patterns (same syntax as above), e.g. /tag/ or *.pdf. Skipped URLs are not charged.",
            "items": {
              "type": "string"
            }
          },
          "lastmodAfter": {
            "title": "Last modified on or after",
            "type": "string",
            "description": "Keep only URLs whose sitemap <lastmod> is on or after this date: 2026-01-31, a full timestamp (2026-01-31T12:00:00Z), or a relative time like 7 days, 2 weeks, 3 months. Dates without a time zone count as UTC."
          },
          "lastmodBefore": {
            "title": "Last modified before",
            "type": "string",
            "description": "Keep only URLs whose sitemap <lastmod> is before this date (same formats as above)."
          },
          "keepUrlsWithoutLastmod": {
            "title": "Keep URLs without a lastmod date",
            "type": "boolean",
            "description": "When a date filter is set, URLs whose sitemap gives no (or an unreadable) <lastmod> are dropped. Turn this on to keep them. Has no effect without a date filter.",
            "default": false
          },
          "onlyNewAndRemovedUrls": {
            "title": "Only new and removed URLs since the last run",
            "type": "boolean",
            "description": "Monitor the sitemaps: return only URLs that weren't listed on the previous run of this same input (changeType new) and URLs that are no longer listed (changeType removed); URLs listed both times are counted, not returned or charged. The list is kept per site and settings in your own account's key-value store \"sitemap-urls-memory\". The first run returns every URL (the baseline). Removed URLs are only reported when every sitemap was read completely. Can't be combined with the lastmod date filters.",
            "default": false
          },
          "maxResults": {
            "title": "Max results per run",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many URLs in total. Leave empty for no limit. The run also stops cleanly at the maximum cost per run you set in the run options, whichever comes first. Either way it stops fetching sitemaps, not just writing results."
          },
          "maxSitemapsPerSite": {
            "title": "Max sitemap files per site",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The most sitemap files (indexes included) read for each line of input, 1 to 10,000 (default 200). Very large sites split their URLs over hundreds of files; raise this to get all of them.",
            "default": 200
          },
          "maxDepth": {
            "title": "Max sitemap index depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many levels of nested sitemap indexes to follow, 0 to 10 (default 3). 0 reads only the sitemaps you gave or that robots.txt lists. Most sites need 1; 3 covers indexes of indexes.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}