{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Redirect Chain & Status Checker",
    "description": "Bulk-check HTTP status codes and the full redirect chain for any URL list. Records every hop (status + Location), final URL, hop count, timing, and flags broken/dead links (4xx/5xx/timeouts). Batch from a URL list, CSV-like paste, or XML sitemap. Fast, monitor-friendly JSON — no browser needed.",
    "version": "1.0",
    "x-build-id": "wHpzRQ0uYiiu3LzNc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thomson-digital~http-redirect-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thomson-digital-http-redirect-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/thomson-digital~http-redirect-checker/runs": {
      "post": {
        "operationId": "runs-sync-thomson-digital-http-redirect-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/thomson-digital~http-redirect-checker/run-sync": {
      "post": {
        "operationId": "run-sync-thomson-digital-http-redirect-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 to check",
            "type": "array",
            "description": "One URL per line. Paste absolute http(s) URLs, or a CSV-like list (commas/newlines are fine). Each URL is checked for status code and the full redirect chain.",
            "default": [
              "https://example.com",
              "https://httpbin.org/redirect/2",
              "https://httpbin.org/redirect-to?url=https://example.com&status_code=301",
              "https://httpbin.org/status/404"
            ],
            "items": {
              "type": "string"
            }
          },
          "sitemapUrls": {
            "title": "Sitemap URLs (optional batch)",
            "type": "array",
            "description": "Optional. Fetch these XML sitemaps (or sitemap indexes) and check every <loc> URL found. Combined with the URLs list above. Keep maxUrls small for testing.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxUrls": {
            "title": "Max URLs to check",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on how many URLs are checked in this run (after de-duplication). Keep low for smoke tests; raise for bulk audits.",
            "default": 100
          },
          "requestMethod": {
            "title": "HTTP method",
            "enum": [
              "HEAD",
              "GET"
            ],
            "type": "string",
            "description": "HEAD is faster and enough for most status/redirect checks. GET is used automatically when a server rejects HEAD (405/403/501). Choose GET if you need response body size / content-type from the final hop.",
            "default": "HEAD"
          },
          "maxRedirects": {
            "title": "Max redirect hops",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Stop following redirects after this many hops (loop / chain protection).",
            "default": 15
          },
          "onlyBroken": {
            "title": "Only output broken / dead URLs",
            "type": "boolean",
            "description": "When enabled, only write rows that are broken (4xx/5xx), timed out, or hit a network error. Healthy 2xx/3xx finals are skipped.",
            "default": false
          },
          "onlyRedirects": {
            "title": "Only output URLs that redirect",
            "type": "boolean",
            "description": "When enabled, only write rows where hopCount >= 1 (or final URL differs from the start URL).",
            "default": false
          },
          "includeUrlPatterns": {
            "title": "Only include URLs matching (regex)",
            "type": "array",
            "description": "Optional. Keep only input URLs that match at least one regular expression.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Exclude URLs matching (regex)",
            "type": "array",
            "description": "Optional. Drop input URLs that match any of these regular expressions.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "saveResponseHeaders": {
            "title": "Save selected final-response headers",
            "type": "boolean",
            "description": "When enabled, include contentType, contentLength, server and cacheControl from the final response.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrent checks",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many URLs to check in parallel. Keep modest on the Free plan (default 5) to avoid rate limits and credit spikes.",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "Per-request timeout (seconds)",
            "minimum": 3,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for each hop request. Timeouts are recorded as broken with errorType=timeout.",
            "default": 20
          },
          "maxRetries": {
            "title": "Max retries on transient errors",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries for 429/5xx and transport errors on a single hop (not for following redirects).",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Most public URLs work without a proxy. Use Apify Proxy only if targets block datacenter IPs. Residential / higher tiers spend Free-plan credits fast — leave off unless needed.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}