{
  "openapi": "3.0.1",
  "info": {
    "title": "Redirect Checker & Migration QA (Redirect Map Validator)",
    "description": "Check redirect chains and validate site-migration redirect maps. Records every hop and flags loops, 302s, HTTPS downgrades, wrong destinations, broken final pages, canonical mismatches and noindex. Plain HTTP, robots.txt-aware.",
    "version": "1.0",
    "x-build-id": "V1xvBtgyFvQHJYaCt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/saiberops~redirect-migration-qa-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-saiberops-redirect-migration-qa-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/saiberops~redirect-migration-qa-checker/runs": {
      "post": {
        "operationId": "runs-sync-saiberops-redirect-migration-qa-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/saiberops~redirect-migration-qa-checker/run-sync": {
      "post": {
        "operationId": "run-sync-saiberops-redirect-migration-qa-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": "Each URL is requested without auto-following redirects, so every hop is recorded. Use full URLs, or paths like /pricing together with a base URL. Can be left empty when you only use the redirect map.",
            "items": {
              "type": "string"
            }
          },
          "redirectMap": {
            "title": "Redirect map (old URL → expected new URL)",
            "type": "array",
            "description": "Migration pairs to verify. Each item is {\"from\": \"old URL\", \"to\": \"expected final URL\"} or a string such as \"old-url, new-url\" or \"old-url -> new-url\". Relative paths use the base URL. Each pair reports whether the old URL really lands on the expected URL."
          },
          "baseUrl": {
            "title": "Base URL for relative paths",
            "type": "string",
            "description": "Optional. Resolves paths such as /old-page in either list, for example https://www.example.com.",
            "default": ""
          },
          "matchMode": {
            "title": "How to compare the final URL with the expected URL",
            "enum": [
              "strict",
              "ignoreTrailingSlash",
              "ignoreQueryAndTrailingSlash"
            ],
            "type": "string",
            "description": "strict: exact match (scheme and host compared case-insensitively). ignoreTrailingSlash: /page and /page/ count as the same. ignoreQueryAndTrailingSlash: also ignores ?query strings.",
            "default": "ignoreTrailingSlash"
          },
          "checkIndexability": {
            "title": "Check canonical and noindex on the final page",
            "type": "boolean",
            "description": "Reads the final HTML page's <head> (up to 512 KB) for the canonical link and robots meta tags, plus the X-Robots-Tag header.",
            "default": true
          },
          "migrationReport": {
            "title": "Create a migration summary report (one extra charge per run)",
            "type": "boolean",
            "description": "Saves a pass/fail summary (MIGRATION_REPORT) and a CSV of every URL that did not pass (FAILURES.csv) to the run's key-value store. Charged once per run as the migration-report event.",
            "default": false
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "On by default: URLs that robots.txt disallows for SaiberOpsBot are skipped and not charged. Turn off only for sites you own or are authorized to test.",
            "default": true
          },
          "maxRedirects": {
            "title": "Max redirects to follow",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Chains longer than this are reported as TOO_MANY_REDIRECTS.",
            "default": 10
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Total number of URLs checked at the same time.",
            "default": 10
          },
          "maxConcurrencyPerHost": {
            "title": "Max parallel requests per host",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Keeps the load on any single website polite. Raise it only for your own sites.",
            "default": 4
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 3,
            "maximum": 60,
            "type": "integer",
            "description": "How long to wait for each hop. Timed-out URLs are reported but not charged.",
            "default": 15
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}