{
  "openapi": "3.0.1",
  "info": {
    "title": "Stealth Browser Agent",
    "description": "Human-like stealth browser session server on Apify RESIDENTIAL proxy — passes 7/7 bot-detection tests, snapshot-driven command API for LLM agents, live noVNC viewer, and Cloudflare-R2 persistent profiles for surviving logins across runs.",
    "version": "1.0",
    "x-build-id": "S75N2a9uovEdc2eAs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reqeique~apify-stealth-browser/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reqeique-apify-stealth-browser",
        "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/reqeique~apify-stealth-browser/runs": {
      "post": {
        "operationId": "runs-sync-reqeique-apify-stealth-browser",
        "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/reqeique~apify-stealth-browser/run-sync": {
      "post": {
        "operationId": "run-sync-reqeique-apify-stealth-browser",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "server",
              "batch",
              "detect"
            ],
            "type": "string",
            "description": "'server' (default) runs the interactive session server; 'batch' runs the one-shot batch executor; 'detect' runs the 7-test bot-detection suite across both backends sequentially.",
            "default": "server"
          },
          "idle_timeout_s": {
            "title": "Idle timeout (seconds)",
            "minimum": 0,
            "maximum": 7200,
            "type": "integer",
            "description": "Server mode: exit the actor after this many seconds with no commands. 0 = never idle-exit (only on close).",
            "default": 300
          },
          "auth_token": {
            "title": "Auth token",
            "type": "string",
            "description": "Bearer token clients must send to /command, /events, /health. Defaults to the actor's APIFY_TOKEN."
          },
          "proxy_country": {
            "title": "Apify RESIDENTIAL proxy country",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code.",
            "default": "US"
          },
          "backend": {
            "title": "Browser backend",
            "enum": [
              "cloak",
              "zendriver"
            ],
            "type": "string",
            "description": "Interactive session browser: 'cloak' (default — CloakBrowser modified Chromium + Playwright API, humanize=True, non-headless; passes 7/7 detection tests) or 'zendriver' (CDP + human mouse emulation).",
            "default": "cloak"
          },
          "backends": {
            "title": "Detect-mode backends",
            "type": "array",
            "description": "List of backends to drive through the detect suite. Default: ['zendriver','cloak']. Accepted values: 'zendriver', 'cloak'.",
            "items": {
              "type": "string"
            },
            "default": [
              "zendriver",
              "cloak"
            ]
          },
          "batch": {
            "title": "Batch of commands (batch mode only)",
            "description": "JSONL string or array of step objects for one-shot batch mode."
          },
          "target_url": {
            "title": "Target URL (batch mode only)",
            "type": "string",
            "description": "If set and batch has no navigate, the actor navigates here first."
          },
          "max_steps": {
            "title": "Max steps (batch mode)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Safety cap on number of commands executed.",
            "default": 50
          },
          "dry_run": {
            "title": "Dry-run mode (batch mode)",
            "type": "boolean",
            "description": "Skip mutating commands (submit).",
            "default": true
          },
          "screenshot": {
            "title": "Capture final screenshot (batch mode)",
            "type": "boolean",
            "description": "Save a single PNG of the final page state.",
            "default": true
          },
          "twocaptcha_key": {
            "title": "2Captcha API key",
            "type": "string",
            "description": "Optional key for captcha solve (default impl returns false)."
          },
          "vnc": {
            "title": "Enable noVNC (in-browser viewer)",
            "type": "boolean",
            "description": "Server mode: heads the browser on Xvfb and serves noVNC at GET /vnc on the session URL, so you can drive multi-step logins (e.g. Google) by hand in your own browser.",
            "default": false
          },
          "session_name": {
            "title": "Persistent session name (R2 profile)",
            "type": "string",
            "description": "Server mode: name to save/restore the Chrome user-data-dir (cookies, localStorage, logins) to Cloudflare R2 across runs. Same name = same profile. Implies persist when set; set persist=false to disable."
          },
          "persist": {
            "title": "Persist profile to R2",
            "type": "boolean",
            "description": "Server mode: pull/push the browser profile to/from Cloudflare R2 on start/stop+interval. Requires R2_ENDPOINT_URL / R2_ACCESS_KEY_ID / R2_SECRET_ACCESS_KEY / R2_BUCKET_NAME actor env vars; otherwise logs a warning and runs with a non-persistent profile.",
            "default": false
          },
          "persist_interval_s": {
            "title": "Profile backup interval (seconds)",
            "minimum": 0,
            "maximum": 7200,
            "type": "integer",
            "description": "Server mode: periodic R2 backup cadence. 0 = only backup once on shutdown.",
            "default": 300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}