{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker — Find 404s, Dead Links & Redirect Issues",
    "description": "Crawl a website, scan a URL list, or verify all URLs from a sitemap. Returns broken links with source page, anchor text, status, redirect chain, and failure class — for SEO audits, content QA, and migration validation.",
    "version": "1.1",
    "x-build-id": "bTAMgJc0EBFkahDba"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~broken-link-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~broken-link-checker/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~broken-link-checker/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Input mode",
            "enum": [
              "crawl",
              "list",
              "sitemap"
            ],
            "type": "string",
            "description": "How URLs are sourced. 'crawl' starts at startUrl and crawls the site to maxPages, extracting and verifying every link found. 'list' verifies only the URLs in the urls array (no crawling). 'sitemap' fetches sitemap.xml from startUrl and verifies every URL found. Default: 'crawl'. Choose 'list' for outreach link audits and 'sitemap' for full-site URL coverage without crawling overhead.",
            "default": "crawl"
          },
          "startUrl": {
            "title": "Website URL or sitemap URL",
            "type": "string",
            "description": "The URL to start crawling from (mode='crawl') or the sitemap.xml URL (mode='sitemap'). Must include the protocol — example: 'https://example.com' or 'https://example.com/sitemap.xml'. Crawler stays within the same registrable domain by default. Ignored when mode='list'."
          },
          "urls": {
            "title": "URLs to verify",
            "type": "array",
            "description": "List of URLs to check directly without crawling. Used only when mode='list'. Each entry must be a full URL including protocol — example: ['https://example.com/page1', 'https://example.com/missing']. Up to 5000 URLs per run. Ignored when mode='crawl' or 'sitemap'.",
            "items": {
              "type": "string",
              "pattern": "^https?:\\/\\/.+"
            }
          },
          "maxPages": {
            "title": "Max pages to crawl",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of internal pages to crawl (mode='crawl' only). Higher values find more broken links but take longer. Default: 50. Set to a small value (5-10) for quick audits; 200-500 for thorough site reviews.",
            "default": 50
          },
          "maxLinksToCheck": {
            "title": "Max links to verify",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of unique links to verify per run. Caps cost on link-heavy sites. Default: 500. Each verified link triggers a 'link-checked' charge of $0.001.",
            "default": 500
          },
          "checkExternalLinks": {
            "title": "Check external links",
            "type": "boolean",
            "description": "Verify links pointing to other domains, not just internal links. Default: true. Set to false to focus only on same-domain links and reduce cost (typically halves the link count).",
            "default": true
          },
          "checkAssets": {
            "title": "Check images, scripts, and stylesheets",
            "type": "boolean",
            "description": "Also verify <img>, <script>, <link>, and <iframe> resource URLs in addition to <a> hyperlinks. Default: false. Enable for full content audits; disable for hyperlink-only checks (faster and cheaper).",
            "default": false
          },
          "onlyReportBroken": {
            "title": "Only report broken links",
            "type": "boolean",
            "description": "If true, dataset contains only broken/failing links (status >= 400, timeouts, errors). If false, every checked link is recorded with its status. Default: true. Set to false to get a complete link inventory with response times.",
            "default": true
          },
          "slowThresholdMs": {
            "title": "Slow link threshold (ms)",
            "minimum": 100,
            "maximum": 60000,
            "type": "integer",
            "description": "Response time in milliseconds above which a link is classified as 'slow'. Default: 5000. Slow links are reported (status 200 + slow flag) so you can find performance issues without classifying them as broken.",
            "default": 5000
          },
          "requestTimeoutMs": {
            "title": "Request timeout (ms)",
            "minimum": 1000,
            "maximum": 60000,
            "type": "integer",
            "description": "Maximum time to wait for a response before classifying a link as 'timeout'. Default: 15000 (15s). Increase for slow targets; decrease to fail fast on dead sites.",
            "default": 15000
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of concurrent HTTP requests during link verification. Default: 20. Higher values are faster but may trigger rate limits on small sites. Reduce to 5-10 for fragile or rate-limited targets.",
            "default": 20
          },
          "maxRedirects": {
            "title": "Max redirects to follow",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum redirect hops to follow per URL before classifying as 'redirect_loop'. Default: 10. Redirect chains longer than 2 hops are flagged as 'redirect_chain' (still a 200 but worth reviewing).",
            "default": 10
          },
          "userAgent": {
            "title": "User-Agent header",
            "type": "string",
            "description": "Custom User-Agent string sent on every request. Default identifies as ApifyBrokenLinkChecker. Use a browser UA if a target site blocks bots; leave default for transparency and lower block rate.",
            "default": "Mozilla/5.0 (compatible; ApifyBrokenLinkChecker/1.0; +https://apify.com)"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings for outbound requests. Default: no proxy (direct, fastest). Enable Apify Proxy only if a target site blocks your IP — most link checks work fine without proxies. Use residential group only when datacenter is blocked.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}