{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker: Dead Links, Missing Images, Bad Redirects",
    "description": "Crawl a website and check every link, image, script and stylesheet. Each broken link comes back with the page it sits on, its link text and the HTTP status. Errors from sites that block checkers, such as Facebook, are marked blocked for a hand check.",
    "version": "0.0",
    "x-build-id": "AlcdwIa0wMXEKgVwv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/evenwork~broken-link-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-evenwork-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/evenwork~broken-link-checker/runs": {
      "post": {
        "operationId": "runs-sync-evenwork-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/evenwork~broken-link-checker/run-sync": {
      "post": {
        "operationId": "run-sync-evenwork-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": "Websites or start pages",
            "type": "array",
            "description": "A domain (example.com) or a page URL. The checker starts there and follows links on the same site (www and non-www count as one site). Several sites can run in one go.",
            "items": {
              "type": "string"
            }
          },
          "maxPagesPerSite": {
            "title": "Maximum pages to scan per site",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Each scanned page is one charged event. 1 to 10,000.",
            "default": 100
          },
          "maxDepth": {
            "title": "Maximum click depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "0 scans only the start page. 1 adds the pages it links to, and so on. 0 to 20.",
            "default": 5
          },
          "onlyUnderStartPath": {
            "title": "Only scan pages under the start folder",
            "type": "boolean",
            "description": "Start at example.com/blog/ and only /blog/ pages are scanned. Links to other parts of the site are still checked.",
            "default": false
          },
          "checkExternalLinks": {
            "title": "Check links to other websites",
            "type": "boolean",
            "description": "Off: only links within the scanned site are checked. Links to other sites are not charged either way.",
            "default": true
          },
          "checkResources": {
            "title": "Check images, scripts, stylesheets and iframes",
            "type": "boolean",
            "description": "Off: only page links (a and area tags) are checked. Images, scripts, stylesheets, iframes, audio, video, icons and canonical tags are skipped.",
            "default": true
          },
          "reportBlocked": {
            "title": "Report links the target site refused to answer",
            "type": "boolean",
            "description": "HTTP 401, 403, 429 and 999, plus any error from social and marketplace sites that block checkers. These come back with verdict 'blocked' so you can check them by hand.",
            "default": true
          },
          "includeOkLinks": {
            "title": "Output working links too",
            "type": "boolean",
            "description": "Off: only problem links are output. On: every link found, one row per page it appears on.",
            "default": false
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Pages your robots.txt disallows are not fetched. Turn off to check your own site's private sections.",
            "default": true
          },
          "maxLinkChecksPerSite": {
            "title": "Maximum link checks per site",
            "minimum": 10,
            "maximum": 50000,
            "type": "integer",
            "description": "A safety cap on unique links checked per site. Link checks are not charged. 10 to 50,000.",
            "default": 5000
          },
          "concurrency": {
            "title": "Requests at once",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "1 to 50. Never more than 5 at once to the site being scanned.",
            "default": 10
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "5 to 60.",
            "default": 15
          },
          "userAgent": {
            "title": "User-Agent",
            "type": "string",
            "description": "Optional. The User-Agent header sent with each request."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}