{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker: Crawl a Website, Find 404s & Redirects",
    "description": "Crawl your website and check every link once: find 404s, server errors, redirect chains and loops, with the pages and anchor text where each broken link appears. Optional images, scripts and external links, sitemap seeding and robots.txt. For SEO audits and migrations.",
    "version": "0.0",
    "x-build-id": "4hQJU0IHsWfYIh8Ur"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/charlesmarkette~broken-link-checker-crawl-website-404/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-charlesmarkette-broken-link-checker-crawl-website-404",
        "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/charlesmarkette~broken-link-checker-crawl-website-404/runs": {
      "post": {
        "operationId": "runs-sync-charlesmarkette-broken-link-checker-crawl-website-404",
        "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/charlesmarkette~broken-link-checker-crawl-website-404/run-sync": {
      "post": {
        "operationId": "run-sync-charlesmarkette-broken-link-checker-crawl-website-404",
        "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": "Where the crawl starts, usually your home page. One per line. The crawl stays on these sites (see Crawl scope); bare domains (example.com) become https://example.com/.",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Max pages to crawl",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many HTML pages of your site to download and read for links (1–10,000). Links found on them are all checked, so the number of checked links is usually much larger.",
            "default": 200
          },
          "maxDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many clicks away from a start URL a page may be and still be crawled. 0 = only the start URLs (and sitemap URLs) are read; their links are still checked.",
            "default": 10
          },
          "crawlScope": {
            "title": "Crawl scope",
            "enum": [
              "sameHost",
              "sameDomain"
            ],
            "type": "string",
            "description": "Which pages count as your site (internal) and get crawled. Same host: exactly the start URL's host name (www.example.com). Same domain: also every subdomain (example.com, blog.example.com, shop.example.com). Everything else is an external link: checked once, never crawled.",
            "default": "sameHost"
          },
          "includeSitemap": {
            "title": "Use the sitemap",
            "type": "boolean",
            "description": "Also start from the URLs in /sitemap.xml and the sitemaps listed in robots.txt (sitemap index files are followed; at most 25 sitemap files, and at most 'Max pages' URLs are taken from them). Finds pages that nothing links to, and reports broken sitemap entries (foundOn shows the sitemap).",
            "default": true
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Don't crawl (download and read) pages that robots.txt disallows. Links to them are still checked once, like a visitor clicking them, and marked robotsDisallowed.",
            "default": true
          },
          "checkExternalLinks": {
            "title": "Check external links",
            "type": "boolean",
            "description": "Also check links that point to other websites (one request each; they're never crawled). Off: external links are skipped and not output.",
            "default": true
          },
          "checkResources": {
            "title": "Check images, scripts and stylesheets",
            "type": "boolean",
            "description": "Also check <img src> and srcset, <picture> sources, <script src> and <link rel=stylesheet> files, not only <a href> links.",
            "default": false
          },
          "ignoreUrlPatterns": {
            "title": "Ignore URLs matching",
            "type": "array",
            "description": "Regular expressions (case-insensitive, up to 500 characters each). Links matching any of them are neither checked nor crawled, e.g. /wp-admin/, \\?replytocom=, ^https://(www\\.)?facebook\\.com/.",
            "items": {
              "type": "string"
            }
          },
          "onlyBrokenInOutput": {
            "title": "Output only broken links",
            "type": "boolean",
            "description": "On: only broken links (status 400 or higher, an error such as a timeout, DNS failure or refused connection, or a redirect loop) and unverified ones (401, 403, 429 or 999: the site blocked the check) are output. Every link is still checked and charged; the others are just left out of the dataset.",
            "default": false
          },
          "maxResults": {
            "title": "Max output rows",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Stop once this many rows are ready for output (each row is one unique link)."
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for each request (each redirect hop) before reporting 'Timed out'. A whole link, with all its redirect hops and retries, gets at most 4 times this (at least 60 seconds).",
            "default": 15
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many links to check at the same time in total (1–50).",
            "default": 10
          },
          "perHostConcurrency": {
            "title": "Parallel requests per host",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "At most this many requests at a time to any one host, including your own site, to stay polite (1–10).",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}