{
  "openapi": "3.0.1",
  "info": {
    "title": "Redirect Map Tester – Site Migration QA",
    "description": "For your own or authorised sites. Give it a list of old URLs and the target you expect each one to reach in a single redirect, and it reports PASS, wrong target, chains, loops and broken destinations. $0.001 per URL checked; timeouts and guard blocks are free.",
    "version": "0.1",
    "x-build-id": "PPPjfpgweXsZtrY3v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plainwren~redirect-map-tester/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plainwren-redirect-map-tester",
        "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/plainwren~redirect-map-tester/runs": {
      "post": {
        "operationId": "runs-sync-plainwren-redirect-map-tester",
        "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/plainwren~redirect-map-tester/run-sync": {
      "post": {
        "operationId": "run-sync-plainwren-redirect-map-tester",
        "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": {
          "mappings": {
            "title": "Redirect map",
            "type": "array",
            "description": "Rows of { oldUrl, expectedUrl?, expectedStatus? }. expectedUrl is optional: without it the row is a plain status and chain check. If you leave this empty (and csv empty), the run does a free demo of the trailing-slash redirect https://tools.plainwrenstudio.com/bots → https://tools.plainwrenstudio.com/bots/ (one 308 hop).",
            "default": [
              {
                "oldUrl": "https://tools.plainwrenstudio.com/bots",
                "expectedUrl": "https://tools.plainwrenstudio.com/bots/",
                "expectedStatus": 308
              }
            ]
          },
          "csv": {
            "title": "Or paste CSV",
            "type": "string",
            "description": "Optional CSV with a header row (oldUrl, expectedUrl) or two columns without a header. Added to the list above. Max about 2 MB."
          },
          "expectedStatus": {
            "title": "Expected redirect status",
            "minimum": 200,
            "maximum": 599,
            "type": "integer",
            "description": "Default for rows that do not set their own expectedStatus. 301 is the usual migration code. The built-in demo row sets 308, which is what the sample host actually returns. 200-599.",
            "default": 301
          },
          "maxHops": {
            "title": "Max hops",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Follow at most this many redirects (1-10, default 5). A longer chain is reported as CHAIN and not followed further.",
            "default": 5
          },
          "ignoreTrailingSlash": {
            "title": "Ignore trailing slash when comparing",
            "type": "boolean",
            "description": "Treat /page and /page/ as the same target.",
            "default": false
          },
          "ignoreQuery": {
            "title": "Ignore query strings when comparing",
            "type": "boolean",
            "description": "Treat ?utm=... variants as the same target.",
            "default": false
          },
          "requestsPerSecond": {
            "title": "Requests per second, per site",
            "minimum": 0.2,
            "maximum": 4,
            "type": "number",
            "description": "Polite rate on each host, one request at a time (0.2-4, default 2). Every hop counts as a request.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Sites at once",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many different hosts are checked at the same time (1-10, default 4). Each host still gets one request at a time.",
            "default": 4
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "5-60, default 15. A timeout is reported as BROKEN and is 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}