{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap URL Extractor",
    "description": "Extract every URL from any website's XML sitemaps: auto-discovers sitemaps via robots.txt, follows sitemap indexes and .gz files, returns lastmod, hreflang, images, robots.txt status and optional HTTP status codes. $0.30 per 1,000 URLs.",
    "version": "1.0",
    "x-build-id": "BeyuMPByAbBkDB0aC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jakob_jerich~sitemap-url-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jakob_jerich-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/jakob_jerich~sitemap-url-extractor/runs": {
      "post": {
        "operationId": "runs-sync-jakob_jerich-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/jakob_jerich~sitemap-url-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-jakob_jerich-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": "Website addresses (e.g. https://www.example.com) or direct sitemap URLs (e.g. https://www.example.com/sitemap.xml, .xml.gz, sitemap index, RSS/Atom feed or plain-text URL list). For a website, sitemaps are discovered from robots.txt and the usual locations.",
            "items": {
              "type": "string"
            }
          },
          "maxUrlsPerSite": {
            "title": "Max URLs per site",
            "minimum": 0,
            "maximum": 5000000,
            "type": "integer",
            "description": "Stop after saving this many URLs for each start URL. Use 0 for no limit. You pay per saved URL, so this also caps your cost.",
            "default": 10000
          },
          "includePatterns": {
            "title": "Only include URLs matching",
            "type": "array",
            "description": "Optional. Keep only URLs that match at least one of these regular expressions (case-insensitive), e.g. \"/blog/\" or \"/products/.+\". Leave empty to keep all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Exclude URLs matching",
            "type": "array",
            "description": "Optional. Drop URLs that match any of these regular expressions (case-insensitive), e.g. \"/tag/\" or \"\\\\?page=\".",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "lastmodAfter": {
            "title": "Only URLs modified after",
            "type": "string",
            "description": "Optional. Keep only URLs whose sitemap <lastmod> is on or after this date. Accepts an absolute date (2026-01-31) or a relative period (\"7 days\", \"2 weeks\", \"3 months\"). URLs without a lastmod are kept unless you enable the option below. Great for finding new or updated pages."
          },
          "dropUrlsWithoutLastmod": {
            "title": "Drop URLs without lastmod",
            "type": "boolean",
            "description": "If enabled, URLs that have no <lastmod> date in the sitemap are skipped.",
            "default": false
          },
          "sameDomainOnly": {
            "title": "Same domain only",
            "type": "boolean",
            "description": "Keep only URLs on the same domain as the start URL (www. is ignored). Disable to also keep URLs on other domains or subdomains that appear in the sitemap.",
            "default": true
          },
          "checkStatus": {
            "title": "Check HTTP status of each URL",
            "type": "boolean",
            "description": "If enabled, sends a lightweight HEAD request to every saved URL and records the HTTP status code and redirect target (redirects are not followed, so you see 301/302 issues in your sitemap). URLs disallowed by robots.txt are not requested. Slower: roughly 5–20 URLs per second.",
            "default": false
          },
          "statusConcurrency": {
            "title": "Status check concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many status-check requests run in parallel. Keep it low to be polite to the website.",
            "default": 5
          },
          "maxSitemapFiles": {
            "title": "Max sitemap files per site",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Safety limit on how many sitemap files (including nested sitemap indexes) are read per start URL.",
            "default": 500
          },
          "discoverSitemaps": {
            "title": "Guess sitemap locations",
            "type": "boolean",
            "description": "If robots.txt declares no sitemap, try the usual locations: /sitemap.xml, /sitemap_index.xml, /sitemap-index.xml, /wp-sitemap.xml and /sitemap.txt.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}