{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap URL Scraper: List URLs & Check Changes",
    "description": "List every URL a site's sitemaps declare, with lastmod, changefreq and priority, or add a health check of each sitemap: fetch status, URL count, drift since your last run, a dead-link sample and alerts. Sites that never answer come back as free status rows.",
    "version": "0.1",
    "x-build-id": "M9haNHXSBd83VzngK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pradio~sitemap-url-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pradio-sitemap-url-scraper",
        "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/pradio~sitemap-url-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pradio-sitemap-url-scraper",
        "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/pradio~sitemap-url-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pradio-sitemap-url-scraper",
        "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": "Start URLs",
            "type": "array",
            "description": "Your sitemap URLs or site roots, one per line. The filled-in examples show the shape: replace them with your own. A site root is found through its robots.txt, else /sitemap.xml.",
            "items": {
              "type": "string"
            }
          },
          "sitemapListUrl": {
            "title": "Sitemap list file URL",
            "type": "string",
            "description": "Optional: the URL of a plain-text or CSV file with one sitemap URL or site root per line. A robots.txt works too: each Sitemap: line becomes an entry."
          },
          "output": {
            "title": "What to get (URL rows at $0.40 per 1,000)",
            "enum": [
              "urls_only",
              "urls_and_audit",
              "audit_only"
            ],
            "type": "string",
            "description": "URL list only: one row per URL the sitemaps list, billed at $0.40 per 1,000 URLs. Add the health check for a row per sitemap file with its status, freshness, challenge-page and soft-404 signals and what changed since your last run, the rows the Sitemap health check event bills. The default writes both: the health rows are what the sitemap signals are read from, so a run that wants them must ask for them.",
            "default": "urls_and_audit"
          },
          "urlFilterInclude": {
            "title": "Include URL patterns",
            "type": "array",
            "description": "Optional: patterns a URL must match to be listed, such as https://shop.example.com/products/*. A pattern without * or ? matches anywhere in the URL. Empty lists every URL.",
            "items": {
              "type": "string"
            }
          },
          "urlFilterExclude": {
            "title": "Exclude URL patterns",
            "type": "array",
            "description": "Optional: patterns a URL must not match to be listed, such as *://*/*search*. Applied after the include patterns.",
            "items": {
              "type": "string"
            }
          },
          "linkCheck": {
            "title": "Dead-link check",
            "enum": [
              "sample",
              "all",
              "off"
            ],
            "type": "string",
            "description": "Free: a check adds the page's HTTP status to its row and is not billed. A sample checks up to 50 listed pages per run, every listed page checks them all, off skips it.",
            "default": "sample"
          },
          "deadLinkSample": {
            "title": "Dead-link sample size",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "How many listed pages one run checks when linkCheck is sample, spread across the sitemap files. 0 checks none. Default 50, at most 500.",
            "default": 50
          },
          "staleAfterDays": {
            "title": "Stale-sitemap alert after (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Raise an alert when a sitemap the site's robots.txt still lists has gone this many days without a change, compared with earlier runs. Default 30.",
            "default": 30
          },
          "maxUrls": {
            "title": "URLs listed",
            "minimum": 0,
            "type": "integer",
            "description": "The most URL rows one run lists and bills, across all sites. One sitemap can declare 50,000 URLs.",
            "default": 1000
          },
          "maxUrlsPerSite": {
            "title": "URLs per site",
            "minimum": 1,
            "type": "integer",
            "description": "Optional: the most URL rows one site may return, as a number of rows (for example 200), so one large site cannot use the whole URL cap. Empty means no per-site limit."
          },
          "maxItems": {
            "title": "Sitemap health rows",
            "minimum": 1,
            "type": "integer",
            "description": "Used only when the \"What to get\" field, in its own \"🎁 What to get\" section above, includes the health check: the most sitemap files one run checks and bills, one health row each. It does not limit URL rows.",
            "default": 100
          },
          "maxItemsPerStartUrl": {
            "title": "Sitemaps audited per start URL",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "The most sitemap files one start URL may audit (200 at most). Empty shares the run's files evenly across the start URLs."
          },
          "maxCrawlingDepth": {
            "title": "Sitemap levels to follow",
            "minimum": 0,
            "type": "number",
            "description": "How many sitemap levels to read: 1 reads only the files named, 2 also follows a sitemap index into its children. 0 means no limit.",
            "default": 2
          },
          "maxRequestRetries": {
            "title": "Retries after a network error",
            "minimum": 0,
            "type": "number",
            "description": "Retries after a network error such as a dropped connection or a timeout. A 429 that states a pause of 60 seconds or less is waited for once; any other HTTP answer is final.",
            "default": 2
          },
          "includeUrls": {
            "title": "Older setting: list URLs",
            "type": "boolean",
            "description": "Kept for saved tasks and API calls made before What to get existed. On: URL rows with the health check; off: health check only. Sent, it wins over What to get."
          },
          "urlsOnly": {
            "title": "Older setting: URL list only",
            "type": "boolean",
            "description": "Kept for saved tasks and API calls made before What to get existed. On: URL rows only, no health check. Sent, it wins over What to get."
          },
          "checkPageStatus": {
            "title": "Older setting: check links",
            "type": "boolean",
            "description": "Kept for saved tasks and API calls made before Dead-link check existed. Off turns the check off. Sent, it wins over Dead-link check."
          },
          "checkAllUrls": {
            "title": "Older setting: check every URL",
            "type": "boolean",
            "description": "Kept for saved tasks and API calls made before Dead-link check existed. On checks every listed URL. Sent, it wins over Dead-link check."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional: route the sitemap fetches and URL checks through a proxy. A refused request is reported on the row and never retried through another address."
          },
          "proxyRotation": {
            "title": "Proxy rotation",
            "pattern": "^(PER_REQUEST|UNTIL_FAILURE)$",
            "type": "string",
            "description": "Only used when a proxy is set. PER_REQUEST (the default): a new address for every request. UNTIL_FAILURE: one address until it fails. A site that refuses is not asked again in that run, either way.",
            "default": "PER_REQUEST"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}