{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker: Site Crawler for 404s & Redirects",
    "description": "Crawl any website and check every internal and external link (plus images, scripts and CSS if you want). Get 404s, 5xx, DNS failures, timeouts and redirect chains, with the exact pages and anchor text that link to each one. Fast, no browser.",
    "version": "1.0",
    "x-build-id": "z2WuuiMANykWpKSfd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thomson-digital~broken-link-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thomson-digital-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/thomson-digital~broken-link-checker/runs": {
      "post": {
        "operationId": "runs-sync-thomson-digital-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/thomson-digital~broken-link-checker/run-sync": {
      "post": {
        "operationId": "run-sync-thomson-digital-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Website(s) to crawl. Pages on the same host (www and non-www count as the same site) are crawled; links to other sites are checked but not crawled.",
            "default": [
              {
                "url": "https://books.toscrape.com/"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPagesToCrawl": {
            "title": "Max pages to crawl",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of HTML pages to crawl for links.",
            "default": 20
          },
          "maxLinksToCheck": {
            "title": "Max unique links to check",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on unique links checked (and charged) per run.",
            "default": 2000
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "all",
              "broken",
              "brokenAndRedirects"
            ],
            "type": "string",
            "description": "Which checked links to write to the dataset. Every checked link is charged the same, whatever you output.",
            "default": "all"
          },
          "checkExternalLinks": {
            "title": "Check external links",
            "type": "boolean",
            "description": "Also check links that point to other websites.",
            "default": true
          },
          "checkAssets": {
            "title": "Also check assets",
            "type": "array",
            "description": "Check these embedded resources too: img, script, css, iframe, source (video/audio).",
            "items": {
              "type": "string",
              "enum": [
                "img",
                "script",
                "css",
                "iframe",
                "source"
              ],
              "enumTitles": [
                "Images",
                "Scripts",
                "Stylesheets",
                "Iframes",
                "Video / audio"
              ]
            },
            "default": []
          },
          "includeSubdomains": {
            "title": "Crawl subdomains",
            "type": "boolean",
            "description": "Treat subdomains (e.g. blog.example.com) as part of the site.",
            "default": false
          },
          "maxCrawlDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Clicks away from the start URL. 0 = only check links on the start page.",
            "default": 10
          },
          "includeUrlPatterns": {
            "title": "Only crawl URLs matching (regex)",
            "type": "array",
            "description": "Crawl only pages whose URL matches one of these regular expressions, e.g. /blog/. Links found are still checked.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Don't crawl URLs matching (regex)",
            "type": "array",
            "description": "Skip crawling pages matching these regular expressions, e.g. \\?page= or /tag/.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "treatAsOk": {
            "title": "Status codes to not count as broken",
            "type": "array",
            "description": "Many sites (LinkedIn, Cloudflare-protected pages) answer bots with 401/403/429/999 although the page works in a browser.",
            "default": [
              "401",
              "403",
              "429",
              "999"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxSourcesPerLink": {
            "title": "Max source pages listed per link",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many linking pages (with anchor text) to list in foundOn. foundOnCount always has the full count.",
            "default": 10
          },
          "useHeadRequests": {
            "title": "Use HEAD requests",
            "type": "boolean",
            "description": "Check with HEAD first (faster) and confirm errors with GET.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Parallel requests overall.",
            "default": 10
          },
          "perHostConcurrency": {
            "title": "Max concurrency per host",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel requests to any one host; keep low to be polite.",
            "default": 4
          },
          "requestTimeoutSecs": {
            "title": "Timeout (seconds)",
            "minimum": 3,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout per request.",
            "default": 15
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries on network errors, 429 and 502-504.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}