{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker - 404, Dead Link & Redirect Checker",
    "description": "Crawl a whole website and find every broken link: 404s, server errors, dead images, scripts and stylesheets, redirect chains and loops, plus mixed content. Each issue shows the page it is on and its anchor text. Checks external links too, respects robots.txt.",
    "version": "1.2",
    "x-build-id": "ndzveo79RUp7YMBm6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/batreek~broken-link-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-batreek-broken-link-checker",
        "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/batreek~broken-link-checker/runs": {
      "post": {
        "operationId": "runs-sync-batreek-broken-link-checker",
        "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/batreek~broken-link-checker/run-sync": {
      "post": {
        "operationId": "run-sync-batreek-broken-link-checker",
        "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": "Website(s) to audit. The crawler stays on the same host as each start URL.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPages": {
            "title": "Max pages to crawl",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of internal pages fetched per run. You pay only for on-site HTML pages that load successfully (status 200): 50 pages ≈ $0.10.",
            "default": 200
          },
          "maxDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "type": "integer",
            "description": "How many clicks away from the start URL to crawl. 0 = only the start pages.",
            "default": 10
          },
          "useSitemap": {
            "title": "Sitemap mode: also crawl URLs from sitemap.xml",
            "type": "boolean",
            "description": "Seed the crawl with every same-host URL in the site's sitemap (found via robots.txt Sitemap: lines, else /sitemap.xml; sitemap indexes and .gz files are read). Also flags sitemap URLs that are broken, redirect, are noindex or blocked by robots.txt, and orphan pages. Sitemap URLs that load are charged as normal pages crawled. Set Max crawl depth to 0 to check only sitemap URLs.",
            "default": false
          },
          "sitemapUrls": {
            "title": "Sitemap URLs (optional)",
            "type": "array",
            "description": "Use these sitemap or sitemap index URLs instead of auto-discovery. Setting this turns on sitemap mode. Only URLs on the same host as a start URL are used.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "checkExternalLinks": {
            "title": "Check external links",
            "type": "boolean",
            "description": "Also verify links pointing to other websites (they are checked, never crawled).",
            "default": true
          },
          "checkImages": {
            "title": "Check images, scripts & stylesheets",
            "type": "boolean",
            "description": "Also verify <img>, <script> and <link rel=stylesheet> resources.",
            "default": true
          },
          "redirectChainThreshold": {
            "title": "Flag redirect chains longer than",
            "minimum": 0,
            "type": "integer",
            "description": "Report links that need more than this many redirect hops (SEO best practice: 1).",
            "default": 1
          },
          "reportRedirects": {
            "title": "Report redirected links",
            "type": "boolean",
            "description": "Include internal links that redirect (worth updating for SEO) as low-severity issues.",
            "default": true
          },
          "includeOkLinks": {
            "title": "Output every link (not only problems)",
            "type": "boolean",
            "description": "Output all checked links including healthy ones. Useful for full link inventories.",
            "default": false
          },
          "includeUrlPatterns": {
            "title": "Include URL patterns (crawl scope)",
            "type": "array",
            "description": "Optional. If set, only internal pages whose URL matches at least one pattern are crawled (start URLs are always crawled). Links to other internal pages are still checked once, just not crawled. Empty = crawl the whole site (default).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Exclude URL patterns",
            "type": "array",
            "description": "Patterns for URLs that are neither crawled nor checked (e.g. /wp-admin/, \\?replytocom=). Regular expressions by default; see Pattern syntax.",
            "items": {
              "type": "string"
            }
          },
          "urlPatternSyntax": {
            "title": "Pattern syntax",
            "enum": [
              "regex",
              "glob"
            ],
            "type": "string",
            "description": "How include and exclude patterns are read. Regex matches anywhere in the URL. Glob matches the whole URL; a glob that does not start with http(s):// or * may appear anywhere in the URL, e.g. /blog/* .",
            "default": "regex"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Parallel requests. Keep it modest to be gentle on the audited site.",
            "default": 8
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Do not crawl internal pages disallowed by robots.txt. Leave on unless you own the site.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}