{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link & Redirect Checker",
    "description": "Find broken links, redirect chains, redirect loops and soft-404s on your website. Seeds pages from sitemaps, checks internal and external links politely (robots.txt-aware, about 1 request per second per host) and lists which page links to each problem. Clean JSON for SEO audits and AI agents.",
    "version": "0.1",
    "x-build-id": "cA1GSgx9JMAu65E9x"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/madpai~broken-link-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-madpai-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/madpai~broken-link-checker/runs": {
      "post": {
        "operationId": "runs-sync-madpai-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/madpai~broken-link-checker/run-sync": {
      "post": {
        "operationId": "run-sync-madpai-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Websites or start pages",
            "type": "array",
            "description": "Your site(s) to check: domains (example.com) or start page URLs. Only these sites are crawled; links to other sites are checked once each but never crawled.",
            "items": {
              "type": "string"
            }
          },
          "seedFromSitemap": {
            "title": "Seed pages from sitemaps",
            "type": "boolean",
            "description": "Also crawl pages listed in the site's XML sitemap (found via robots.txt or /sitemap.xml), so pages without inbound links are covered too.",
            "default": true
          },
          "maxPagesPerSite": {
            "title": "Max pages to crawl per site",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many pages per site are fetched and scanned for links. Each page can contain many links.",
            "default": 50
          },
          "maxLinks": {
            "title": "Max links to check",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Total cap on unique links checked (crawled pages count too). You pay per link checked, so this also caps cost. At about 1 request per second per host, large single-site runs take longer than the default 5-minute timeout.",
            "default": 1000
          },
          "checkExternalLinks": {
            "title": "Check links to other sites",
            "type": "boolean",
            "description": "Check outbound links too (one request each, robots.txt respected, about 1 request per second per host). External pages are never crawled.",
            "default": true
          },
          "checkAssets": {
            "title": "Also check images, scripts and stylesheets",
            "type": "boolean",
            "description": "Check img/script src and stylesheet/icon link href in addition to a[href] links.",
            "default": false
          },
          "includeRegex": {
            "title": "Only report links matching (regex)",
            "type": "string",
            "description": "Check and report only links matching this case-insensitive regular expression, e.g. /docs/. Pages are still crawled to find links."
          },
          "excludeRegex": {
            "title": "Skip links matching (regex)",
            "type": "string",
            "description": "Don't crawl or check URLs matching this case-insensitive regular expression, e.g. /tag/|\\?replytocom=."
          },
          "maxRedirects": {
            "title": "Max redirects to follow",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Redirect hops followed per link before it is reported as a loop (too many redirects).",
            "default": 10
          },
          "requestDelayMs": {
            "title": "Delay between requests to your site (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Per-host delay (about 1 request per second by default). robots.txt Crawl-delay is honoured if longer (max 30 s). Values under 1000 ms only apply to your own sites with \"I own these sites\" checked; other hosts always get at least 1 s.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Hosts in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many sites or hosts are processed at once. Requests to any single host stay sequential and rate-limited.",
            "default": 5
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Don't fetch URLs disallowed by robots.txt (reported as blocked-by-robots, free). Can only be turned off for your own sites, together with \"I own these sites\". External hosts' robots.txt is always respected.",
            "default": true
          },
          "ownSiteConfirmed": {
            "title": "I own or am authorised to crawl these sites",
            "type": "boolean",
            "description": "Only check this for your own sites. It allows turning off robots.txt and using delays under 1 second on the sites in \"urls\" (not on external hosts).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}