{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker - Find 404 & Dead Links on Any Website",
    "description": "Crawl a website and find every broken link and image (404, 410, 5xx, dead domains, SSL errors) with the page and anchor text. Alerts on new broken links. $1/1k pages + $0.50/1k links.",
    "version": "0.1",
    "x-build-id": "5N2iWQqyiP2HA9aVB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidytools~broken-link-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidytools-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/tidytools~broken-link-checker/runs": {
      "post": {
        "operationId": "runs-sync-tidytools-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/tidytools~broken-link-checker/run-sync": {
      "post": {
        "operationId": "run-sync-tidytools-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",
        "properties": {
          "urls": {
            "title": "URLs or domains",
            "type": "array",
            "description": "Main input (fill this, or `startUrls`). Home page (or any page) of each site to check, one per line: full URLs or bare domains like example.com. Up to 100. Invalid lines become a row with errorType \"invalid_input\" (not charged) instead of failing the run.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URL list files or request list (optional)",
            "type": "array",
            "description": "Older start URL field, kept for existing API calls. Use it to upload or link a .txt/.csv file of start URLs. Full URLs only here: bare domains such as example.com go in \"URLs or domains\" above. Both fields are combined (up to 100 start URLs).",
            "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": 10000,
            "type": "integer",
            "description": "Stop crawling after this many pages. Every link found on these pages is checked once.",
            "default": 100
          },
          "maxLinksToCheck": {
            "title": "Max links to check",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Optional cost cap: stop after checking this many unique links (internal links first, then images and assets, then external links). At the free-plan price of $0.50 per 1,000 links, 2,000 links cost at most $1.00. Leave empty for no cap (the run still stops at your maximum charge per run)."
          },
          "checkExternalLinks": {
            "title": "Check external links",
            "type": "boolean",
            "description": "Also check links that point to other websites. Turn off to check only your own pages.",
            "default": true
          },
          "reportRestricted": {
            "title": "Report restricted links",
            "type": "boolean",
            "description": "Also list links that answer 401/403/429 or sit behind bot protection (login walls, LinkedIn, Cloudflare challenge pages). These usually work in a normal browser, so they are never counted as broken and are hidden by default; the count is always in the status message and SUMMARY.restricted.",
            "default": false
          },
          "checkImages": {
            "title": "Check images",
            "type": "boolean",
            "description": "Also check every image on the crawled pages (<img> src). Each unique image counts as one checked link.",
            "default": true
          },
          "checkAssets": {
            "title": "Check CSS, JavaScript and iframes",
            "type": "boolean",
            "description": "Also check stylesheet, script and iframe URLs used by the pages. Each unique URL counts as one checked link.",
            "default": false
          },
          "report": {
            "title": "What to report",
            "enum": [
              "problems",
              "problems+redirects",
              "all"
            ],
            "type": "string",
            "description": "\"Problems + redirects\" also lists internal links that go through a redirect (they should point at the final URL). \"Everything\" lists every checked link with its status, response time, type and nofollow flag. Values: problems = Only problems (broken, server errors, unreachable); problems+redirects = Problems + internal links that redirect; all = Everything (full link inventory, including OK links).",
            "default": "problems"
          },
          "useSitemap": {
            "title": "Also crawl the pages in the sitemap",
            "type": "boolean",
            "description": "Add the pages listed in the site's XML sitemap (found from robots.txt or /sitemap.xml) to the crawl, and check each sitemap URL itself. Pages still count toward Max pages.",
            "default": false
          },
          "sitemapUrl": {
            "title": "Sitemap URL (optional)",
            "type": "string",
            "description": "Use this sitemap instead of finding one automatically. Setting it turns on the sitemap option."
          },
          "crawlScope": {
            "title": "Crawl scope",
            "enum": [
              "domain",
              "path",
              "page"
            ],
            "type": "string",
            "description": "Which internal links to follow when crawling. Values: domain = Whole website (incl. subdomains); path = Same folder as the start URL; page = Only the start URLs.",
            "default": "domain"
          },
          "includeUrlPatterns": {
            "title": "Include URL patterns",
            "type": "array",
            "description": "Optional glob patterns; only matching pages are crawled, e.g. https://example.com/blog/**",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Exclude URL patterns",
            "type": "array",
            "description": "Optional glob patterns of pages not to crawl, e.g. **/tag/**",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many pages are crawled (and links checked) at the same time. Lower it for small or slow sites.",
            "default": 10
          },
          "mode": {
            "title": "Page reading mode",
            "enum": [
              "auto",
              "fast",
              "browser"
            ],
            "type": "string",
            "description": "\"Auto\" reads the raw HTML and uses a real browser only when a site blocks plain requests. \"Browser\" always renders pages, so links added by JavaScript are found too (slower). Values: auto = Auto (recommended); fast = Raw HTML only; browser = Browser (JavaScript-rendered links).",
            "default": "auto"
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Do not crawl pages that robots.txt disallows (they are not charged). Links to them are still checked.",
            "default": false
          },
          "slowThresholdMs": {
            "title": "Slow link threshold (ms)",
            "minimum": 500,
            "maximum": 60000,
            "type": "integer",
            "description": "Links that take longer than this to answer are flagged slow (listed in the \"Everything\" report and counted in the summary).",
            "default": 5000
          },
          "userAgent": {
            "title": "User-Agent for link checks",
            "type": "string",
            "description": "Optional User-Agent header for checking links. Leave empty to identify as TidyToolsLinkCheck."
          },
          "onlyNewBroken": {
            "title": "Only report new broken links (monitoring)",
            "type": "boolean",
            "description": "Remember this site's broken links between runs. After the first run, output only links that are newly broken since the last run, plus links that were fixed (change: fixed). SUMMARY and REPORT get a 'Since the last run' section. Use with a schedule and an Apify notification. Every page and link is still crawled, checked and charged as usual.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Runs with the same name are compared. Leave empty to use the start URL's host and path."
          },
          "httpVia": {
            "title": "Plain HTTP requests from",
            "enum": [
              "auto",
              "backend",
              "direct",
              "vm"
            ],
            "type": "string",
            "description": "Some sites block requests from data centers. Auto retries from a second network before falling back to a real browser. If both are refused, Auto also tries our second server (Oracle, different IP) before a real browser.",
            "default": "auto"
          },
          "pageTimeoutSecs": {
            "title": "Time limit per page (seconds)",
            "minimum": 0,
            "maximum": 900,
            "type": "integer",
            "description": "A page that takes longer to read (all retries and the browser fallback included) is skipped and not charged; links to it are still checked. 0 = no limit.",
            "default": 120
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Only used for page requests sent from Apify's network. Apify proxy usage is billed to your Apify account."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}