{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap Scraper: Extract All URLs from XML Sitemaps",
    "description": "Get every URL a website lists in its XML sitemaps (index, gzip, news, image, hreflang), with lastmod, priority and news titles. Auto-finds sitemaps via robots.txt. Monitor mode outputs only URLs that are new since the last run. $0.30 per 1,000 URLs.",
    "version": "1.0",
    "x-build-id": "dWRXxZ4iuMdEdbikj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/berryish_pillar~sitemap-url-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-berryish_pillar-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/berryish_pillar~sitemap-url-extractor/runs": {
      "post": {
        "operationId": "runs-sync-berryish_pillar-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/berryish_pillar~sitemap-url-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-berryish_pillar-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",
            "type": "array",
            "description": "A domain or homepage (sitemaps are found through robots.txt and common paths), or a direct sitemap URL (.xml, .xml.gz, sitemap index, news sitemap, or a plain-text sitemap).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxUrlsPerSite": {
            "title": "Max URLs per site",
            "minimum": 0,
            "type": "integer",
            "description": "0 = all URLs. You pay per URL in the output.",
            "default": 0
          },
          "maxUrls": {
            "title": "Max URLs in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many URLs across all sites. 0 = no limit.",
            "default": 0
          },
          "includeUrlPatterns": {
            "title": "Only URLs matching (regex, any of)",
            "type": "array",
            "description": "Optional, e.g. /blog/ or /products/.",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Skip URLs matching (regex, any of)",
            "type": "array",
            "description": "Optional, e.g. /tag/ or \\?",
            "items": {
              "type": "string"
            }
          },
          "lastmodAfter": {
            "title": "Only URLs modified on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Uses the sitemap's lastmod. URLs without lastmod are skipped when this is set."
          },
          "sameDomainOnly": {
            "title": "Only URLs on the same domain",
            "type": "boolean",
            "description": "Drop sitemap entries that point to other domains.",
            "default": true
          },
          "onlyNewUrls": {
            "title": "Only URLs that are new since the last run",
            "type": "boolean",
            "description": "Remembers every URL per site (per Monitor ID) and outputs, and charges for, only new ones. The first run outputs everything as the baseline. Schedule it to track new pages, products or articles on any site.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name for the remembered URL lists. Use a different ID per watchlist.",
            "default": "default"
          },
          "rememberUrls": {
            "title": "Remember URLs for later comparison",
            "type": "boolean",
            "description": "Save the URL list (when the whole sitemap was read and no filters are set) so later runs can mark isNew and count removed URLs.",
            "default": true
          },
          "maxSitemapsPerSite": {
            "title": "Max sitemap files per site",
            "minimum": 1,
            "type": "integer",
            "description": "Safety cap for huge sitemap indexes.",
            "default": 500
          },
          "maxConcurrentSites": {
            "title": "Sites in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many sites to process at the same time.",
            "default": 3
          },
          "maxRequestsPerSecondPerHost": {
            "title": "Max requests per second per host",
            "minimum": 0.1,
            "maximum": 10,
            "type": "number",
            "description": "Politeness cap. A stricter robots.txt Crawl-delay wins.",
            "default": 2
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip sitemap files that robots.txt disallows.",
            "default": true
          },
          "siteTimeoutSecs": {
            "title": "Timeout per site (seconds)",
            "minimum": 60,
            "type": "integer",
            "description": "A site that takes longer is stopped; URLs already output are kept.",
            "default": 1800
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries with backoff on timeouts, 429 and 5xx.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}