{
  "openapi": "3.0.1",
  "info": {
    "title": "Sitemap Generator — XML Sitemap Crawler",
    "description": "Crawl a website, discover indexable URLs, and generate XML sitemaps with crawl diagnostics, canonical checks, status codes, and exportable URL inventory.",
    "version": "1.0",
    "x-build-id": "M9TVP5ZEjZrVOtOdC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/junipr~sitemap-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-junipr-sitemap-generator",
        "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/junipr~sitemap-generator/runs": {
      "post": {
        "operationId": "runs-sync-junipr-sitemap-generator",
        "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/junipr~sitemap-generator/run-sync": {
      "post": {
        "operationId": "run-sync-junipr-sitemap-generator",
        "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": {
          "startUrl": {
            "title": "Start URL",
            "type": "string",
            "description": "The root URL to start crawling from. Must include protocol (https://).",
            "default": "https://crawlee.dev"
          },
          "maxPages": {
            "title": "Max Pages",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of pages to crawl. Higher values take longer but produce a more complete sitemap.",
            "default": 1
          },
          "maxDepth": {
            "title": "Max Crawl Depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum link-following depth from start URL. 0 means only the start URL. Higher values discover deeper pages.",
            "default": 0
          },
          "includePatterns": {
            "title": "Include URL Patterns",
            "type": "array",
            "description": "URL patterns to include (glob syntax). Empty means include all URLs. Examples: \"/blog/*\", \"*.html\", \"/products/*\".",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "excludePatterns": {
            "title": "Exclude URL Patterns",
            "type": "array",
            "description": "URL patterns to exclude (glob syntax). Applied after include patterns. Common file extensions are excluded by default.",
            "items": {
              "type": "string"
            },
            "default": [
              "*.pdf",
              "*.zip",
              "*.jpg",
              "*.png",
              "*.gif",
              "*.svg",
              "*.css",
              "*.js"
            ]
          },
          "excludeQueryParams": {
            "title": "Exclude Query Parameters",
            "type": "boolean",
            "description": "Treat URLs with different query parameters as the same page for deduplication.",
            "default": true
          },
          "respectCanonical": {
            "title": "Respect Canonical URLs",
            "type": "boolean",
            "description": "Follow <link rel=\"canonical\"> tags. Index the canonical URL and skip duplicates.",
            "default": true
          },
          "stayWithinDomain": {
            "title": "Stay Within Domain",
            "type": "boolean",
            "description": "Only crawl pages on the same domain as the start URL.",
            "default": true
          },
          "stayWithinPath": {
            "title": "Stay Within Path",
            "type": "boolean",
            "description": "Only crawl pages under the same path prefix as the start URL.",
            "default": false
          },
          "includeLastmod": {
            "title": "Include Last Modified",
            "type": "boolean",
            "description": "Include <lastmod> in the sitemap. Detected from Last-Modified header, <meta> tags, or schema.org dateModified.",
            "default": true
          },
          "includeChangefreq": {
            "title": "Include Change Frequency",
            "type": "boolean",
            "description": "Include <changefreq> in the sitemap. Estimated from content type heuristics.",
            "default": true
          },
          "includePriority": {
            "title": "Include Priority",
            "type": "boolean",
            "description": "Include <priority> in the sitemap. Calculated from page depth and inbound link count.",
            "default": true
          },
          "defaultChangefreq": {
            "title": "Default Change Frequency",
            "enum": [
              "always",
              "hourly",
              "daily",
              "weekly",
              "monthly",
              "yearly",
              "never"
            ],
            "type": "string",
            "description": "Default changefreq value when not estimable from content type.",
            "default": "weekly"
          },
          "sitemapFormat": {
            "title": "Sitemap Format",
            "enum": [
              "xml",
              "txt",
              "both"
            ],
            "type": "string",
            "description": "Output format: xml (standard XML sitemap), txt (plain URL list), or both.",
            "default": "xml"
          },
          "splitAtCount": {
            "title": "Split at URL Count",
            "minimum": 1000,
            "maximum": 50000,
            "type": "integer",
            "description": "Auto-split sitemap at this many URLs and generate a sitemap index. Per sitemap protocol spec, max is 50,000.",
            "default": 50000
          },
          "checkExistingSitemap": {
            "title": "Check Existing Sitemap",
            "type": "boolean",
            "description": "Check for existing sitemaps at robots.txt and common paths before crawling.",
            "default": false
          },
          "existingSitemapAction": {
            "title": "Existing Sitemap Action",
            "enum": [
              "merge",
              "replace",
              "compare"
            ],
            "type": "string",
            "description": "What to do when an existing sitemap is found: merge (combine with crawled), replace (ignore existing), or compare (output diff).",
            "default": "merge"
          },
          "sitemapPaths": {
            "title": "Sitemap Paths to Check",
            "type": "array",
            "description": "Additional paths to check for existing sitemaps, besides robots.txt.",
            "items": {
              "type": "string"
            },
            "default": [
              "/sitemap.xml",
              "/sitemap_index.xml",
              "/sitemap/"
            ]
          },
          "crawlerType": {
            "title": "Crawler Type",
            "enum": [
              "cheerio",
              "playwright"
            ],
            "type": "string",
            "description": "Crawler engine: cheerio (fast, static HTML) or playwright (JS rendering for SPAs).",
            "default": "cheerio"
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum concurrent requests (Cheerio) or browser pages (Playwright). Higher values crawl faster but use more resources.",
            "default": 1
          },
          "requestTimeout": {
            "title": "Request Timeout (ms)",
            "minimum": 5000,
            "maximum": 120000,
            "type": "integer",
            "description": "Timeout per page request in milliseconds.",
            "default": 30000
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retry failed page requests up to this many times.",
            "default": 2
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Honor robots.txt crawl directives and delays. Recommended to leave enabled.",
            "default": true
          },
          "userAgent": {
            "title": "User Agent",
            "type": "string",
            "description": "Custom User-Agent string sent with all requests.",
            "default": "JuniprSitemapBot/1.0"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Defaults to Apify datacenter proxies.",
            "default": {
              "useApifyProxy": true
            }
          },
          "httpHeaders": {
            "title": "HTTP Headers",
            "type": "object",
            "description": "Custom HTTP headers for all requests.",
            "default": {}
          },
          "cookies": {
            "title": "Cookies",
            "type": "array",
            "description": "Cookies to set for all requests. Each object needs name, value, and domain.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "title": "Cookie Name",
                  "description": "Name of the cookie"
                },
                "value": {
                  "type": "string",
                  "title": "Cookie Value",
                  "description": "Value of the cookie"
                },
                "domain": {
                  "type": "string",
                  "title": "Cookie Domain",
                  "description": "Domain the cookie applies to"
                }
              },
              "required": [
                "name",
                "value",
                "domain"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}