{
  "openapi": "3.0.1",
  "info": {
    "title": "Puppeteer Browser Automation Runner",
    "description": "Run declarative browser automation workflows with Puppeteer, including navigation, clicks, form input, extraction, assertions, and screenshots.",
    "version": "0.1",
    "x-build-id": "KRpSrZ1y7uG9t4Kpy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/produkdigitalali~puppeteer-browser-automation-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-produkdigitalali-puppeteer-browser-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~puppeteer-browser-automation-runner/runs": {
      "post": {
        "operationId": "runs-sync-produkdigitalali-puppeteer-browser-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~puppeteer-browser-automation-runner/run-sync": {
      "post": {
        "operationId": "run-sync-produkdigitalali-puppeteer-browser-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 goto actions that do not specify their own URL.",
            "default": "https://example.com"
          },
          "workflowName": {
            "title": "Workflow name",
            "type": "string",
            "description": "Human-readable name used in result rows and the run summary.",
            "default": "Example.com browser workflow"
          },
          "actions": {
            "title": "Automation steps",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Ordered browser actions. Fill only the fields relevant to each selected action type.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "type": {
                  "title": "Action",
                  "type": "string",
                  "description": "Browser action to execute for this step.",
                  "editor": "select",
                  "enum": [
                    "goto",
                    "waitForSelector",
                    "click",
                    "type",
                    "select",
                    "extractText",
                    "extractAttribute",
                    "wait",
                    "screenshot",
                    "textContains",
                    "urlContains",
                    "titleContains"
                  ],
                  "enumTitles": [
                    "Go to URL",
                    "Wait for selector",
                    "Click element",
                    "Type into field",
                    "Select option",
                    "Extract text",
                    "Extract attribute",
                    "Wait",
                    "Take screenshot",
                    "Assert page text",
                    "Assert URL",
                    "Assert title"
                  ]
                },
                "label": {
                  "title": "Label",
                  "type": "string",
                  "description": "Optional friendly name for this step.",
                  "editor": "textfield"
                },
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "Optional URL for a goto action. If omitted, Target URL is used.",
                  "editor": "textfield"
                },
                "selector": {
                  "title": "CSS selector",
                  "type": "string",
                  "description": "CSS selector used by selector-based actions.",
                  "editor": "textfield"
                },
                "value": {
                  "title": "Value / expected text",
                  "type": "string",
                  "description": "Value to type/select, or expected text used by assertion actions.",
                  "editor": "textfield"
                },
                "attribute": {
                  "title": "Attribute name",
                  "type": "string",
                  "description": "HTML attribute to read for extractAttribute, for example href or src.",
                  "editor": "textfield"
                },
                "waitMs": {
                  "title": "Wait milliseconds",
                  "type": "integer",
                  "description": "Delay used by wait actions or an optional delay after another step.",
                  "minimum": 0,
                  "maximum": 60000,
                  "default": 1000
                },
                "timeoutSeconds": {
                  "title": "Step timeout",
                  "type": "integer",
                  "description": "Optional timeout override for this step in seconds.",
                  "minimum": 1,
                  "maximum": 120
                },
                "clearBeforeType": {
                  "title": "Clear field first",
                  "type": "boolean",
                  "description": "For type actions, clear the existing field value before typing.",
                  "default": true
                },
                "typingDelayMs": {
                  "title": "Typing delay",
                  "type": "integer",
                  "description": "Delay between keystrokes for type actions, in milliseconds.",
                  "minimum": 0,
                  "maximum": 1000,
                  "default": 0
                },
                "waitForNavigation": {
                  "title": "Wait for navigation",
                  "type": "boolean",
                  "description": "For click actions, wait for the click to trigger a page navigation.",
                  "default": false
                },
                "fullPage": {
                  "title": "Full-page screenshot",
                  "type": "boolean",
                  "description": "For screenshot actions, capture the full scrollable page.",
                  "default": true
                }
              },
              "required": [
                "type"
              ]
            },
            "default": [
              {
                "type": "goto",
                "label": "Open target page"
              },
              {
                "type": "waitForSelector",
                "label": "Wait for H1",
                "selector": "h1"
              },
              {
                "type": "extractText",
                "label": "Extract H1 text",
                "selector": "h1"
              },
              {
                "type": "screenshot",
                "label": "Capture final screenshot"
              }
            ]
          },
          "navigationTimeoutSeconds": {
            "title": "Navigation timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Default timeout for page navigation, in seconds.",
            "default": 30
          },
          "actionTimeoutSeconds": {
            "title": "Action timeout",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Default timeout for selectors and browser actions, in seconds.",
            "default": 15
          },
          "viewportWidth": {
            "title": "Viewport width",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Browser viewport width in pixels.",
            "default": 1365
          },
          "viewportHeight": {
            "title": "Viewport height",
            "minimum": 240,
            "maximum": 2160,
            "type": "integer",
            "description": "Browser viewport height in pixels.",
            "default": 768
          },
          "stopOnError": {
            "title": "Stop on first error",
            "type": "boolean",
            "description": "Stop the workflow after the first failed step. Disable to collect results from later steps when possible.",
            "default": true
          },
          "screenshotMode": {
            "title": "Automatic screenshots",
            "enum": [
              "onFailure",
              "everyStep",
              "manualOnly"
            ],
            "type": "string",
            "description": "Choose when screenshots are captured automatically. Explicit screenshot actions always capture one.",
            "default": "onFailure"
          },
          "fullPageScreenshots": {
            "title": "Full-page automatic screenshots",
            "type": "boolean",
            "description": "Capture the full scrollable page for automatic screenshots.",
            "default": false
          },
          "userAgent": {
            "title": "Custom user agent",
            "type": "string",
            "description": "Optional custom browser user-agent string. Leave empty to use Puppeteer's default.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}