{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap URL Extractor & Change Monitor: New & Removed Pages",
    "description": "Give it a website, get every URL from its sitemaps: robots.txt discovery, nested indexes and .xml.gz, with lastmod, hreflang and image counts. Schedule it to see new and removed pages, filter by regex or date, and optionally check HTTP status. $0.20 per 1,000 URLs, no monthly fee.",
    "version": "0.1",
    "x-build-id": "97esxtRWRkhoZT2mK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datatoolsforall~website-sitemap-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datatoolsforall-website-sitemap-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/datatoolsforall~website-sitemap-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datatoolsforall-website-sitemap-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/datatoolsforall~website-sitemap-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datatoolsforall-website-sitemap-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",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "Website addresses (e.g. https://apify.com) or direct sitemap links (e.g. https://apify.com/sitemap.xml). For a website, sitemaps are found via robots.txt and common locations such as /sitemap.xml. A website is always read whole: a page path such as /blog is ignored, and http and https on one host count as one website (extracted and charged once). To keep one section, use the URL filters below or enter that section's sitemap URL.",
            "items": {
              "type": "string"
            }
          },
          "maxUrlsPerSite": {
            "title": "Maximum URLs per website",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Caps the billable rows per website, and so your cost: $0.20 per 1,000 rows (without the status check). Page URLs and, in comparison mode, removed URLs count towards it. If you leave it out (e.g. via API), the default of 10,000 means at most $2.00 per website.",
            "default": 10000
          },
          "includePatterns": {
            "title": "Only keep URLs matching",
            "maxItems": 100,
            "type": "array",
            "description": "Optional. Keep only URLs that match at least one of these regular expressions, for example /blog/ or \\.pdf$. Matching is case-sensitive. Leave empty to keep everything.",
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Skip URLs matching",
            "maxItems": 100,
            "type": "array",
            "description": "Optional. Drop URLs that match any of these regular expressions, for example /tag/ or \\?page=. Applied after the include list.",
            "items": {
              "type": "string"
            }
          },
          "lastmodAfter": {
            "title": "Only URLs modified on or after",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Optional. Keep only URLs whose sitemap 'lastmod' date is on or after this date. Pick a date or enter a relative value such as '30 days'. URLs without a lastmod date are dropped when this is set."
          },
          "followSitemapIndexes": {
            "title": "Follow sitemap index files",
            "type": "boolean",
            "description": "Sitemap index files point to other sitemaps. Keep this on to read all of them (recommended). When it is off, only page URLs listed directly in the sitemap files you enter or that are discovered are returned: a website whose sitemap is an index (for example apify.com) then gives no page URLs, only a free INDEX_NOT_FOLLOWED row, and the child sitemap URLs are listed in the SUMMARY record.",
            "default": true
          },
          "includeAlternates": {
            "title": "Include hreflang alternates",
            "type": "boolean",
            "description": "Add the language versions of each page (xhtml:link hreflang entries) to the 'alternates' field.",
            "default": true
          },
          "includeMediaCounts": {
            "title": "Include image and video counts",
            "type": "boolean",
            "description": "Add how many images and videos the sitemap lists for each page ('imageCount' and 'videoCount').",
            "default": true
          },
          "checkUrlStatus": {
            "title": "Check HTTP status of each URL (paid add-on)",
            "type": "boolean",
            "description": "Paid add-on: $0.0005 per checked URL (1,000 URLs = $0.50 extra). Sends one HEAD request to every extracted page URL and adds 'statusCode' and 'redirectLocation'. Redirects are not followed, robots.txt rules are respected, and runs get slower.",
            "default": false
          },
          "compareWithPreviousRun": {
            "title": "Compare with previous run (new/removed URLs)",
            "type": "boolean",
            "description": "Remember each website's URLs between runs: every row gets 'diffStatus' = new or unchanged, and URLs that disappeared since the last run are added as 'removed' rows. Removed URLs are detected only after a complete read (no cap reached, no failed sitemap, no lastmodAfter); removed rows are charged like page rows and count towards the maximum URLs per website. Ideal with a schedule.",
            "default": false
          },
          "stateKey": {
            "title": "Comparison name (optional)",
            "pattern": "^[a-zA-Z0-9_.-]{1,100}$",
            "type": "string",
            "description": "Optional name for the remembered URL list, e.g. 'competitor-weekly'. Runs with the same name and start URL are compared even if you change the filters (URLs outside the current filters are then not reported as removed). Without a name, changing the filters starts a new comparison. Letters, digits, '-', '_' and '.' only."
          },
          "maxSitemapsPerSite": {
            "title": "Maximum sitemap files per website",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Safety limit on how many sitemap files (including index files) are downloaded for one start URL.",
            "default": 500
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "How long to wait for a server to start answering, and the longest pause allowed while downloading a file. Failed requests are retried up to 3 times.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}