{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/adscrawl/main/json-schema/adscrawl-cloud-start-request-schema.json",
  "title": "CloudStartRequest",
  "description": "API-key callers must provide proxy; session callers must provide apiKeyId. These requirements depend on authentication.",
  "x-generated": "2026-10-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adscrawl-openapi.yaml#/components/schemas/CloudStartRequest",
  "type": "object",
  "properties": {
    "proxy": {
      "$ref": "#/$defs/Proxy"
    },
    "apiKeyId": {
      "type": "string",
      "format": "uuid"
    },
    "countryCode": {
      "type": "string",
      "description": "Session authentication only; cannot be combined with proxy."
    },
    "cookies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Cookie"
      }
    },
    "fingerprint": {
      "$ref": "#/$defs/Fingerprint"
    }
  },
  "$defs": {
    "Cookie": {
      "type": "object",
      "required": [
        "name",
        "domain"
      ],
      "description": "Preset browser cookie. Use native JSON booleans. Legacy browser-task inputs also accept compatibility forms for some flags. Launch defaults an omitted value to an empty string. Expiry aliases are Unix seconds.",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "value": {
          "type": "string",
          "default": ""
        },
        "domain": {
          "type": "string",
          "minLength": 1
        },
        "path": {
          "type": "string",
          "default": "/"
        },
        "secure": {
          "type": "boolean"
        },
        "httpOnly": {
          "type": "boolean"
        },
        "hostOnly": {
          "type": "boolean"
        },
        "sameSite": {
          "type": "string",
          "enum": [
            "Strict",
            "Lax",
            "None"
          ]
        },
        "session": {
          "type": "boolean"
        },
        "expires": {
          "type": "number"
        },
        "expirationDate": {
          "type": "number"
        },
        "expiry": {
          "type": "number"
        }
      }
    },
    "Fingerprint": {
      "type": "object",
      "description": "Browser fingerprint modes. Defaults and supported combinations depend on the workflow; the server maintains a coherent identity and seed.",
      "properties": {
        "webRtc": {
          "type": "string",
          "enum": [
            "forward",
            "real",
            "disabled"
          ]
        },
        "webGl": {
          "type": "string",
          "enum": [
            "random",
            "real"
          ]
        },
        "webGpu": {
          "type": "string",
          "enum": [
            "random",
            "real",
            "disabled"
          ]
        },
        "webGlImage": {
          "type": "string",
          "enum": [
            "random",
            "real"
          ]
        },
        "canvas": {
          "type": "string",
          "enum": [
            "random",
            "real"
          ]
        },
        "audioContext": {
          "type": "string",
          "enum": [
            "random",
            "real"
          ]
        },
        "clientRects": {
          "type": "string",
          "enum": [
            "random",
            "real"
          ]
        },
        "speechVoices": {
          "type": "string",
          "enum": [
            "random",
            "real"
          ]
        },
        "fonts": {
          "type": "string",
          "enum": [
            "random",
            "real"
          ]
        },
        "hardware": {
          "type": "string",
          "enum": [
            "random",
            "real"
          ]
        },
        "doNotTrack": {
          "type": "string",
          "enum": [
            "random",
            "enabled",
            "disabled"
          ]
        },
        "hardwareConcurrency": {
          "type": "integer",
          "minimum": 1,
          "maximum": 64
        },
        "deviceMemory": {
          "type": "integer",
          "minimum": 1,
          "maximum": 64
        }
      }
    },
    "Proxy": {
      "type": "object",
      "description": "Use server OR protocol/host/port. server must be an http:// or socks5:// URL with an explicit port, without embedded credentials, query, fragment, or non-root path. Port range is 1-65535. Provide both non-empty username and password, or omit both. Custom proxy and countryCode are mutually exclusive. Proxy failures never fall back to a direct connection.",
      "properties": {
        "server": {
          "type": "string"
        },
        "protocol": {
          "type": "string",
          "enum": [
            "http",
            "socks5"
          ]
        },
        "host": {
          "type": "string"
        },
        "port": {
          "oneOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 65535
            },
            {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          ]
        },
        "username": {
          "type": "string",
          "minLength": 1,
          "writeOnly": true
        },
        "password": {
          "type": "string",
          "minLength": 1,
          "writeOnly": true
        }
      },
      "oneOf": [
        {
          "required": [
            "server"
          ],
          "not": {
            "required": [
              "host"
            ]
          }
        },
        {
          "required": [
            "protocol",
            "host",
            "port"
          ],
          "not": {
            "required": [
              "server"
            ]
          }
        }
      ]
    }
  }
}