{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker",
    "description": "Crawls a website from a start page or sitemap and checks every link and image once. Each broken link comes with the page it is on, its anchor text, link type and status, and scheduled runs flag links that broke or were fixed since the last run.",
    "version": "0.1",
    "x-build-id": "0KD6uM4ibkR53T9Mp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deriverge~broken-link-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deriverge-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/deriverge~broken-link-checker/runs": {
      "post": {
        "operationId": "runs-sync-deriverge-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/deriverge~broken-link-checker/run-sync": {
      "post": {
        "operationId": "run-sync-deriverge-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": "The page to start crawling from, such as https://www.example.com/, or a sitemap such as https://www.example.com/sitemap.xml to check exactly the pages it lists. The crawl stays on the host of the start URL (www. or not). Several sites can be listed, one per line.",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Maximum pages per site",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "How many pages of the site are crawled for links. Links on those pages are all checked, including internal pages beyond this limit, which get a single request each.",
            "default": 100
          },
          "maxDepth": {
            "title": "Maximum click depth",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many clicks from the start page the crawl goes; 0 checks only the links on the start page. Empty means no depth limit."
          },
          "stayInStartFolder": {
            "title": "Stay in the start folder",
            "type": "boolean",
            "description": "Crawl only pages under the folder of the start URL, for example only /docs/ when you start at https://www.example.com/docs/. Links to the rest of the site are still checked with one request each.",
            "default": false
          },
          "checkExternalLinks": {
            "title": "Check links to other sites",
            "type": "boolean",
            "description": "Links to other websites are checked with one request each and never crawled. Off: only links within the site are checked.",
            "default": true
          },
          "checkImages": {
            "title": "Check images",
            "type": "boolean",
            "description": "Checks the src of every <img> tag, so missing images show up as broken links of type image.",
            "default": true
          },
          "checkScriptsAndStyles": {
            "title": "Check scripts, stylesheets and head links",
            "type": "boolean",
            "description": "Also checks <script src> and <link href>: stylesheets, icons, canonical URLs and hreflang alternates.",
            "default": false
          },
          "outputAllLinks": {
            "title": "Output all links, not only broken ones",
            "type": "boolean",
            "description": "Off: one row per broken link occurrence. On: one row for every link found on every crawled page, with its result (ok, broken, restricted, not checked), status and redirects, which makes a full link inventory of the site.",
            "default": false
          },
          "excludeUrls": {
            "title": "Skip URLs containing",
            "type": "array",
            "description": "Links whose address contains any of these texts are neither crawled nor checked, for example /logout, ?replytocom= or linkedin.com.",
            "items": {
              "type": "string"
            }
          },
          "maxLinks": {
            "title": "Maximum links to check",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "The most unique URLs checked in one run (crawled pages count too), so the cost stays predictable. Links found after the limit are counted in SUMMARY as not checked.",
            "default": 5000
          },
          "timeoutSecs": {
            "title": "Timeout per link",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "How long one link may take, redirects included, before it is reported as broken with the error class timeout.",
            "default": 15
          },
          "maxConcurrency": {
            "title": "Requests at once",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many requests run in parallel across all hosts.",
            "default": 20
          },
          "maxConcurrencyPerHost": {
            "title": "Requests at once per host",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "The most parallel requests one host gets, the crawled site included. A Crawl-delay in the site's robots.txt lowers this to one request at a time with that pause.",
            "default": 3
          },
          "userAgent": {
            "title": "User agent",
            "type": "string",
            "description": "Custom User-Agent header. robots.txt rules for its product token apply (for example MyBot/1.0 matches User-agent: MyBot). Empty means a current desktop Chrome user agent and the rules for User-agent: *."
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Name of the snapshot used to compare runs, for example \"blog-links\". Each broken link is then marked newly broken or still broken, links fixed since the last run are added as rows, and a CHANGES record lists them. A saved task gets a watch automatically."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}