{
  "openapi": "3.0.1",
  "info": {
    "title": "Chrome DevTools Automation Runner",
    "description": "Run low-level Chrome DevTools Protocol workflows in the cloud, including navigation, JavaScript evaluation, headers, cookies, device emulation, screenshots, PDFs, and raw CDP commands.",
    "version": "0.1",
    "x-build-id": "tRAVwuegblomvT2Ds"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/produkdigitalali~chrome-devtools-automation-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-produkdigitalali-chrome-devtools-automation-runner",
        "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/produkdigitalali~chrome-devtools-automation-runner/runs": {
      "post": {
        "operationId": "runs-sync-produkdigitalali-chrome-devtools-automation-runner",
        "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/produkdigitalali~chrome-devtools-automation-runner/run-sync": {
      "post": {
        "operationId": "run-sync-produkdigitalali-chrome-devtools-automation-runner",
        "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",
        "required": [
          "targetUrl",
          "actions"
        ],
        "properties": {
          "targetUrl": {
            "title": "Target URL",
            "type": "string",
            "description": "Public HTTP(S) URL used by navigate actions that do not specify their own URL.",
            "default": "https://example.com"
          },
          "workflowName": {
            "title": "Workflow name",
            "type": "string",
            "description": "Human-readable name included in every result row and the run summary.",
            "default": "Example.com CDP workflow"
          },
          "actions": {
            "title": "CDP workflow steps",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Ordered low-level Chrome actions. Fill only the fields required by each selected action type.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "type": {
                  "title": "Action",
                  "type": "string",
                  "description": "Chrome DevTools action to execute for this step.",
                  "editor": "select",
                  "enum": [
                    "navigate",
                    "wait",
                    "evaluate",
                    "getHtml",
                    "getTitle",
                    "getText",
                    "setExtraHTTPHeaders",
                    "setCookies",
                    "setUserAgent",
                    "emulateViewport",
                    "screenshot",
                    "printPdf",
                    "rawCommand"
                  ],
                  "enumTitles": [
                    "Navigate",
                    "Wait",
                    "Evaluate JavaScript",
                    "Get page HTML",
                    "Get page title",
                    "Get element text",
                    "Set extra HTTP headers",
                    "Set cookies",
                    "Set user agent",
                    "Emulate viewport",
                    "Capture screenshot",
                    "Print page to PDF",
                    "Send raw CDP command"
                  ]
                },
                "label": {
                  "title": "Label",
                  "type": "string",
                  "description": "Optional friendly name for this workflow step.",
                  "editor": "textfield"
                },
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "Optional public HTTP(S) URL for navigate. If omitted, Target URL is used.",
                  "editor": "textfield"
                },
                "waitMs": {
                  "title": "Wait milliseconds",
                  "type": "integer",
                  "description": "Delay used by wait actions, in milliseconds.",
                  "minimum": 0,
                  "maximum": 60000,
                  "default": 1000
                },
                "expression": {
                  "title": "JavaScript expression",
                  "type": "string",
                  "description": "JavaScript expression for evaluate. The returned value should be JSON-serializable for clean output.",
                  "editor": "textarea"
                },
                "selector": {
                  "title": "CSS selector",
                  "type": "string",
                  "description": "CSS selector used by getText.",
                  "editor": "textfield"
                },
                "headers": {
                  "title": "HTTP headers",
                  "type": "object",
                  "description": "Header name/value pairs for setExtraHTTPHeaders.",
                  "editor": "json"
                },
                "cookies": {
                  "title": "Cookies",
                  "type": "array",
                  "description": "Cookies to set through the Network domain. Each cookie needs name and value, plus a URL or domain when appropriate.",
                  "editor": "json",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "title": "Name",
                        "type": "string",
                        "description": "Cookie name."
                      },
                      "value": {
                        "title": "Value",
                        "type": "string",
                        "description": "Cookie value."
                      },
                      "url": {
                        "title": "URL",
                        "type": "string",
                        "description": "Optional public URL associated with the cookie."
                      },
                      "domain": {
                        "title": "Domain",
                        "type": "string",
                        "description": "Optional cookie domain."
                      },
                      "path": {
                        "title": "Path",
                        "type": "string",
                        "description": "Optional cookie path."
                      },
                      "secure": {
                        "title": "Secure",
                        "type": "boolean",
                        "description": "Whether the cookie is Secure."
                      },
                      "httpOnly": {
                        "title": "HTTP only",
                        "type": "boolean",
                        "description": "Whether the cookie is HTTP-only."
                      },
                      "sameSite": {
                        "title": "SameSite",
                        "type": "string",
                        "description": "Optional SameSite mode.",
                        "editor": "select",
                        "enum": [
                          "Strict",
                          "Lax",
                          "None"
                        ]
                      },
                      "expires": {
                        "title": "Expires",
                        "type": "number",
                        "description": "Optional Unix timestamp in seconds for cookie expiry."
                      }
                    },
                    "required": [
                      "name",
                      "value"
                    ]
                  }
                },
                "userAgent": {
                  "title": "User agent",
                  "type": "string",
                  "description": "User-agent string for setUserAgent.",
                  "editor": "textfield"
                },
                "width": {
                  "title": "Width",
                  "type": "integer",
                  "description": "Viewport width in pixels for emulateViewport.",
                  "minimum": 320,
                  "maximum": 3840,
                  "default": 1365
                },
                "height": {
                  "title": "Height",
                  "type": "integer",
                  "description": "Viewport height in pixels for emulateViewport.",
                  "minimum": 240,
                  "maximum": 2160,
                  "default": 768
                },
                "deviceScaleFactor": {
                  "title": "Device scale factor",
                  "type": "number",
                  "description": "Device pixel ratio for emulateViewport.",
                  "minimum": 0.1,
                  "maximum": 4,
                  "default": 1
                },
                "mobile": {
                  "title": "Mobile emulation",
                  "type": "boolean",
                  "description": "Enable mobile viewport behavior for emulateViewport.",
                  "default": false
                },
                "fullPage": {
                  "title": "Full-page screenshot",
                  "type": "boolean",
                  "description": "For screenshot actions, capture the full scrollable document when possible.",
                  "default": true
                },
                "landscape": {
                  "title": "Landscape PDF",
                  "type": "boolean",
                  "description": "For printPdf, render the PDF in landscape orientation.",
                  "default": false
                },
                "method": {
                  "title": "Raw CDP method",
                  "type": "string",
                  "description": "CDP method name such as Runtime.getHeapUsage or Emulation.setGeolocationOverride. Fetch.*, Target.*, and Browser.* methods are blocked for isolation and safety.",
                  "editor": "textfield"
                },
                "params": {
                  "title": "Raw CDP parameters",
                  "type": "object",
                  "description": "JSON object sent as parameters for rawCommand.",
                  "editor": "json"
                },
                "timeoutSeconds": {
                  "title": "Step timeout",
                  "type": "integer",
                  "description": "Optional timeout override for navigation/event waits in this step.",
                  "minimum": 1,
                  "maximum": 120
                }
              },
              "required": [
                "type"
              ]
            },
            "default": [
              {
                "type": "navigate",
                "label": "Open target page"
              },
              {
                "type": "getTitle",
                "label": "Read page title"
              },
              {
                "type": "getText",
                "label": "Read H1 text",
                "selector": "h1"
              },
              {
                "type": "screenshot",
                "label": "Capture page"
              }
            ]
          },
          "navigationTimeoutSeconds": {
            "title": "Navigation timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Default timeout for page navigation and load events, in seconds.",
            "default": 30
          },
          "actionTimeoutSeconds": {
            "title": "Action timeout",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Default timeout for CDP action event waits, in seconds.",
            "default": 15
          },
          "viewportWidth": {
            "title": "Initial viewport width",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Initial Chrome viewport width in pixels.",
            "default": 1365
          },
          "viewportHeight": {
            "title": "Initial viewport height",
            "minimum": 240,
            "maximum": 2160,
            "type": "integer",
            "description": "Initial Chrome viewport height in pixels.",
            "default": 768
          },
          "deviceScaleFactor": {
            "title": "Initial device scale factor",
            "minimum": 0.1,
            "maximum": 4,
            "type": "number",
            "description": "Initial device pixel ratio used by Chrome emulation.",
            "default": 1
          },
          "mobile": {
            "title": "Initial mobile emulation",
            "type": "boolean",
            "description": "Start Chrome with mobile viewport behavior enabled.",
            "default": false
          },
          "stopOnError": {
            "title": "Stop on first error",
            "type": "boolean",
            "description": "Stop the workflow after the first failed step. Disable to record later steps when they can still run.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}