{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap Extractor & New Page Monitor",
    "description": "Every URL a website lists in its sitemaps: robots.txt discovery, nested indexes, gzip, Google News titles, images, hreflang. Optional HTTP status check, a site summary row and a monitor that returns only new URLs since the last run.",
    "version": "0.1",
    "x-build-id": "zMBPP8iodwRK49A4Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pegton~sitemap-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pegton-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/pegton~sitemap-extractor/runs": {
      "post": {
        "operationId": "runs-sync-pegton-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/pegton~sitemap-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-pegton-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",
        "properties": {
          "startUrls": {
            "title": "Websites or sitemap URLs",
            "type": "array",
            "description": "One per line: a domain (example.com), any page URL, or a sitemap URL (https://example.com/sitemap.xml, .xml.gz, sitemap index, RSS feed or .txt). Domains are discovered via robots.txt, then the usual sitemap paths.",
            "items": {
              "type": "string"
            }
          },
          "includePatterns": {
            "title": "Only URLs containing (any)",
            "type": "array",
            "description": "Case-insensitive text, e.g. /blog/ or /products/. Wrap in slashes for a regex: /\\/20(25|26)\\//",
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Exclude URLs containing",
            "type": "array",
            "description": "Same syntax, e.g. /tag/ or ?page=",
            "items": {
              "type": "string"
            }
          },
          "lastmodWithinDays": {
            "title": "Only URLs updated in the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Uses the sitemap's lastmod (or the news publication date). URLs without a date are excluded when this is set. 0 = no date filter."
          },
          "onlyNewUrls": {
            "title": "Only new URLs since the last run (monitor)",
            "type": "boolean",
            "description": "Remembers every URL per site. The first run delivers the current URLs; later runs deliver only URLs that appeared since, and the site summary reports how many disappeared. Schedule it daily to catch competitors' new pages, products, articles or job pages.",
            "default": false
          },
          "checkStatus": {
            "title": "Check HTTP status of each URL",
            "type": "boolean",
            "description": "Sends a HEAD request (GET if HEAD is refused) to every delivered URL: status, final URL after redirects, content type, Last-Modified header. Finds 404s and redirects that are still listed in the sitemap. Respects robots.txt and Crawl-delay.",
            "default": false
          },
          "includeSiteSummary": {
            "title": "Add a site summary row",
            "type": "boolean",
            "description": "One row per site: total URLs, sitemap files, sections, lastmod freshness by year, news and image counts, hreflang languages, new and removed URLs.",
            "default": true
          },
          "includeAlternates": {
            "title": "Include hreflang alternates",
            "type": "boolean",
            "description": "Adds the full list of language versions (hreflang + URL) per page. Off by default because it can be large; alternatesCount and the summary's hreflangLanguages are always included.",
            "default": false
          },
          "maxUrlsPerSite": {
            "title": "Max URLs per site",
            "minimum": 0,
            "type": "integer",
            "description": "0 = all. The summary always counts every URL found.",
            "default": 0
          },
          "maxSitemapsPerSite": {
            "title": "Max sitemap files per site",
            "minimum": 1,
            "type": "integer",
            "description": "Safety limit for huge sitemap indexes.",
            "default": 1000
          },
          "maxUrlsToScanPerSite": {
            "title": "Max URLs to scan per site",
            "minimum": 1000,
            "type": "integer",
            "description": "Safety limit for memory on giant sites (300,000 URLs need about 300 MB). The site summary counts up to this many URLs. Raise it, and the run memory, for sites with millions of URLs.",
            "default": 300000
          },
          "maxConcurrencyPerSite": {
            "title": "Parallel requests per site",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Be polite: 4 is plenty for sitemap files. A Crawl-delay in robots.txt is always respected.",
            "default": 4
          },
          "maxItems": {
            "title": "Max URL rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many URL rows (0 = no limit).",
            "default": 0
          },
          "maxChargeUsd": {
            "title": "Max charge (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Stop before this amount would be exceeded. The run's own max-charge setting is always respected too."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed. Sites that block automated access are reported as errors, never bypassed.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}