{
  "openapi": "3.0.1",
  "info": {
    "title": "CloakBrowser Scraper",
    "description": "CloakBrowser Stealth Scraper is an Apify Actor for stealth cloak web scraping on protected websites, with JSON, HTML, or Markdown output, screenshots, interaction steps like click and scroll, session reuse, cookies, robots bypass, and Standby mode for real-time scraping APIs. Scrape with confidence!",
    "version": "0.0",
    "x-build-id": "xEXubolKXoetL4fo0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reinventingai~cloakbrowser-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reinventingai-cloakbrowser-scraper",
        "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/reinventingai~cloakbrowser-scraper/runs": {
      "post": {
        "operationId": "runs-sync-reinventingai-cloakbrowser-scraper",
        "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/reinventingai~cloakbrowser-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-reinventingai-cloakbrowser-scraper",
        "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": {
          "url": {
            "title": "Single URL",
            "type": "string",
            "description": "A single page URL to scrape."
          },
          "urls": {
            "title": "Multiple URLs",
            "type": "array",
            "description": "Optional list of URLs to scrape in sequence.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "markdown",
              "html",
              "json"
            ],
            "type": "string",
            "description": "Choose the main content format returned in the content field.",
            "default": "markdown"
          },
          "selector": {
            "title": "CSS selector",
            "type": "string",
            "description": "Optional CSS selector to limit extraction to one element. If empty, the full page is used."
          },
          "interactionSteps": {
            "title": "Interaction steps",
            "type": "array",
            "description": "Optional pre-extraction browser actions. Supported actions: wait, waitForSelector, click, hover, type, press, select, scroll, goto, screenshot. Use optional:true on cookie-banner or best-effort steps so the run can continue if the element is missing. Example: [{\"action\":\"click\",\"selector\":\"button.accept-cookies\",\"optional\":true},{\"action\":\"type\",\"selector\":\"input[name=q]\",\"text\":\"apify cloakbrowser\"},{\"action\":\"press\",\"key\":\"Enter\"}]"
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle",
              "commit"
            ],
            "type": "string",
            "description": "Playwright waitUntil mode used for page.goto(). 'load' is the safest default for sites that keep background requests open.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "Optional selector that must appear before extraction starts."
          },
          "waitForMs": {
            "title": "Extra wait after load (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Optional extra delay after navigation, useful for JS-heavy pages.",
            "default": 0
          },
          "scrollToBottom": {
            "title": "Scroll to bottom",
            "type": "boolean",
            "description": "Scroll down in steps to trigger lazy-loaded content.",
            "default": false
          },
          "maxScrollSteps": {
            "title": "Max scroll steps",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many scroll steps to take if scrollToBottom is enabled.",
            "default": 8
          },
          "scrollDelayMs": {
            "title": "Scroll delay (ms)",
            "minimum": 50,
            "maximum": 10000,
            "type": "integer",
            "description": "Delay between scroll steps.",
            "default": 500
          },
          "screenshot": {
            "title": "Capture screenshot",
            "type": "boolean",
            "description": "Store a screenshot in the Apify key-value store and return its key.",
            "default": false
          },
          "screenshotFullPage": {
            "title": "Full-page screenshot",
            "type": "boolean",
            "description": "Capture the whole page instead of just the viewport.",
            "default": true
          },
          "screenshotType": {
            "title": "Screenshot type",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "Image format used for stored screenshots.",
            "default": "png"
          },
          "headless": {
            "title": "Headless browser",
            "type": "boolean",
            "description": "Run browser in headless mode.",
            "default": true
          },
          "geoip": {
            "title": "Auto-match timezone and locale from proxy IP",
            "type": "boolean",
            "description": "Use CloakBrowser geoip mode to align browser timezone and locale with the proxy exit IP.",
            "default": false
          },
          "locale": {
            "title": "Browser locale",
            "type": "string",
            "description": "Optional locale like en-US."
          },
          "timezone": {
            "title": "Browser timezone",
            "type": "string",
            "description": "Optional IANA timezone like America/New_York."
          },
          "userAgent": {
            "title": "Custom user agent",
            "type": "string",
            "description": "Optional custom user agent passed into the browser context."
          },
          "viewportWidth": {
            "title": "Viewport width",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Optional viewport width override."
          },
          "viewportHeight": {
            "title": "Viewport height",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Optional viewport height override."
          },
          "humanize": {
            "title": "Humanize interactions",
            "type": "boolean",
            "description": "Enable CloakBrowser humanized scrolling, mouse, and keyboard behavior.",
            "default": true
          },
          "usePersistentContext": {
            "title": "Use persistent context",
            "type": "boolean",
            "description": "Use a real browser profile instead of an incognito context.",
            "default": true
          },
          "sessionProfileName": {
            "title": "Session profile name",
            "type": "string",
            "description": "Named persistent profile folder. Reuse the same name to keep browser session state across runs.",
            "default": "default"
          },
          "storageStateKey": {
            "title": "Import storage state from key",
            "type": "string",
            "description": "Optional key-value store key containing a Playwright storageState JSON object."
          },
          "storageState": {
            "title": "Inline storage state",
            "type": "object",
            "description": "Optional inline Playwright storageState object for importing cookies and localStorage."
          },
          "cookies": {
            "title": "Inline cookies",
            "type": "array",
            "description": "Optional array of Playwright cookie objects to seed into the browser context."
          },
          "localStorage": {
            "title": "Inline localStorage",
            "type": "object",
            "description": "Optional localStorage seed data. Use either an object keyed by origin or an array of { origin, items } entries."
          },
          "proxyUrl": {
            "title": "Custom proxy URL",
            "type": "string",
            "description": "Optional HTTP or SOCKS5 proxy URL passed directly to CloakBrowser."
          },
          "useApifyProxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Ask Apify for a proxy URL and pass it into CloakBrowser.",
            "default": false
          },
          "apifyProxyGroups": {
            "title": "Apify Proxy groups",
            "type": "array",
            "description": "Optional list of Apify proxy groups.",
            "items": {
              "type": "string"
            }
          },
          "apifyProxyCountry": {
            "title": "Apify Proxy country code",
            "type": "string",
            "description": "Optional 2-letter country code for Apify Proxy."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages to process in parallel in standard Actor mode.",
            "default": 1
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Timeout for navigation and selector waits.",
            "default": 90
          },
          "includeHtmlInJson": {
            "title": "Include HTML inside JSON output",
            "type": "boolean",
            "description": "When outputFormat is json, also include the extracted HTML fragment.",
            "default": false
          },
          "exportStorageState": {
            "title": "Export storage state",
            "type": "boolean",
            "description": "Save a Playwright storageState snapshot after the run.",
            "default": false
          },
          "exportStorageStateKey": {
            "title": "Storage state export key",
            "type": "string",
            "description": "Key-value store key used when exportStorageState is enabled.",
            "default": "STORAGE_STATE"
          },
          "exportCookies": {
            "title": "Export cookies",
            "type": "boolean",
            "description": "Save cookies after the run as a JSON array.",
            "default": false
          },
          "exportCookiesKey": {
            "title": "Cookies export key",
            "type": "string",
            "description": "Key-value store key used when exportCookies is enabled.",
            "default": "COOKIES"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}