{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker from Sitemap",
    "description": "Check every page in your XML sitemap for broken links. It reads the sitemap, visits each page and checks the links on it. You get 404s, server errors, redirect chains and slow pages, each with the page it was found on. If a site blocks the run, a row says why. Export to CSV or JSON.",
    "version": "0.0",
    "x-build-id": "yelcdLal2MYiAghm2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bjgomes~broken-link-checker-from-sitemap/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bjgomes-broken-link-checker-from-sitemap",
        "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/bjgomes~broken-link-checker-from-sitemap/runs": {
      "post": {
        "operationId": "runs-sync-bjgomes-broken-link-checker-from-sitemap",
        "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/bjgomes~broken-link-checker-from-sitemap/run-sync": {
      "post": {
        "operationId": "run-sync-bjgomes-broken-link-checker-from-sitemap",
        "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",
        "properties": {
          "startUrls": {
            "title": "Websites or sitemap URLs",
            "type": "array",
            "description": "The websites or sitemaps to check, as objects like {\"url\": \"https://example.com\"}. A homepage (or any page) stands for its whole site: its sitemaps are found from robots.txt, /sitemap.xml and /sitemap_index.xml, and every page they list is scanned for links, up to maxPages. A URL with .xml, .gz or 'sitemap' in its path is read directly as a sitemap. Pages that aren't in any sitemap aren't scanned. To check only certain pages, leave this empty and use pageUrls.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "pageUrls": {
            "title": "Single pages (no sitemap)",
            "type": "array",
            "description": "Pages to check on their own, as objects like {\"url\": \"https://example.com/blog/post\"}. Each page is fetched and every link on it is checked. No sitemap is read and no other page is scanned, so one page takes seconds. Each page that answers is charged as a scanned page, each unique link as a checked link. Use it alone (leave startUrls empty) or with startUrls: these pages go first, and a page in both is scanned once.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPages": {
            "title": "Maximum pages to scan",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after scanning this many pages across all inputs, pageUrls first, then sitemap pages. Each page that answers is charged once, so this caps the cost with maxLinks. Use 1 to 10 for a quick check.",
            "default": 100
          },
          "maxLinks": {
            "title": "Maximum links to check",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after checking this many unique links. Each unique link is checked, and charged, once, however many pages it's on.",
            "default": 5000
          },
          "checkExternalLinks": {
            "title": "Check external links",
            "type": "boolean",
            "description": "true: also check links to other websites. false: check only links to the same site as the input website or page (www. or not), which is cheaper and faster.",
            "default": true
          },
          "includeOkLinks": {
            "title": "Include working links",
            "type": "boolean",
            "description": "true: also list links that answered 200 quickly with no redirect. false: list only broken, redirected, slow, unverified and error rows. Every link is checked either way.",
            "default": false
          },
          "includeNotChecked": {
            "title": "Include links not checked",
            "type": "boolean",
            "description": "true: also list a row for each link that wasn't requested (robots.txt said no, it was over maxLinks, or the run stopped first). false: they're counted by reason in the run's status message instead. They're never charged.",
            "default": false
          },
          "slowThresholdMs": {
            "title": "Slow response threshold (ms)",
            "minimum": 100,
            "maximum": 120000,
            "type": "integer",
            "description": "A page or link whose response takes longer than this many milliseconds is flagged slow and always listed.",
            "default": 3000
          },
          "onlyChanges": {
            "title": "Changes only",
            "type": "boolean",
            "description": "For scheduled monitoring. true: output only broken links that are new since this job's last run, that now work ('fixed'), or that are no longer found ('removed'), in the change field. Error rows are always listed. Pages and links are charged as usual. A job is the same startUrls, pageUrls, maxPages, maxLinks and checkExternalLinks. Its state is kept in your account's key-value store 'broken-link-checker-changes', at most 20,000 broken links. false: every problem link.",
            "default": false
          },
          "includeStillBroken": {
            "title": "Include still-broken links",
            "type": "boolean",
            "description": "With onlyChanges on: also list links that were broken last run and still are, with change 'still-broken'.",
            "default": false
          },
          "resetChanges": {
            "title": "Start changes-only over",
            "type": "boolean",
            "description": "With onlyChanges on: forget this job's saved state, so every broken link counts as new and the state is replaced. Ignored when onlyChanges is off.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Maximum concurrent requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many link checks run at once. Never more than 4 at a time to one host, and robots.txt Crawl-delay is honoured.",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Seconds to wait for any one sitemap, robots.txt, page or link request before recording it as a timeout.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}