{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap URL Extractor: Get All URLs of Any Website",
    "description": "Extract all URLs from any website's sitemap.xml. Auto-discovers sitemaps via robots.txt, follows sitemap indexes, reads .xml.gz, text, RSS and Atom sitemaps, returns lastmod, hreflang, image and news data, and detects new URLs between runs.",
    "version": "0.1",
    "x-build-id": "kKFZWqGLUecEZ3viN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datawright-labs~sitemap-url-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datawright-labs-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/datawright-labs~sitemap-url-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datawright-labs-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/datawright-labs~sitemap-url-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datawright-labs-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": "One per line. Enter a website (e.g. https://example.com or example.com) to auto-discover its sitemaps from robots.txt and common locations, or paste a sitemap URL directly (sitemap.xml, sitemap index, .xml.gz, .txt, RSS or Atom feed).",
            "default": [
              "https://crawlee.dev"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxUrlsPerSite": {
            "title": "Max URLs per site",
            "minimum": 0,
            "type": "integer",
            "description": "Stop saving URLs for a site after this many (after filters). 0 = no limit. Tip: also set 'Maximum cost per run' in the run options to cap spend.",
            "default": 0
          },
          "includePatterns": {
            "title": "URL must contain (any of)",
            "type": "array",
            "description": "Keep only URLs matching at least one pattern. Plain text = case-insensitive 'contains' (e.g. /blog/), * = wildcard (e.g. */products/*), or a regular expression between slashes (e.g. /\\/20(25|26)\\//). Leave empty for all URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "URL must NOT contain",
            "type": "array",
            "description": "Drop URLs matching any of these patterns (same syntax as above), e.g. /tag/ or ?page=.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "modifiedAfter": {
            "title": "Modified after (lastmod)",
            "type": "string",
            "description": "Only URLs whose <lastmod> date is on/after this date. Use YYYY-MM-DD or a relative period like '7 days', '24 hours', '2 weeks'. URLs without a lastmod are dropped when this is set. Child sitemaps whose own lastmod is older are skipped entirely, which makes runs much faster."
          },
          "sameHostOnly": {
            "title": "Only URLs on the same host",
            "type": "boolean",
            "description": "Drop URLs whose hostname differs from the site (www. is ignored). Useful for sitemaps that list CDN or partner URLs.",
            "default": false
          },
          "monitorStateKey": {
            "title": "Monitoring key (detect new URLs)",
            "type": "string",
            "description": "Give this monitor a name (e.g. competitor-blogs) and schedule the Actor. Each URL then gets isNew = true/false compared with the previous run that used the same key, and the SITES record reports new and removed URL counts. State is kept in your named key-value store 'sitemap-url-extractor-state'."
          },
          "onlyNewUrls": {
            "title": "Output only new URLs",
            "type": "boolean",
            "description": "With a monitoring key, save (and pay for) only URLs not seen in the previous run. The first run just records the baseline and outputs nothing.",
            "default": false
          },
          "includeAlternates": {
            "title": "Include hreflang alternates",
            "type": "boolean",
            "description": "Add the xhtml:link hreflang alternates (language versions) of each URL.",
            "default": true
          },
          "includeImages": {
            "title": "Include image URLs",
            "type": "boolean",
            "description": "Add the list of image URLs from image sitemaps (imageCount is always included).",
            "default": false
          },
          "includeNews": {
            "title": "Include Google News fields",
            "type": "boolean",
            "description": "Add news title, publication name, language and publication date from news sitemaps.",
            "default": true
          },
          "discoverFromRobotsTxt": {
            "title": "Discover sitemaps from robots.txt",
            "type": "boolean",
            "description": "Read the Sitemap: lines of the site's robots.txt.",
            "default": true
          },
          "tryCommonLocations": {
            "title": "Try common sitemap locations",
            "type": "boolean",
            "description": "If robots.txt lists no sitemap, try /sitemap.xml, /sitemap_index.xml, /sitemap-index.xml, /wp-sitemap.xml, /sitemap.xml.gz and /sitemap.txt.",
            "default": true
          },
          "maxSitemapsPerSite": {
            "title": "Max sitemap files per site",
            "minimum": 1,
            "type": "integer",
            "description": "Safety limit for huge sitemap indexes.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Parallel downloads per site",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many sitemap files to download at once for each site.",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "How long to wait for one sitemap or robots.txt download before retrying.",
            "default": 60
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Most sitemaps download fine without a proxy. Enable Apify Proxy if a site blocks you (HTTP 403/429).",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}