{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap Audit",
    "description": "Get a Sitemap Health Score (0-100) for any website. Discover, parse, and validate XML sitemaps. Find 404s, redirects, canonical mismatches, noindex conflicts, hreflang issues, missing pages and estimate crawl budget waste.",
    "version": "1.0",
    "x-build-id": "8DGVpFUR95AtH2XvJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apage~sitemap-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apage-sitemap-audit",
        "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/apage~sitemap-audit/runs": {
      "post": {
        "operationId": "runs-sync-apage-sitemap-audit",
        "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/apage~sitemap-audit/run-sync": {
      "post": {
        "operationId": "run-sync-apage-sitemap-audit",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Website URLs",
            "type": "array",
            "description": "Websites to audit. Enter domains (e.g., 'example.com') or full URLs. The actor will discover and analyze all sitemaps for each domain. One audit report is produced per domain.",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrls": {
            "title": "Explicit Sitemap URLs",
            "type": "array",
            "description": "Optional: specific sitemap URLs to audit (applied to all domains). These are added to any auto-discovered sitemaps. Useful when sitemaps are at non-standard locations.",
            "items": {
              "type": "string"
            }
          },
          "autoDiscover": {
            "title": "Auto-Discover Sitemaps",
            "type": "boolean",
            "description": "Automatically discover sitemaps from robots.txt and common locations (/sitemap.xml, /sitemap_index.xml, etc.).",
            "default": true
          },
          "validateUrls": {
            "title": "Validate URLs",
            "type": "boolean",
            "description": "Send HEAD requests to every URL in the sitemap to check for 404s, redirects, and robots.txt conflicts. Disable for faster parsing-only audits.",
            "default": true
          },
          "deepInspection": {
            "title": "Deep Page Inspection",
            "type": "boolean",
            "description": "Fetch a sample of pages to check for canonical tag mismatches, noindex directives in sitemap, and hreflang consistency.",
            "default": true
          },
          "inspectionSampleSize": {
            "title": "Inspection Sample Size",
            "minimum": 10,
            "maximum": 500,
            "type": "integer",
            "description": "Number of pages to deeply inspect per domain (only used when Deep Page Inspection is enabled). Higher values give more complete results but take longer.",
            "default": 100
          },
          "crawlDepth": {
            "title": "Missing Pages Crawl Depth",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Crawl each site to discover pages that are linked but missing from the sitemap. Set to 0 to disable crawling entirely.",
            "default": 3
          },
          "maxPagesToCrawl": {
            "title": "Max Pages to Crawl",
            "minimum": 50,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of pages to crawl per domain when looking for missing sitemap entries. Higher values find more missing pages but take longer and use more memory.",
            "default": 500
          },
          "maxUrlsToValidate": {
            "title": "Max URLs to Validate",
            "minimum": 100,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of sitemap URLs to validate via HEAD requests per domain. If the sitemap contains more URLs than this limit, a random sample will be validated. Prevents timeouts on very large sitemaps (10,000+ URLs).",
            "default": 2000
          },
          "maxUrlsToParse": {
            "title": "Max URLs to Parse",
            "minimum": 1000,
            "maximum": 500000,
            "type": "integer",
            "description": "Maximum number of URLs to collect during sitemap parsing. Enterprise sites can have 100,000+ URLs across dozens of sub-sitemaps — this cap prevents out-of-memory crashes. URLs beyond this limit are skipped (the audit still completes with a partial dataset).",
            "default": 50000
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of concurrent HTTP requests. Higher values are faster but may trigger rate limiting on some servers.",
            "default": 10
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "json",
              "csv"
            ],
            "type": "string",
            "description": "Format of the output data. JSON is default and works with Apify integrations. CSV is good for spreadsheets.",
            "default": "json"
          },
          "proxyConfig": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy servers to use for HTTP requests. Datacenter proxies are usually sufficient. Use residential proxies for sites with aggressive bot protection.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}