{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link & Image Checker",
    "description": "Crawl your website and find every broken link, missing image, and dead script or stylesheet, plus the exact page each one sits on. Fast checks with no browser, redirect detection, external-link checking, and a summary of what failed and why.",
    "version": "0.1",
    "x-build-id": "H7ctk7aLv4ORKPfde"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moonweil~broken-link-scanner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moonweil-broken-link-scanner",
        "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/moonweil~broken-link-scanner/runs": {
      "post": {
        "operationId": "runs-sync-moonweil-broken-link-scanner",
        "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/moonweil~broken-link-scanner/run-sync": {
      "post": {
        "operationId": "run-sync-moonweil-broken-link-scanner",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "One or more URLs to analyze. When crawling is on, these are also the crawl seeds.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "crawl": {
            "title": "Crawl the website",
            "type": "boolean",
            "description": "Follow same-domain links from the start URLs. When off, only the start URLs are processed.",
            "default": true
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard limit on the number of pages processed. Protects compute cost — the crawl stops once it is reached.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Page concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many pages to process in parallel.",
            "default": 5
          },
          "sameDomainOnly": {
            "title": "Same domain only",
            "type": "boolean",
            "description": "Restrict the crawl to the hostname of each start URL (www and apex are treated as equal).",
            "default": true
          },
          "includeSubdomains": {
            "title": "Include subdomains",
            "type": "boolean",
            "description": "Also follow links to subdomains of the start URL's registrable domain.",
            "default": false
          },
          "useSitemap": {
            "title": "Discover URLs from sitemap.xml",
            "type": "boolean",
            "description": "Seed the crawl from the site's /sitemap.xml (and /sitemap_index.xml) in addition to the start URLs.",
            "default": false
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip URLs disallowed by the target site's robots.txt.",
            "default": true
          },
          "excludePatterns": {
            "title": "Exclude URL patterns",
            "type": "array",
            "description": "Glob-style deny patterns for URLs to skip, e.g. /logout, /cart*, *.zip",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "checkExternal": {
            "title": "Check external links",
            "type": "boolean",
            "description": "Also check links that point to other domains.",
            "default": true
          },
          "checkImages": {
            "title": "Check images",
            "type": "boolean",
            "description": "Also check <img src> resources.",
            "default": true
          },
          "checkScripts": {
            "title": "Check <script src>",
            "type": "boolean",
            "description": "Also check <script src> resources.",
            "default": false
          },
          "checkStylesheets": {
            "title": "Check stylesheets",
            "type": "boolean",
            "description": "Also check linked stylesheets.",
            "default": false
          },
          "reportRedirects": {
            "title": "Report redirecting URLs",
            "type": "boolean",
            "description": "Include URLs that resolve only after an HTTP redirect in the results.",
            "default": true
          },
          "onlyReportProblems": {
            "title": "Only output pages with problems",
            "type": "boolean",
            "description": "Skip dataset rows for pages where every URL is healthy.",
            "default": true
          },
          "treatBlockedAsBroken": {
            "title": "Count bot-protection blocks as broken",
            "type": "boolean",
            "description": "By default, external URLs that answer 403/429/503 with a Cloudflare-style anti-bot challenge are reported as \"blocked\" (state: blocked) and NOT counted as broken — they normally work in a real browser. Turn this on to treat them as broken links.",
            "default": false
          },
          "maxUrlsPerPage": {
            "title": "Max URLs checked per page",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on the number of URLs checked per page. Protects compute on link-heavy pages.",
            "default": 250
          },
          "linkCheckConcurrency": {
            "title": "Link-check concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many link checks to run in parallel per page.",
            "default": 10
          },
          "linkCheckTimeoutSecs": {
            "title": "Link-check timeout (s)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout in seconds for a single link check.",
            "default": 15
          },
          "debug": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Verbose logging. Also allows stack traces into the dataset.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}