{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker: 404s, Redirect Chains & Soft 404s",
    "description": "Crawl your website and find broken links, images, scripts and CSS. Get status codes, full redirect chains, soft 404 hints, the page and anchor text for every link, and a run summary.",
    "version": "0.1",
    "x-build-id": "b7CebKLbjS4Zlg0gH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kayorama~broken-link-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kayorama-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/kayorama~broken-link-checker/runs": {
      "post": {
        "operationId": "runs-sync-kayorama-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/kayorama~broken-link-checker/run-sync": {
      "post": {
        "operationId": "run-sync-kayorama-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": "Pages to start crawling from, for example your home page. The crawler stays on the same host (www. and non-www count as one). One per line.",
            "default": [
              "https://crawlee.dev"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Max pages to crawl",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many internal HTML pages to open and read links from. Links found on those pages are all checked, so the number of checked links is usually much higher.",
            "default": 5
          },
          "maxDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many clicks away from a start URL the crawler goes. 0 checks only the links on the start pages.",
            "default": 3
          },
          "maxLinksToCheck": {
            "title": "Max links to check",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Safety cap on unique links checked per run (each one is a paid event). The run stops cleanly when it is reached and still writes the summary.",
            "default": 200
          },
          "checkExternalLinks": {
            "title": "Check external links",
            "type": "boolean",
            "description": "Also check links that point to other websites. They are checked with HEAD (GET if needed) and never crawled.",
            "default": true
          },
          "checkResources": {
            "title": "Check images, scripts and CSS",
            "type": "boolean",
            "description": "Check <img src>, <script src> and <link href> as well as normal <a href> links.",
            "default": true
          },
          "onlyBroken": {
            "title": "Only output problem links",
            "type": "boolean",
            "description": "On: one row per broken link, soft 404 and (optionally) blocked or redirected link. Off: one row for every checked link, also the ones that work.",
            "default": false
          },
          "includeRedirects": {
            "title": "Count redirects as issues",
            "type": "boolean",
            "description": "With 'Only output problem links' on, also output links that work but go through one or more redirects. Handy for cleaning up old URLs in menus and content.",
            "default": false
          },
          "includeBlocked": {
            "title": "Output blocked and rate-limited links",
            "type": "boolean",
            "description": "With 'Only output problem links' on, also output links that answered 401, 403, 429 or 999. These are often bot protection on the other site, not real dead links, so check them by hand.",
            "default": true
          },
          "rowPerSourcePage": {
            "title": "One row per page and link",
            "type": "boolean",
            "description": "Off: one row per unique link, with the pages it was found on in sourcePages. On: one row for every page the link appears on, with that page's anchor text.",
            "default": false
          },
          "ignoreUrlPatterns": {
            "title": "Ignore URLs matching",
            "type": "array",
            "description": "Links containing any of these are not crawled or checked. Plain text matches anywhere in the URL (for example /wp-admin/ or ?replytocom=). Wrap in slashes for a regular expression, for example /\\.pdf$/.",
            "items": {
              "type": "string"
            }
          },
          "timeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 3,
            "maximum": 60,
            "type": "integer",
            "description": "A link that gives no answer within this time is reported as broken with a TIMEOUT error.",
            "default": 10
          },
          "requestDelayMs": {
            "title": "Pause between requests to your site (ms)",
            "minimum": 100,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum time between two requests to the crawled site. External sites always get at least 1 second between requests, and a robots.txt Crawl-delay is respected.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}