{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Crawl Preflight Auditor",
    "description": "Check robots.txt, sitemaps, static extraction quality, crawl risk, and estimated Apify costs before running a crawler or RAG ingestion job.",
    "version": "0.1",
    "x-build-id": "nDtUfkJW20YTjFBde"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sebastian-actors~website-crawl-preflight-auditor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sebastian-actors-website-crawl-preflight-auditor",
        "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/sebastian-actors~website-crawl-preflight-auditor/runs": {
      "post": {
        "operationId": "runs-sync-sebastian-actors-website-crawl-preflight-auditor",
        "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/sebastian-actors~website-crawl-preflight-auditor/run-sync": {
      "post": {
        "operationId": "run-sync-sebastian-actors-website-crawl-preflight-auditor",
        "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": "Website URL to audit, such as https://example.com. Used to discover robots.txt and common sitemap locations."
          },
          "sitemapUrl": {
            "title": "Sitemap URL",
            "type": "string",
            "description": "Optional XML sitemap or sitemap index URL to inspect."
          },
          "urls": {
            "title": "Sample URLs",
            "maxItems": 500,
            "type": "array",
            "description": "Optional list of public URLs to sample directly.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxOrigins": {
            "title": "Maximum origins",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of distinct website origins audited in one run. Limits apply independently to each origin.",
            "default": 10
          },
          "samplePages": {
            "title": "Sample pages",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Maximum number of pages to sample for static extraction diagnostics.",
            "default": 25
          },
          "maxSitemapUrls": {
            "title": "Max sitemap URLs",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Maximum number of sitemap URLs to inspect/count before stopping.",
            "default": 100000
          },
          "maxSitemapDepth": {
            "title": "Max sitemap depth",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Maximum depth for sitemap index recursion.",
            "default": 2
          },
          "sameDomainOnly": {
            "title": "Same domain only",
            "type": "boolean",
            "description": "Only include sitemap records and redirects on the exact audited origin (scheme, hostname, and port). Explicit input origins are still audited separately.",
            "default": true
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Use robots.txt rules when evaluating sample URLs and recommendations.",
            "default": true
          },
          "checkSitemaps": {
            "title": "Check sitemaps",
            "type": "boolean",
            "description": "Discover and parse sitemaps when possible.",
            "default": true
          },
          "checkSamplePages": {
            "title": "Check sample pages",
            "type": "boolean",
            "description": "Fetch sample pages to estimate static crawl quality and extraction difficulty.",
            "default": true
          },
          "estimateApifyCosts": {
            "title": "Estimate Apify costs",
            "type": "boolean",
            "description": "Estimate approximate static-fetch compute cost range based on discovered pages and sample diagnostics.",
            "default": true
          },
          "includeRecommendedSettings": {
            "title": "Include recommended settings",
            "type": "boolean",
            "description": "Output recommended settings for downstream crawl, SEO audit, or RAG Actors.",
            "default": true
          },
          "includeDisallowedPaths": {
            "title": "Include disallowed paths",
            "type": "boolean",
            "description": "Include summarized robots.txt disallow path patterns in the output.",
            "default": true
          },
          "includeSampleRows": {
            "title": "Include sample rows",
            "type": "boolean",
            "description": "Also write one dataset row per sampled page.",
            "default": true
          },
          "userAgent": {
            "title": "User agent",
            "type": "string",
            "description": "User agent used for robots.txt checks and HTTP requests.",
            "default": "WebsiteCrawlPreflightBot/1.0 (+https://apify.com)"
          },
          "urlAllowlistPatterns": {
            "title": "URL allowlist patterns",
            "type": "array",
            "description": "Optional regex patterns. If provided, only matching URLs are included in sampling and recommendations.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "urlBlocklistPatterns": {
            "title": "URL blocklist patterns",
            "type": "array",
            "description": "Optional regex patterns. Matching URLs are excluded from sampling and recommendations.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "requestTimeoutSecs": {
            "title": "Request timeout seconds",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout for robots, sitemap, and sample page requests.",
            "default": 20
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of sample page requests in parallel.",
            "default": 5
          },
          "costModel": {
            "title": "Cost model",
            "type": "object",
            "description": "Optional static-fetch cost model overrides."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}