{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap URL Extractor: Nested, Gzip & Filters",
    "description": "Get the page URLs a website lists in its sitemaps. Give a domain, homepage, robots.txt or sitemap URL: it finds the sitemaps, follows nested indexes, reads .xml.gz, RSS and text sitemaps, filters by regex or lastmod date, and falls back to a light crawl when there's no sitemap.",
    "version": "0.1",
    "x-build-id": "NgnIRP6lNPjc4zN5h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/drop_data_solutions~sitemap-url-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-drop_data_solutions-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/drop_data_solutions~sitemap-url-extractor/runs": {
      "post": {
        "operationId": "runs-sync-drop_data_solutions-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/drop_data_solutions~sitemap-url-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-drop_data_solutions-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",
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Website URLs, robots.txt files or sitemap URLs (.xml, .xml.gz, .txt, RSS/Atom), with https://. For a website the Actor finds its sitemaps automatically. Bare domains go in the Domains field below.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "Bare domains or hosts, one per line, e.g. example.com or blog.example.com (https is tried first, then http). Same as adding them to Start URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "discoverSitemaps": {
            "title": "Auto-discover sitemaps",
            "type": "boolean",
            "description": "For websites and domains, read robots.txt and, if it lists no sitemap, try common locations (/sitemap.xml, /sitemap_index.xml, /wp-sitemap.xml, /sitemap.xml.gz and more).",
            "default": true
          },
          "maxUrls": {
            "title": "Maximum URLs (whole run)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many unique URLs. 0 = no limit (the run still stops at your Maximum cost per run).",
            "default": 0
          },
          "maxUrlsPerDomain": {
            "title": "Maximum URLs per site",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each site after this many unique URLs. 0 = no limit.",
            "default": 0
          },
          "includePatterns": {
            "title": "Include URLs matching (regex)",
            "type": "array",
            "description": "Keep only URLs that match at least one of these regular expressions (case-insensitive), e.g. /blog/ or \\\\.html$.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Exclude URLs matching (regex)",
            "type": "array",
            "description": "Drop URLs that match any of these regular expressions, e.g. /tag/ or \\\\?page=.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "lastmodFrom": {
            "title": "Modified on or after",
            "type": "string",
            "description": "Keep only URLs whose sitemap lastmod is on or after this date. Use a date (2026-01-31) or a relative value (7 days, 3 months). Child sitemaps whose index lastmod is older are skipped entirely, which saves time."
          },
          "lastmodTo": {
            "title": "Modified on or before",
            "type": "string",
            "description": "Keep only URLs whose sitemap lastmod is on or before this date."
          },
          "keepUrlsWithoutLastmod": {
            "title": "Keep URLs without a lastmod date",
            "type": "boolean",
            "description": "When a date filter is set, keep URLs whose sitemap entry has no lastmod. Turn off to keep only dated URLs.",
            "default": true
          },
          "sameHostOnly": {
            "title": "Only URLs on the site's own host",
            "type": "boolean",
            "description": "Drop sitemap entries that point to other domains (www. is ignored when comparing).",
            "default": false
          },
          "includeAlternates": {
            "title": "Include hreflang alternates",
            "type": "boolean",
            "description": "Add each URL's language versions (xhtml:link hreflang) as an alternates list.",
            "default": true
          },
          "includeMedia": {
            "title": "Include image, video and news details",
            "type": "boolean",
            "description": "Add image:image, video:video and news:news entries from the sitemap to each URL.",
            "default": false
          },
          "crawlIfNoSitemap": {
            "title": "Crawl the site when no sitemap exists",
            "type": "boolean",
            "description": "If no sitemap is found, follow the site's internal links (same host, robots.txt respected) to list URLs.",
            "default": true
          },
          "crawlMaxPages": {
            "title": "Fallback crawl: max pages to open",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many HTML pages to open per site in the fallback crawl. Same-host links found on them are output, except links disallowed by robots.txt and file links (images, PDFs, CSS/JS). URL limits still apply.",
            "default": 50
          },
          "crawlMaxDepth": {
            "title": "Fallback crawl: max link depth",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many clicks away from the start page to go.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Used only when a site blocks direct requests (HTTP 401/403/429 or a bot challenge), unless you change Proxy mode. Choose Residential for sites behind strong bot protection.",
            "default": {
              "useApifyProxy": true
            }
          },
          "proxyMode": {
            "title": "Proxy mode",
            "enum": [
              "on-block",
              "always",
              "never"
            ],
            "type": "string",
            "description": "on-block: go direct, switch to the proxy only when blocked (cheapest). always: every request through the proxy. never: no proxy.",
            "default": "on-block"
          },
          "maxConcurrency": {
            "title": "Max parallel sitemap downloads",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Sitemaps downloaded at once across all sites. At most 2 requests run against the same host at a time.",
            "default": 4
          },
          "maxSitemapDepth": {
            "title": "Max sitemap index nesting",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many levels of sitemap indexes to follow.",
            "default": 6
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Give up on a request that is silent for this long. Every request has a connect and idle timeout, so a stalled server can't hold up the run indefinitely.",
            "default": 30
          },
          "maxRequestRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries on 429/5xx and network errors, with exponential backoff (1s, 2s, 4s…) that honours Retry-After.",
            "default": 3
          },
          "userAgent": {
            "title": "User-Agent",
            "type": "string",
            "description": "Optional custom User-Agent header. Defaults to a current desktop Chrome."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}