{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap URL Extractor: Get All URLs from sitemap.xml",
    "description": "Sitemap URL extractor: enter a website or a sitemap.xml and get all its URLs with lastmod, changefreq, priority, image count and optional hreflang. Finds sitemaps via robots.txt, follows sitemap indexes, reads .gz. Regex and date filters, only-new-URLs mode. Usable via Apify MCP. $0.20 per 1K URLs.",
    "version": "1.0",
    "x-build-id": "Fe68pe4XnR3yFdNyZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fecklesspleb~sitemap-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fecklesspleb-sitemap-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/fecklesspleb~sitemap-extractor/runs": {
      "post": {
        "operationId": "runs-sync-fecklesspleb-sitemap-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/fecklesspleb~sitemap-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-fecklesspleb-sitemap-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",
        "properties": {
          "startUrls": {
            "title": "Websites or sitemap URLs",
            "type": "array",
            "description": "A site (https://www.nasa.gov) to auto-discover its sitemaps, or a direct sitemap URL. Leave empty, or keep the sample NASA sitemap, for a default-mode run: up to 40 sample URLs from https://www.nasa.gov/wp-sitemap.xml at the normal per-URL price.",
            "default": [
              "https://www.nasa.gov/wp-sitemap.xml"
            ],
            "items": {
              "type": "string"
            }
          },
          "includePatterns": {
            "title": "Include URL patterns (regex)",
            "type": "array",
            "description": "Keep only page URLs matching at least one of these regular expressions (case-insensitive search anywhere in the URL), e.g. [\"/blog/\", \"/docs/\"]. An invalid regex fails the run before anything is fetched or charged.",
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Exclude URL patterns (regex)",
            "type": "array",
            "description": "Drop page URLs matching any of these regular expressions (case-insensitive), e.g. [\"/tag/\", \"\\\\?page=\"]. Applied after Include URL patterns.",
            "items": {
              "type": "string"
            }
          },
          "sitemapPatterns": {
            "title": "Only follow child sitemaps matching (regex)",
            "type": "array",
            "description": "For big sitemap indexes: follow only child sitemaps whose URL matches one of these regular expressions (case-insensitive), e.g. [\"post-sitemap\"]. Sitemaps listed in robots.txt, found at the usual paths or given directly are always read. Saves requests.",
            "items": {
              "type": "string"
            }
          },
          "lastmodAfter": {
            "title": "Changed after (date)",
            "type": "string",
            "description": "Keep URLs whose lastmod is on or after this date, YYYY-MM-DD (UTC), e.g. \"2026-10-01\". URLs with no lastmod are dropped unless you turn on Keep URLs without a lastmod."
          },
          "lastmodWithinDays": {
            "title": "Changed within last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Keep URLs whose lastmod is within the last N days, e.g. 30; 0 or empty = off. Overrides Changed after (date). URLs with no lastmod are dropped unless you turn on Keep URLs without a lastmod."
          },
          "keepUndatedUrls": {
            "title": "Keep URLs without a lastmod",
            "type": "boolean",
            "description": "Off by default: when a date filter is set, URLs with no lastmod in the sitemap are dropped, since their age can't be checked. Turn this on to keep them. On sites whose sitemaps have no lastmod, that returns every URL (up to the limits), and each one is billed.",
            "default": false
          },
          "maxUrlsPerSite": {
            "title": "Max URLs per site",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit.",
            "default": 1000
          },
          "maxTotalUrls": {
            "title": "Max URLs in total",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit.",
            "default": 0
          },
          "maxSitemapsPerSite": {
            "title": "Max sitemap files per site",
            "minimum": 1,
            "type": "integer",
            "description": "Safety cap on sitemap files read per site.",
            "default": 1000
          },
          "includeAlternates": {
            "title": "Include hreflang alternates",
            "type": "boolean",
            "description": "Add an alternates field to each row: the hreflang language versions listed in the sitemap, as objects with hreflang and url (null when none). Default false.",
            "default": false
          },
          "onlyNewUrls": {
            "title": "Only new URLs (monitoring)",
            "type": "boolean",
            "description": "Return only URLs not returned by earlier runs that used this option and the same state store, for scheduled monitoring. Default false. Seen URLs are remembered for 365 days.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store for monitoring. Use a different name per monitor.",
            "default": "sitemap-extractor-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}