{
  "openapi": "3.0.1",
  "info": {
    "title": "URL Status Checker: Redirect Maps, Sitemaps & Broken Links",
    "description": "Check URLs in bulk: status, every redirect hop, final URL, title, canonical, noindex. Verify a migration's redirect map, audit every URL in a site's sitemaps, crawl for broken links, and get each URL's issues named and summed up. $1 per 1,000 URLs.",
    "version": "0.1",
    "x-build-id": "YDsKMRgoXHQ4BrhtC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pikoulas~url-status-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pikoulas-url-status-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/pikoulas~url-status-checker/runs": {
      "post": {
        "operationId": "runs-sync-pikoulas-url-status-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/pikoulas~url-status-checker/run-sync": {
      "post": {
        "operationId": "run-sync-pikoulas-url-status-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": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "The URLs to check, any number. A bare domain such as example.com is read as https://example.com/.",
            "items": {
              "type": "string"
            }
          },
          "redirectMap": {
            "title": "Redirect map: old URL and where it should go",
            "type": "array",
            "description": "One pair a line, the old URL then the URL it should redirect to, apart by a space, a comma, a tab or ->. The new one may be a path on the old URL's site. Each old URL is followed to its end and says whether it landed there (matchesExpected), or names wrong-target or not-redirected in its issues: a site migration's redirects checked in one run.",
            "items": {
              "type": "string"
            }
          },
          "sitemaps": {
            "title": "Check every URL in these sitemaps",
            "type": "array",
            "description": "Sites or sitemap URLs. For a site, the sitemaps its robots.txt names are read, or else the first at a usual path (/sitemap.xml, /sitemap_index.xml, /wp-sitemap.xml, /sitemap.txt); indexes and .gz files are followed. Each URL listed is checked, and says which sitemap lists it. A sitemap should list only final, indexable pages, so a listed URL that redirects, is noindex, broken or canonicalized elsewhere is named in its issues.",
            "items": {
              "type": "string"
            }
          },
          "maxSitemapUrls": {
            "title": "Max URLs per sitemap site",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "The most URLs taken from each site or sitemap above, in the sitemaps' order.",
            "default": 10000
          },
          "linksOn": {
            "title": "Check the links on these pages",
            "type": "array",
            "description": "Pages whose links are checked too, to find the broken ones. Each row says which of these pages a link was found on.",
            "items": {
              "type": "string"
            }
          },
          "crawl": {
            "title": "Crawl these sites",
            "type": "array",
            "description": "Start pages, usually a home page: every page of the same site reached through links from it is checked, and so is every link on those pages, to find all broken links on a site. Each page checked counts as a URL.",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Max pages to crawl",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "The most pages of the sites above whose links are read, nearest the start first. Links found on them are checked whatever this is.",
            "default": 500
          },
          "linkScope": {
            "title": "Which links",
            "enum": [
              "all",
              "internal",
              "external"
            ],
            "type": "string",
            "description": "Which links on the pages above and the crawled pages are checked. The same site counts with or without www. A crawl follows the site's own links whatever this is.",
            "default": "all"
          },
          "maxLinksPerPage": {
            "title": "Max links per page",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The first links of each page, in page order, checked.",
            "default": 1000
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow each redirect to the final URL, giving every hop. Off, the first answer is the result, and a redirect counts as OK; with a redirect map, redirects are followed whatever this is.",
            "default": true
          },
          "onlyChanged": {
            "title": "Only changed URLs",
            "type": "boolean",
            "description": "Give only the URLs whose status, final URL, redirect count or error differs from the last run with the same memory name, or that are new to it. Run it on a schedule to be told when a page breaks or starts redirecting. Every URL checked is still charged.",
            "default": false
          },
          "memory": {
            "title": "Memory name",
            "type": "string",
            "description": "Runs with the same memory name compare against each other. Use another name for each list you monitor. The memory is a key-value store named url-status-checker-memory in your account.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}