{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap URL Extractor",
    "description": "Extract every URL from any website's sitemaps. Finds sitemaps via robots.txt or common paths, follows sitemap indexes, reads gzip, RSS/Atom and text sitemaps, and returns lastmod, priority, hreflang, images and news. Optional HTTP status checks.",
    "version": "1.0",
    "x-build-id": "nG9LVxufdN7R51OPC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidyrow~sitemap-url-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidyrow-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/tidyrow~sitemap-url-extractor/runs": {
      "post": {
        "operationId": "runs-sync-tidyrow-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/tidyrow~sitemap-url-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-tidyrow-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": "Homepages (e.g. https://example.com) or direct sitemap/feed URLs. For a homepage, the Actor finds the sitemaps through robots.txt, then tries common paths like /sitemap.xml.",
            "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": "Stop after saving this many URLs for one site. 0 means no limit.",
            "default": 0
          },
          "restrictToStartPath": {
            "title": "Only URLs under the start path",
            "type": "boolean",
            "description": "If a start URL has a path (e.g. https://example.com/blog/), keep only URLs under that path. Has no effect for homepages or direct sitemap URLs.",
            "default": true
          },
          "includeUrlPatterns": {
            "title": "Include only URLs matching",
            "type": "array",
            "description": "Regular expressions (case-insensitive). If set, only URLs that match at least one are saved. Example: /blog/",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Exclude URLs matching",
            "type": "array",
            "description": "Regular expressions (case-insensitive). URLs that match any are skipped. Example: \\.(pdf|jpg)$",
            "items": {
              "type": "string"
            }
          },
          "lastmodSince": {
            "title": "Modified since",
            "type": "string",
            "description": "Keep only URLs whose lastmod date is on or after this date. Absolute (2024-01-31) or relative (30 days). URLs without lastmod are skipped when this is set."
          },
          "includeAlternates": {
            "title": "Include hreflang alternates",
            "type": "boolean",
            "description": "Add the language/region alternates (<xhtml:link rel=\"alternate\" hreflang>) listed for each URL.",
            "default": false
          },
          "includeImages": {
            "title": "Include image sitemap data",
            "type": "boolean",
            "description": "Add image URLs, titles and captions from image sitemaps.",
            "default": false
          },
          "includeVideos": {
            "title": "Include video sitemap data",
            "type": "boolean",
            "description": "Add video titles, thumbnails and content URLs from video sitemaps.",
            "default": false
          },
          "includeNews": {
            "title": "Include news sitemap data",
            "type": "boolean",
            "description": "Add title, publication name, language and publication date from Google News sitemaps.",
            "default": false
          },
          "checkStatus": {
            "title": "Check HTTP status of each URL",
            "type": "boolean",
            "description": "Send a lightweight request to every saved URL and record its status code and redirect target.",
            "default": false
          },
          "statusCheckConcurrency": {
            "title": "Status check concurrency (per site)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel status checks per site. Keep it low to stay polite to the server.",
            "default": 5
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt for status checks",
            "type": "boolean",
            "description": "Skip status checks for URLs that robots.txt disallows. They are saved with statusError \"blocked by robots.txt\".",
            "default": true
          },
          "useRobotsTxt": {
            "title": "Discover sitemaps from robots.txt",
            "type": "boolean",
            "description": "Read the Sitemap: lines in robots.txt.",
            "default": true
          },
          "tryCommonPaths": {
            "title": "Try common sitemap paths",
            "type": "boolean",
            "description": "If robots.txt lists no sitemap, try /sitemap.xml, /sitemap_index.xml, /wp-sitemap.xml and similar.",
            "default": true
          },
          "maxSitemapsPerSite": {
            "title": "Max sitemap files per site",
            "minimum": 1,
            "type": "integer",
            "description": "Safety limit on how many sitemap files to read for one site.",
            "default": 5000
          },
          "maxDepth": {
            "title": "Max sitemap index depth",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many levels of nested sitemap indexes to follow.",
            "default": 10
          },
          "maxConcurrency": {
            "title": "Sites in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many sites to process at the same time.",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for each HTTP request.",
            "default": 30
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for network errors, HTTP 429 and 5xx responses.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}