{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap Monitor: All URLs + New Pages Since Last Run",
    "description": "Extract every URL from any website's XML sitemaps (robots.txt discovery, indexes, .xml.gz, hreflang, images) and schedule it to get only NEW pages since the last run. Optional HTTP status and redirect check.",
    "version": "0.1",
    "x-build-id": "3QOzgAnBxt1zuZphp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lindenbyte~sitemap-monitor-new-pages/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lindenbyte-sitemap-monitor-new-pages",
        "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/lindenbyte~sitemap-monitor-new-pages/runs": {
      "post": {
        "operationId": "runs-sync-lindenbyte-sitemap-monitor-new-pages",
        "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/lindenbyte~sitemap-monitor-new-pages/run-sync": {
      "post": {
        "operationId": "run-sync-lindenbyte-sitemap-monitor-new-pages",
        "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": [
          "sites"
        ],
        "properties": {
          "proxyConfiguration": {
            "title": "Proxy (used only for blocked sites)",
            "type": "object",
            "description": "Optional. Requests go out directly first; if a site answers 401/403/429 (it blocks datacenter IPs), only that site's requests are retried through this proxy. Each request sent through the proxy costs one extra 'proxied-request' event (see Pricing); sites that don't block are never proxied. Residential is the most reliable for news sites."
          },
          "sites": {
            "title": "Websites or sitemap URLs",
            "type": "array",
            "description": "Domains (example.com), homepage URLs, or direct sitemap URLs (https://example.com/sitemap.xml, .xml.gz, .txt). For a domain, sitemaps are found via robots.txt 'Sitemap:' lines, then /sitemap.xml, /sitemap_index.xml and /sitemap-index.xml.",
            "items": {
              "type": "string"
            }
          },
          "maxUrlsPerSite": {
            "title": "Max URLs output per site",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Cost cap: at most this many URLs are saved (and charged) per site per run. In 'only new' mode this is the max NEW URLs per run; any remaining new URLs are output on the next run.",
            "default": 10000
          },
          "maxScannedUrlsPerSite": {
            "title": "Max URLs read per site",
            "minimum": 1,
            "maximum": 2000000,
            "type": "integer",
            "description": "Safety limit on how many unique URLs are read from a site's sitemaps (reading is free; only output is charged). In 'only new' mode keep it above the site's size, or new pages in unread sitemaps are missed. Above ~300,000 give the run 1 GB+ memory.",
            "default": 200000
          },
          "onlyNew": {
            "title": "Only NEW URLs since the last run (monitoring mode)",
            "type": "boolean",
            "description": "Remembers every URL seen per site in a named key-value store ('sitemap-monitor-state') and outputs only URLs that were not there on the previous run. Schedule the Actor (daily/hourly) to get a feed of new pages. You are charged only for URLs that are output.",
            "default": false
          },
          "emitOnBaseline": {
            "title": "Output all URLs on the first (baseline) run",
            "type": "boolean",
            "description": "Only for 'only new' mode. The first run for a site has nothing to compare to. On = output all URLs (marked isNew). Off = silently record the baseline and output nothing (cheapest way to start monitoring).",
            "default": true
          },
          "stateKey": {
            "title": "Monitor name (state key)",
            "type": "string",
            "description": "Only for 'only new' mode. Separate monitors (for example one per schedule or client) keep separate memories when they use different names. Change it to start a fresh baseline.",
            "default": "default"
          },
          "changedSinceDays": {
            "title": "Only URLs modified in the last N days (lastmod)",
            "minimum": 0,
            "maximum": 36500,
            "type": "integer",
            "description": "Keep only URLs whose sitemap <lastmod> is within the last N days (URLs without lastmod are dropped). Child sitemaps whose own lastmod is older are not even downloaded. 0 or empty = off."
          },
          "urlPattern": {
            "title": "Only URLs matching (regex)",
            "type": "string",
            "description": "Optional case-insensitive regular expression; only matching URLs are output and charged. Examples: /blog/ , /products/ , ^https://example\\.com/(en|de)/ . Note: a homepage URL with a path in 'sites' still reads the whole domain's sitemaps, so use this to narrow to a section."
          },
          "checkStatus": {
            "title": "Check HTTP status of each URL",
            "type": "boolean",
            "description": "Send a HEAD request (GET if HEAD is refused) to each output URL and record statusCode, finalUrl and redirectCount (follows up to 5 redirects). Respects the site's robots.txt and Crawl-delay. Charged per successful check.",
            "default": false
          },
          "statusConcurrency": {
            "title": "Status checks in parallel",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum simultaneous status-check requests (the per-host delay below still applies).",
            "default": 5
          },
          "perHostDelayMs": {
            "title": "Delay between requests to the same host (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Politeness throttle for status checks: at most one request per host every N ms (a robots.txt Crawl-delay, if larger, wins, capped at 10 s).",
            "default": 250
          },
          "maxSitemapDepth": {
            "title": "Max sitemap index depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many levels of nested sitemap indexes to follow (index -> index -> sitemap). 3 covers virtually every site.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}