{
  "openapi": "3.0.1",
  "info": {
    "title": "Redirect Hop Destination and Private-Network Exposure Gate",
    "description": "Prove that no hop of a redirect chain reaches your internal network. For each URL the Actor walks every hop with automatic redirects off, resolves the hostname of each hop, classifies every address the resolver answers (public, RFC1918 private, loopback, ",
    "version": "0.1",
    "x-build-id": "QJ3WcxeO1KbKCZ9Sf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kingii98~redirect-hop-destination-and-private-network-exposure-gate/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kingii98-redirect-hop-destination-and-private-network-exposure-gate",
        "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/kingii98~redirect-hop-destination-and-private-network-exposure-gate/runs": {
      "post": {
        "operationId": "runs-sync-kingii98-redirect-hop-destination-and-private-network-exposure-gate",
        "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/kingii98~redirect-hop-destination-and-private-network-exposure-gate/run-sync": {
      "post": {
        "operationId": "run-sync-kingii98-redirect-hop-destination-and-private-network-exposure-gate",
        "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 walk",
            "maxItems": 200,
            "type": "array",
            "description": "1 to 200 absolute http or https URLs. Each URL is walked hop by hop with automatic redirects off. The hostname of every hop is resolved before the hop is sent, and a hop that resolves outside the public address class is reported and is NOT connected to. A URL with credentials in it is refused and gets its own row. Give the URLs your service accepts from a user, a partner or an agent tool.",
            "default": [
              "http://github.com/",
              "http://apify.com/",
              "https://wikipedia.org/",
              "http://www.iana.org/"
            ],
            "items": {
              "type": "string"
            }
          },
          "domains": {
            "title": "Bare hostnames to walk",
            "maxItems": 200,
            "type": "array",
            "description": "Hostnames without a scheme, for example 'example.com'. Each one is walked as https://<hostname>/. Use this field for an allowlist that you re-check every week, because the DNS records under a stable hostname change while the hostname does not. The urls list and this list are walked together, and the total of both is limited to 200 targets for each run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxHops": {
            "title": "Maximum hops for each URL",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many redirects the Actor follows for one URL. Hop 0 is the URL itself, so a limit of 10 walks the URL and up to 10 redirect targets. A chain that is still redirecting at the limit ends with the reason code TOO_MANY_HOPS and a verdict of error.",
            "default": 10
          },
          "followMethods": {
            "title": "Follow methods",
            "minItems": 1,
            "type": "array",
            "description": "The HTTP methods used to read a hop, in order. HEAD is tried first because it costs no body. A server that answers 400, 403, 404, 405 or 501 to a HEAD request is asked again with GET, which is what a redirect behind a HEAD-hostile server needs.",
            "items": {
              "type": "string",
              "enum": [
                "HEAD",
                "GET"
              ],
              "enumTitles": [
                "HEAD",
                "GET"
              ]
            },
            "default": [
              "HEAD",
              "GET"
            ]
          },
          "failOn": {
            "title": "Address classes that fail the gate",
            "minItems": 1,
            "type": "array",
            "description": "A hop that resolves into one of the selected classes makes the URL FAIL. 'private' covers RFC1918 and IPv6 unique-local. 'loopback' covers 127.0.0.0/8 and ::1. 'link_local' covers 169.254.0.0/16 and fe80::/10. 'metadata' covers the instance metadata endpoints of AWS, Azure, Google Cloud, Alibaba Cloud and Oracle Cloud. 'dns_rebind' fails a hop whose DNS answer mixes a public and a non-public address, or whose second lookup answers with a non-public address after the first answered public. 'carrier_nat' covers 100.64.0.0/10 and 'reserved' covers the documentation, benchmark, multicast and future-use blocks. A hop outside the public class is always reported, even when its class is not selected here.",
            "items": {
              "type": "string",
              "enum": [
                "private",
                "loopback",
                "link_local",
                "metadata",
                "dns_rebind",
                "carrier_nat",
                "reserved"
              ],
              "enumTitles": [
                "RFC1918 private and IPv6 unique-local",
                "Loopback",
                "Link-local",
                "Cloud metadata endpoints",
                "DNS rebind",
                "Carrier NAT (CGNAT)",
                "Reserved, documentation and multicast"
              ]
            },
            "default": [
              "private",
              "loopback",
              "link_local",
              "metadata",
              "dns_rebind"
            ]
          },
          "hopTimeoutSeconds": {
            "title": "Timeout for each hop (seconds)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "The time one hop may take, for the DNS lookup and for the HTTP request. A hop that runs out of time ends the chain with the reason code TIMEOUT and a verdict of error.",
            "default": 10
          },
          "concurrency": {
            "title": "URLs walked at one time",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many chains are walked in parallel. Each chain is still walked hop by hop, one hop after the other.",
            "default": 5
          },
          "maxResponseBytes": {
            "title": "Response byte cap for each hop",
            "minimum": 1000,
            "maximum": 2000000,
            "type": "integer",
            "description": "The gate reads the status line and the Location header of a hop, never the page. The body of a final answer is read against this cap and thrown away, so a large download cannot fill the run.",
            "default": 65536
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}