{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker: Bulk URL Status, 404 & Redirect Checker",
    "description": "Find broken links, 404 errors and redirect chains across a whole website. Check sitemap URLs or URL lists in bulk: HTTP status code, redirect chain, response time and the page each broken link sits on, plus canonical, noindex and soft-404 flags.",
    "version": "1.0",
    "x-build-id": "xrDLR4pNbz8uIt1RK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mosaicked_sponge~url-health-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mosaicked_sponge-url-health-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/mosaicked_sponge~url-health-checker/runs": {
      "post": {
        "operationId": "runs-sync-mosaicked_sponge-url-health-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/mosaicked_sponge~url-health-checker/run-sync": {
      "post": {
        "operationId": "run-sync-mosaicked_sponge-url-health-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 (pages to check)",
            "type": "array",
            "description": "Pages to check. Each page is fetched, checked (status, redirects, canonical, noindex, mixed content, soft 404) and, with \"Check links on pages\" on, every link on it is checked too. URLs that look like sitemaps (.xml, .xml.gz, /sitemap) are read as sitemaps automatically.",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrls": {
            "title": "Sitemap URLs",
            "type": "array",
            "description": "XML sitemaps, sitemap index files (nested indexes are followed), gzipped .xml.gz sitemaps or plain-text URL lists. Every URL listed is checked. Sitemap files themselves are free; failed sitemaps are reported in the OUTPUT record.",
            "items": {
              "type": "string"
            }
          },
          "discoverSitemaps": {
            "title": "Find sitemaps automatically (robots.txt)",
            "type": "boolean",
            "description": "For each start URL's site, read robots.txt for Sitemap: lines (falls back to /sitemap.xml) and check every URL they list.",
            "default": false
          },
          "maxUrls": {
            "title": "Max URLs to check",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on unique URLs checked (and charged) in one run. URLs found above the cap are counted in OUTPUT but not checked or charged.",
            "default": 1000
          },
          "checkLinks": {
            "title": "Check links on pages",
            "type": "boolean",
            "description": "Extract every <a href> link from the start URL pages (and crawled pages) and check it. Each broken link row tells you the page it was found on, its anchor text and how many pages link to it.",
            "default": true
          },
          "checkExternalLinks": {
            "title": "Check external links too",
            "type": "boolean",
            "description": "Also check links that point to other websites. Off = only links on your own site(s).",
            "default": true
          },
          "crawlInternalLinks": {
            "title": "Crawl internal links",
            "type": "boolean",
            "description": "Follow links on your own site to discover more pages (up to the depth and page limits below) and check the links on those pages too.",
            "default": false
          },
          "maxCrawlDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many clicks away from the start URLs to crawl (1 = pages linked from the start URLs).",
            "default": 1
          },
          "maxPagesToCrawl": {
            "title": "Max pages to crawl",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of internal pages fetched and scanned for links (start URLs included). Links on them are still checked up to \"Max URLs to check\".",
            "default": 100
          },
          "checkLinksOnSitemapPages": {
            "title": "Also check links on sitemap pages",
            "type": "boolean",
            "description": "Off (default): sitemap URLs are checked themselves (status, redirects, SEO flags). On: links on each sitemap page are checked too. This can multiply the URL count, so keep an eye on \"Max URLs to check\".",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Total requests in flight at once.",
            "default": 20
          },
          "maxConcurrencyPerDomain": {
            "title": "Max parallel requests per domain",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Politeness limit: never more than this many requests at once to the same host. Lower it for small or rate-limited sites.",
            "default": 4
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 2,
            "maximum": 120,
            "type": "integer",
            "description": "A URL that does not answer within this time is reported as a timeout.",
            "default": 15
          },
          "maxRedirects": {
            "title": "Max redirects to follow",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Longer chains are reported as too_many_redirects. Loops are detected and reported as redirect_loop.",
            "default": 10
          },
          "slowThresholdMs": {
            "title": "Slow response threshold (ms)",
            "minimum": 100,
            "maximum": 120000,
            "type": "integer",
            "description": "Responses slower than this get the 'slow' flag.",
            "default": 3000
          },
          "userAgent": {
            "title": "User-Agent",
            "type": "string",
            "description": "Leave empty for the default, honest URLHealthChecker user agent."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Off by default (direct, fastest, accurate timings). Turn on only if a site blocks the checker.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}