{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker API - 404s, Redirects & Retries",
    "description": "Checkers that mark working links broken and cannot send your own headers sell a 403 from a bot-hating site as broken. Every check here retries timeouts, 5xx and 429, honours Retry-After, takes your User-Agent and Authorization headers, and blocked, private or invalid URLs cost nothing.",
    "version": "0.1",
    "x-build-id": "uBazeaucpDRtNc5xD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/stas_k~broken-link-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-stas_k-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/stas_k~broken-link-checker/runs": {
      "post": {
        "operationId": "runs-sync-stas_k-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/stas_k~broken-link-checker/run-sync": {
      "post": {
        "operationId": "run-sync-stas_k-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 to check",
            "type": "array",
            "description": "Public HTTP(S) URLs or bare domains. Bare domains use HTTPS. Duplicate normalized URLs are checked once. Query strings are kept: two URLs that differ only by query are checked separately.",
            "items": {
              "type": "string"
            }
          },
          "sitemapUrl": {
            "title": "Sitemap URL",
            "type": "string",
            "description": "Optional sitemap URL. All links inside it are extracted and checked together with the urls list. Sitemap index files are followed."
          },
          "expectedStatusCodes": {
            "title": "Expected HTTP status codes",
            "type": "array",
            "description": "A response is healthy only when its final status code is in this list. Leave empty for the default HTTP 200-399 rule.",
            "items": {
              "type": "integer"
            }
          },
          "headers": {
            "title": "Custom request headers",
            "type": "object",
            "description": "Extra headers sent with every check, for example an Authorization bearer token or an Accept header. This fixes the 403 block: many sites reject the default bot user agent, here you control it.",
            "additionalProperties": true
          },
          "userAgent": {
            "title": "User-Agent",
            "type": "string",
            "description": "User-Agent header for the checks.",
            "default": "broken-link-checker/0.1 (Apify Actor)"
          },
          "timeoutSec": {
            "title": "Probe timeout (seconds)",
            "minimum": 3,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout per probe attempt.",
            "default": 15
          },
          "retries": {
            "title": "Automatic retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Extra attempts on network errors, timeouts, DNS failures, 429 and 5xx responses before a link is marked broken. A link that answers 200 on a retry is reported healthy, not broken. This is the core fix for false broken links.",
            "default": 2
          },
          "maxRedirects": {
            "title": "Maximum redirects",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Redirect hops followed before the chain is reported as a redirect loop. Zero means redirects are not followed: the first response is the verdict.",
            "default": 5
          },
          "slowThresholdMs": {
            "title": "Slow page threshold (ms)",
            "minimum": 1,
            "type": "integer",
            "description": "Responses slower than this are flagged slow.",
            "default": 2000
          },
          "maxItems": {
            "title": "Maximum URLs to check",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Input cap: only the first N unique URLs are checked. The coverage summary reports the rest.",
            "default": 10000
          },
          "concurrency": {
            "title": "Concurrent checks",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "How many URLs are checked in parallel.",
            "default": 8
          },
          "cacheMinutes": {
            "title": "Cache window (minutes)",
            "minimum": 0,
            "type": "integer",
            "description": "A fresh verdict from another run within this window is reused for free and marked fromCache. The cache key includes the expected status codes, headers and every probe setting (timeout, retries, redirects, slow threshold). Zero disables the cache.",
            "default": 60
          },
          "timeBudgetSeconds": {
            "title": "Time budget (seconds)",
            "minimum": 60,
            "type": "integer",
            "description": "Upper bound on the checking phase. When it is exhausted, the coverage summary reports omitted_by_time_budget.",
            "default": 3300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}