{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker: Bulk URL Status, Redirects & Source Pages",
    "description": "Find broken links on any site: crawl, URL list or sitemap. Status codes, redirect chains and the page each link is on. $0.80 per 1,000 URLs, failures free.",
    "version": "0.1",
    "x-build-id": "bQ7KWJ20y2VWAf1f4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hillcountrybots~broken-link-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hillcountrybots-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/hillcountrybots~broken-link-checker/runs": {
      "post": {
        "operationId": "runs-sync-hillcountrybots-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/hillcountrybots~broken-link-checker/run-sync": {
      "post": {
        "operationId": "run-sync-hillcountrybots-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": "Required. One per line. Crawl mode: the homepage or page to start crawling from (a bare domain like example.com works). List mode: every URL you want checked. Sitemap mode: a website (its sitemap is found via robots.txt or /sitemap.xml) or a direct sitemap URL. Private, local and internal addresses are refused for free.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "crawl",
              "list",
              "sitemap"
            ],
            "type": "string",
            "description": "crawl = follow internal links from the start pages and check every link found (internal, external and optionally assets). list = check only the URLs you pasted. sitemap = check every URL listed in the site's XML sitemap (find dead pages your sitemap still advertises).",
            "default": "crawl"
          },
          "maxPagesToCrawl": {
            "title": "Max pages to crawl (crawl mode)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many internal HTML pages are opened to collect links. Each crawled page is also checked. 10 for a quick look, 100 to 500 for a typical small business site. Ignored in list and sitemap modes.",
            "default": 50
          },
          "maxUrlsToCheck": {
            "title": "Max URLs to check (spend cap)",
            "minimum": 1,
            "type": "integer",
            "description": "Total unique URLs checked in this run, crawled pages included. This caps spend: only URLs that return an HTTP status are charged. The run's own max-charge setting is also respected. Links found after the cap is reached are counted in RUN_SUMMARY as skippedOverCap.",
            "default": 1000
          },
          "checkExternalLinks": {
            "title": "Check external links",
            "type": "boolean",
            "description": "Also check links that point to other websites (crawl mode). External sites are checked once per URL with HEAD and never crawled.",
            "default": true
          },
          "includeAssets": {
            "title": "Check images, scripts and stylesheets",
            "type": "boolean",
            "description": "Also check img src, script src and stylesheet/icon links found on crawled pages. Finds missing images and dead CDN files. Adds more URLs per page.",
            "default": false
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "all",
              "problemsOnly"
            ],
            "type": "string",
            "description": "all = one row per checked URL. problemsOnly = store only broken, unreachable, blocked, redirect and skipped rows (the healthy URLs are still checked and counted in RUN_SUMMARY and charged).",
            "default": "all"
          },
          "includePatterns": {
            "title": "Only check URLs matching",
            "type": "array",
            "description": "Optional. Globs with * (e.g. https://example.com/blog/*) or /regex/. Links that do not match are not checked or crawled.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludePatterns": {
            "title": "Skip URLs matching",
            "type": "array",
            "description": "Optional. Globs or /regex/, e.g. */tag/* or https://twitter.com/*. Matching links are not checked or crawled.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "On (recommended): URLs disallowed by a site's robots.txt are not fetched and are reported as skipped (free).",
            "default": true
          },
          "maxConcurrency": {
            "title": "Total concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Requests in flight across all hosts (1-30).",
            "default": 10
          },
          "maxConcurrencyPerHost": {
            "title": "Concurrency per host",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Requests in flight to any single host (1-5). Keep this low to be polite to small sites.",
            "default": 2
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Seconds to wait for a response before a URL is marked unreachable (timeouts are retried once for crawled pages).",
            "default": 15
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}