# ConnectBrowser

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /connect/{profileId}:
    ws:
      summary: ConnectBrowser
      deprecated: false
      description: Launch and connect to a running browser or a created profile
      tags:
        - API/CDP Endpoints
        - v2/WebSocket
      parameters:
        - name: profileId
          in: path
          description: profileId
          required: true
          example: ''
          schema:
            type: string
        - name: config
          in: query
          description: >-
            profile options in URL-encoded format json string, see full schema
            in Body Params, <span style="color:#FA7448">please note that you
            can't carrying a Request Body in a`WS/GET`request so you have to
            encode params in URL-encoded format</span>
          required: false
          example: '%7B%0A++++%22headless%22%3A+true%0A%7D'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                autoClose:
                  description: indicates autoclose browser after finished
                  type: boolean
                timedCloseSec:
                  description: indicates autoclose browser after specified seconds
                  type: integer
                  examples:
                    - 30
                clearCacheOnClose:
                  description: >-
                    indicates delete local userdata when browser closed if not a
                    once profile
                  type: boolean
                forceUAVersion:
                  type: string
                  examples:
                    - '152'
                  description: >-
                    best-effort overrides UA-related fingerprints with the
                    specified version without changing the actual browser
                    version. <span style="color:#FA7448">supported in
                    `v1.22.4+`. using a version that does not match the kernel
                    may cause fingerprint inconsistencies or website
                    compatibility issues. use at your own risk.</span>
                headless:
                  type: string
                  description: heaadless mode
                incognito:
                  description: incognito mode
                  type: boolean
                proxy:
                  description: profile proxy, higher priority than proxyGroupName
                  type: string
                  examples:
                    - http://username:password@ip:port
                builtinProxy:
                  description: >-
                    nstbrowser builtin proxy options, <span
                    style="color:#FA7448">supported in `v1.19.0+`, the priority
                    is higher than the `proxy` parameter, please make sure you
                    have enought credits</span>
                  $ref: '#/components/schemas/nstbrowser.BuiltinProxy'
                skipProxyChecking:
                  description: indicates skip proxy checking when launch profile
                  type: boolean
                remoteDebuggingPort:
                  description: browser port
                  type: integer
                captchaSolver:
                  $ref: '#/components/schemas/CaptchaSolverSettings'
                  description: >-
                    CAPTCHA solver settings.<span
                    style="color:#FA7448">supported in `v1.23.0+`, please make
                    sure you have enought credits</span>
                startupUrls:
                  description: startup urls
                  type: array
                  items:
                    type: string
                urlBlockList:
                  type: array
                  items:
                    type: string
                    x-apidog-mock: www.google.com
                  description: >-
                    url block list, for example: `www.example.com`,  you also
                    can add `file://*` to block all file protocol urls
                urlAllowList:
                  type: array
                  items:
                    type: string
                  description: >-
                    url allow list in url block list, for example, you can add
                    `file://foo` to unblock from url block list
                args:
                  description: custom args with kernel command line switches
                  type: object
                  additionalProperties:
                    type: string
                  x-apifox-orders: []
                  properties: {}
                  x-apifox-ignore-properties: []
                  x-apidog-orders: []
                  x-apidog-ignore-properties: []
              x-apifox-refs: {}
              x-apifox-orders:
                - autoClose
                - timedCloseSec
                - clearCacheOnClose
                - headless
                - incognito
                - proxy
                - skipProxyChecking
                - remoteDebuggingPort
                - startupUrls
                - args
              x-apifox-ignore-properties: []
              x-apidog-orders:
                - autoClose
                - timedCloseSec
                - clearCacheOnClose
                - forceUAVersion
                - headless
                - incognito
                - proxy
                - builtinProxy
                - skipProxyChecking
                - remoteDebuggingPort
                - captchaSolver
                - startupUrls
                - urlBlockList
                - urlAllowList
                - args
              x-apidog-ignore-properties: []
            example: {}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rest.R-browser_RemoteDebuggingAddress'
          headers: {}
          x-apidog-name: OK
      security:
        - apikey-header-x-api-key: []
      x-apidog-folder: API/CDP Endpoints
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/438468/apis/api-15554920-run
components:
  schemas:
    CaptchaSolverSettings:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            whether to enable the built-in CAPTCHA Solver. when enabled, at
            least one CAPTCHA type must be selected.
          x-apidog-mock: 'true'
        types:
          type: object
          properties:
            recaptchaV2:
              type: boolean
              description: >-
                whether to solve reCAPTCHA v2. standard and enterprise variants
                are detected automatically.
              x-apidog-mock: 'true'
            recaptchaV3:
              type: boolean
              description: >-
                whether to solve reCAPTCHA v3. standard and enterprise variants
                are detected automatically.
              x-apidog-mock: 'true'
            textCaptcha:
              type: boolean
              description: whether to solve image-based text CAPTCHAs.
              x-apidog-mock: 'true'
            awsCaptcha:
              type: boolean
              description: whether to solve supported AWS CAPTCHA image challenges.
              x-apidog-mock: 'true'
            cloudflareTurnstile:
              type: boolean
              description: >-
                whether to solve Cloudflare Turnstile widgets. cloudflare
                full-page Challenge is not supported.
              x-apidog-mock: 'true'
          x-apidog-orders:
            - recaptchaV2
            - recaptchaV3
            - textCaptcha
            - awsCaptcha
            - cloudflareTurnstile
          description: >-
            CAPTCHA types enabled for automatic solving. all fields in this
            object are required.
          required:
            - recaptchaV2
            - recaptchaV3
            - textCaptcha
            - awsCaptcha
            - cloudflareTurnstile
          x-apidog-ignore-properties: []
      required:
        - enabled
        - types
      x-apidog-orders:
        - enabled
        - types
      description: >-
        CAPTCHA Solver configuration. all fields are required when this object
        is provided.
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    nstbrowser.BuiltinProxy:
      type: object
      properties:
        type:
          type: string
          description: 'builtin proxy type: `residential | ipv6 | datacenter`'
          enum:
            - residential
            - ipv6
            - datacenter
          x-apidog-enum:
            - value: residential
              name: ''
              description: residential proxy
            - value: ipv6
              name: ''
              description: ipv6 proxy
            - value: datacenter
              name: ''
              description: datacenter proxy
        country:
          type: string
          description: >-
            optional country code: `US | CA | HK |
            ...`[more](https://docs.nstbrowser.io/guide/advanced/proxy.html#_1-use-integrated-proxy-when-creating-or-editing-a-profile)
          examples:
            - US
          default: ANY
        sessionDuration:
          type: integer
          description: session duration in minutes
          default: 10
          examples:
            - 10
        protocol:
          type: string
          description: proxy protocol
          enum:
            - http
            - socks5
          x-apidog-enum:
            - value: http
              name: ''
              description: http proxy
            - value: socks5
              name: ''
              description: socks5 proxy
          default: http
          examples:
            - http
      x-apidog-orders:
        - type
        - country
        - sessionDuration
        - protocol
      required:
        - type
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    rest.R-browser_RemoteDebuggingAddress:
      type: object
      properties:
        code:
          type: integer
        data:
          $ref: '#/components/schemas/browser.RemoteDebuggingAddress'
        err:
          type: boolean
        msg:
          type: string
      x-apifox-orders:
        - code
        - data
        - err
        - msg
      x-apifox-ignore-properties: []
      x-apifox-folder: Schemas
      x-apidog-orders:
        - code
        - data
        - err
        - msg
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    browser.RemoteDebuggingAddress:
      type: object
      properties:
        port:
          type: integer
        profileId:
          type: string
        proxy:
          type: string
        webSocketDebuggerUrl:
          type: string
      x-apifox-orders:
        - port
        - profileId
        - proxy
        - webSocketDebuggerUrl
      x-apifox-ignore-properties: []
      x-apifox-folder: Schemas
      x-apidog-orders:
        - port
        - profileId
        - proxy
        - webSocketDebuggerUrl
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    apikey-header-x-api-key:
      type: apiKey
      in: header
      name: x-api-key
servers:
  - url: http://localhost:8848/api/v2
    description: Nstbrowser API v2
security:
  - apikey-header-x-api-key: []

```
