{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Headers & Redirect Checker",
    "description": "Check HTTP headers and redirect chains: security score with values to set, CSP, HSTS, CORS and cache checks. Use when you need to audit headers or redirects.",
    "version": "0.0",
    "x-build-id": "cNUoiynRgyVStRKgY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plainpipe~http-headers-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plainpipe-http-headers-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/plainpipe~http-headers-checker/runs": {
      "post": {
        "operationId": "runs-sync-plainpipe-http-headers-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/plainpipe~http-headers-checker/run-sync": {
      "post": {
        "operationId": "run-sync-plainpipe-http-headers-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": "URLs to check, one per line, e.g. http://example.com/old-page. A bare domain such as example.com is read as https://example.com; start with http:// to test the HTTP to HTTPS redirect. Invalid entries are skipped with a log warning. Can be combined with a dataset below.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Read URLs from a dataset (optional)",
            "type": "string",
            "description": "ID or name of an Apify dataset whose items hold URLs, e.g. the output of a sitemap or crawler run (\"aBcD1234efGh5678\"). Items are read up to Max results. Leave empty to use only the URLs list."
          },
          "datasetUrlField": {
            "title": "Dataset URL field",
            "type": "string",
            "description": "Name of the field that holds the URL in each dataset item, e.g. url or loc. Default url.",
            "default": "url"
          },
          "method": {
            "title": "Request method",
            "enum": [
              "HEAD",
              "GET"
            ],
            "type": "string",
            "description": "HEAD (default) asks only for headers and is lighter. GET requests the full response like a browser, which some servers answer differently (for example compression is often only reported on GET). If a server refuses HEAD (405 or 501), that URL is retried with GET automatically.",
            "default": "HEAD"
          },
          "userAgent": {
            "title": "User-Agent",
            "enum": [
              "bot",
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Which client to present as. bot (default) sends a plain checker User-Agent. desktop and mobile send a browser-shaped desktop or Android string (still ending in SiteCheckBot/1.0), so servers that vary by device return that variant. Example: mobile.",
            "default": "bot"
          },
          "headers": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Extra headers to send with every request, as a JSON object, e.g. {\"Accept-Language\": \"de-DE\", \"X-Debug\": \"1\"}. A User-Agent here overrides the choice above. Headers that carry secrets (Authorization, API keys, tokens) are refused."
          },
          "origin": {
            "title": "Origin to test CORS with",
            "type": "string",
            "description": "Optional site to send as the Origin request header, e.g. example.org, to see how the URL answers cross-origin requests (Access-Control-Allow-Origin and related headers are analysed in every row)."
          },
          "maxRedirects": {
            "title": "Max redirects to follow",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Stop following after this many redirects, e.g. 5. Longer chains are reported with tooManyRedirects true. 0 records only the first response. Default 10.",
            "default": 10
          },
          "includeHopHeaders": {
            "title": "Include headers of every redirect hop",
            "type": "boolean",
            "description": "If true, each hop in redirectChain also carries all its response headers (useful to see where HSTS or caching headers are set). Default false keeps rows small.",
            "default": false
          },
          "checkHttp2": {
            "title": "Check HTTP/2 support",
            "type": "boolean",
            "description": "If true (default), opens one TLS handshake to the final HTTPS host to read whether it offers HTTP/2 (ALPN h2) and the TLS version. No extra HTTP request is made. HTTP/3 is read from the Alt-Svc header either way.",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "full",
              "flat"
            ],
            "type": "string",
            "description": "full (default) gives nested objects per URL: every hop, per-header scores, CSP, HSTS, CORS, cache details and all headers. flat gives one level of plain columns (lists joined with \" | \") that opens cleanly as CSV or in a spreadsheet.",
            "default": "full"
          },
          "maxConcurrency": {
            "title": "Parallel URLs",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many URLs to check at the same time, 1 to 5, e.g. 5. Requests to the same host stay at most one per second regardless. Default 5.",
            "default": 5
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Give up on a request after this many seconds, e.g. 15. A URL that times out is skipped and not charged. Default 15.",
            "default": 15
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Check at most this many URLs, e.g. 1000. You are charged per checked URL, so this also caps the cost. Default 100.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}