{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap Change Monitor: New Pages with Titles",
    "description": "Watch competitor sitemaps: get only new, removed and updated pages, with the title and description of each new page and a per-site digest.",
    "version": "0.1",
    "x-build-id": "QxtnZbup2JK85vaMg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/huffworks~sitemap-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-huffworks-sitemap-change-monitor",
        "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/huffworks~sitemap-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-huffworks-sitemap-change-monitor",
        "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/huffworks~sitemap-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-huffworks-sitemap-change-monitor",
        "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": {
          "sites": {
            "title": "Sites to watch",
            "maxItems": 100,
            "type": "array",
            "description": "Domains (crawlee.dev), home pages (https://www.example.com) or a specific sitemap or feed URL (https://example.com/post-sitemap.xml). For a domain, the Actor finds the sitemaps in robots.txt or at the usual addresses, and falls back to the site's RSS/Atom feed when there is no sitemap. Up to 100 sites per run.",
            "items": {
              "type": "string"
            }
          },
          "changeTypes": {
            "title": "Changes to report",
            "type": "array",
            "description": "Which changes become rows. added: a URL that was not listed last time. removed: a URL that is no longer listed (only reported after every sitemap file was read in full). updated: the page's <lastmod> date changed.",
            "items": {
              "type": "string",
              "enum": [
                "added",
                "removed",
                "updated"
              ],
              "enumTitles": [
                "Added pages",
                "Removed pages",
                "Updated pages (lastmod changed)"
              ]
            },
            "default": [
              "added",
              "removed",
              "updated"
            ]
          },
          "fetchPageDetails": {
            "title": "Fetch title and description of new pages",
            "type": "boolean",
            "description": "Open each ADDED page once (where robots.txt allows it) and read its title, meta description, first H1, canonical URL, noindex flag, publish date and language. Charged per page read. Pages from RSS/Atom feeds and news sitemaps already carry a title and are not opened.",
            "default": true
          },
          "maxDetailsPerSite": {
            "title": "Maximum new pages to open per site",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Cost guard for the page details above: at most this many added pages are opened per site and run, newest first. The others are still reported, without a title.",
            "default": 20
          },
          "maxChangesPerSite": {
            "title": "Maximum change rows per site",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cost guard for a site that changes a lot at once (a migration, a catalogue import). Changes over the limit are not lost: they are reported by the next run.",
            "default": 200
          },
          "summaryRows": {
            "title": "Site summary rows",
            "enum": [
              "always",
              "whenChanged",
              "never"
            ],
            "type": "string",
            "description": "One summary row per site with counts, per-section breakdown and a ready-to-post message. 'always': every run (good for dashboards and a heartbeat). 'whenChanged': only for sites that changed (good for Slack, email and Zapier/Make: no row, no alert). 'never': change rows only.",
            "default": "always"
          },
          "sectionDepth": {
            "title": "Section depth",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many path levels name a section in the summary. 1 groups https://site.com/blog/my-post under /blog/; 2 groups /docs/guides/x under /docs/guides/. A leading language code (/de/, /en-us/) is kept as part of the section.",
            "default": 1
          },
          "includeUrlPatterns": {
            "title": "Only URLs matching",
            "type": "array",
            "description": "Watch only URLs that match one of these regular expressions (case-insensitive), for example /blog/ or /products/. Empty: all URLs. Changing this later makes newly included URLs show up as added.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Skip URLs matching",
            "type": "array",
            "description": "Ignore URLs that match one of these regular expressions, for example /tag/ or \\?page=.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxUrlsPerSite": {
            "title": "Maximum URLs per site",
            "minimum": 100,
            "maximum": 200000,
            "type": "integer",
            "description": "Stop reading a site's sitemaps after this many URLs. When a site is cut off, removed pages are not reported for it (the list is incomplete).",
            "default": 50000
          },
          "stateStoreName": {
            "title": "Snapshot store name",
            "type": "string",
            "description": "Name of the key-value store in your account that keeps each site's last URL list. Use a different name for each independent watchlist (for example one per client). Delete the store, or a site's record in it, to start that site over.",
            "default": "huffworks-sitemap-monitor-state"
          },
          "resetState": {
            "title": "Start over (new baseline)",
            "type": "boolean",
            "description": "Forget the saved snapshot of every site in this run and save a new baseline. No change rows are reported in that run.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Sites checked in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Different sites are checked side by side; requests to one site are always one at a time, at least 0.5 s apart (or the site's robots.txt Crawl-delay, up to 10 s).",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}