{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Uptime Monitor",
    "description": "Bulk uptime monitor returning HTTP status, SSL expiry, content match, response time, A-F performance grade, 0-100 health score, and a specific failure diagnostic per URL — all in one call. Built for DevOps, SREs, SaaS founders, agencies, and AI agents.",
    "version": "0.2",
    "x-build-id": "NpKTtdfw4Np4lGFWy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~website-uptime-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-website-uptime-monitor",
        "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/khadinakbar~website-uptime-monitor/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-website-uptime-monitor",
        "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/khadinakbar~website-uptime-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-website-uptime-monitor",
        "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": {
          "startUrls": {
            "title": "URLs to monitor",
            "type": "array",
            "description": "List of website URLs to check (each as { url: 'https://example.com' }). Supports any HTTPS or HTTP URL — landing pages, APIs, status endpoints. Default: three sample URLs. Use this OR the simpler 'urls' array — both are accepted.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "urls": {
            "title": "URLs (simple array, optional)",
            "uniqueItems": true,
            "type": "array",
            "description": "Alternative simple input: a flat array of URL strings (e.g., ['https://a.com','https://b.com']). Combined with 'startUrls' if both provided. Useful for AI agents passing a plain list. Either field is fine.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Content keyword (optional)",
            "type": "string",
            "description": "If set, the response body must contain this case-insensitive substring or the URL is marked DOWN with diagnostic 'content_mismatch' (e.g., 'Sign up' to verify a landing page rendered). Leave empty to skip content verification. NOT a regex — for regex use the 'regex' field below."
          },
          "regex": {
            "title": "Content regex (optional)",
            "type": "string",
            "description": "If set, the response body must match this case-insensitive JavaScript regular expression or the URL is marked DOWN (e.g., 'sign\\s*up|register'). Takes precedence over 'keyword' when both are set. Leave empty to skip."
          },
          "expectedStatusCodes": {
            "title": "Expected status codes (optional)",
            "type": "array",
            "description": "List of HTTP status codes considered 'up' (e.g., [200, 301, 302]). Default accepts 2xx and 3xx as up. Use to enforce strict checks like '[200]' only. Codes outside the list mark the URL as DOWN.",
            "default": []
          },
          "method": {
            "title": "HTTP method",
            "enum": [
              "GET",
              "HEAD",
              "POST",
              "PUT",
              "DELETE",
              "OPTIONS"
            ],
            "type": "string",
            "description": "HTTP method used for each check. GET is the safe default and works for almost all sites. HEAD is faster and lighter but some servers respond differently. POST/PUT/DELETE only for API endpoints you own.",
            "default": "GET"
          },
          "checkSsl": {
            "title": "Inspect SSL certificate",
            "type": "boolean",
            "description": "When true (default), the actor inspects the SSL certificate of every HTTPS URL and reports issuer, expiry, and warns if expiring in ≤30 days. Set false to skip the TLS inspection (faster, but you lose SSL diagnostics). Has no effect on plain HTTP URLs.",
            "default": true
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "When true (default), 301/302/307/308 redirects are followed up to maxRedirects and the final URL is returned in 'finalUrl'. Set false to inspect the raw redirect response. Most uptime checks should leave this on.",
            "default": true
          },
          "maxRedirects": {
            "title": "Max redirects",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of redirect hops to follow before giving up. Default 5. Increase for sites with long redirect chains. Lower to detect redirect loops earlier.",
            "default": 5
          },
          "timeoutMs": {
            "title": "Request timeout (ms)",
            "minimum": 1000,
            "maximum": 300000,
            "type": "integer",
            "description": "Per-request timeout in milliseconds. Default 30,000 (30 s). Raise for slow APIs / cold-start endpoints. Lower to fail fast on unreachable hosts. Applies to both HTTP and SSL inspection.",
            "default": 30000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many URLs to check in parallel. Default 20. Higher = faster bulk runs but more memory and proxy load. Drop to 5 for tiny actors / shared environments. Bounded 1-100.",
            "default": 20
          },
          "userAgent": {
            "title": "Custom User-Agent (optional)",
            "type": "string",
            "description": "Override the default User-Agent header (e.g., 'MyMonitor/1.0'). Some sites cloak responses based on UA. Leave empty for the default 'Mozilla/5.0 ApifyUptimeMonitor/1.0' string."
          },
          "useApifyProxy": {
            "title": "Route through Apify proxy",
            "type": "boolean",
            "description": "When true, all checks go through Apify's proxy network, useful for geo-restricted sites or rate-limited endpoints. Default false (direct connection from Apify infrastructure). Costs extra proxy GB. Configure region in 'proxyConfiguration'.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration (advanced)",
            "type": "object",
            "description": "Full Apify proxy configuration object — set group, country, etc. Overrides 'useApifyProxy' if provided. Leave default {} for direct connections. See https://docs.apify.com/proxy.",
            "default": {}
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}