{
  "openapi": "3.0.1",
  "info": {
    "title": "Broken Link Checker: Every 404 Billed Once",
    "description": "Find broken links and 404s on a page, a list, a whole site or its sitemap, billed per link the site answered for. An error on HEAD is re-checked with GET, and a site that refuses the checker is never called broken. One row per link with its status, verdict and page.",
    "version": "0.1",
    "x-build-id": "tDAxDu1AZksZbbRxq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pradio~broken-link-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pradio-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/pradio~broken-link-checker/runs": {
      "post": {
        "operationId": "runs-sync-pradio-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/pradio~broken-link-checker/run-sync": {
      "post": {
        "operationId": "run-sync-pradio-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",
        "properties": {
          "queries": {
            "title": "Pages or sites to check",
            "maxItems": 2000,
            "type": "array",
            "description": "The pages or sites to check: a full URL or a bare domain per line, at most 2,000. In Pages mode each is read once and every link on it is checked. In Crawl mode each is a start page. In Sitemap mode each names a site (or a sitemap .xml file). Every mode reads the site's robots.txt first and never reads a page it disallows.",
            "default": [
              "https://crawler-test.com/links/broken_links_internal",
              "https://crawler-test.com/links/broken_links_external",
              "https://example.com/"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "pages",
              "crawl",
              "sitemap"
            ],
            "type": "string",
            "description": "Which pages a run reads. Pages: only the pages you list. Crawl: each listed page and the pages on the same site it links to, breadth first, up to Max pages. Sitemap: the pages the site's sitemap lists, up to Max pages. Every mode honours the site's robots.txt and its crawl delay.",
            "default": "pages"
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "In Crawl and Sitemap modes, the most pages one run reads for links, across every entry (at most 2,000). Pages mode reads the pages you list, never more than 2,000 in one run. A site that refuses any request (403, 429 or 999) is read no further in the run.",
            "default": 50
          },
          "checkExternal": {
            "title": "Check links to other sites",
            "type": "boolean",
            "description": "Check links that point to other sites as well as links on the same site. Turn off to check only links on the site you named.",
            "default": true
          },
          "checkAssets": {
            "title": "Check images, scripts and stylesheets",
            "type": "boolean",
            "description": "Also check the images, scripts and stylesheets each page loads, not only its links. Each one found is a checked row.",
            "default": false
          },
          "slowThresholdMs": {
            "title": "Slow link threshold (ms)",
            "minimum": 100,
            "maximum": 60000,
            "type": "integer",
            "description": "A healthy link whose check takes longer than this many milliseconds, redirects included, gets the diagnosis slow. It changes no verdict and no charge.",
            "default": 5000
          },
          "requestTimeoutMs": {
            "title": "Request timeout (ms)",
            "minimum": 1000,
            "maximum": 60000,
            "type": "integer",
            "description": "How long one link check waits for an answer, in milliseconds, before the link comes back as a free error row with the diagnosis timeout. Raise it for slow servers, lower it for a fast sweep. Pages read for links always wait at least 15 seconds.",
            "default": 15000
          },
          "maxRedirects": {
            "title": "Max redirects per link",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many redirects a link check follows, at most 10. Set 0 to report each redirect itself without following it (the diagnosis redirect_unfollowed). A link that still redirects after a lower cap is reported the same way; only a chain past 10 is a redirect loop.",
            "default": 10
          },
          "maxConcurrency": {
            "title": "Links checked at once",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many links are checked at the same time, at most 8, each on a different site: one site never gets more than one request at a time. Lower it to check fewer sites at once.",
            "default": 8
          },
          "maxResultsPerQuery": {
            "title": "Max links checked per page",
            "type": "integer",
            "description": "The most new links checked from one page read; leave unset to check every link the page carries."
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "type": "integer",
            "description": "The most link rows one run returns in total; rows past the cap are dropped and the run summary shows how many links were checked.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}