{
  "openapi": "3.0.1",
  "info": {
    "title": "Browser Use AI Task Runner",
    "description": "Beta: Run bounded public-web browser tasks with validated JSON output. Bring your own AI key; the Google Gemini path is live-tested.",
    "version": "0.1",
    "x-build-id": "oTh22v6jkf2x5mTfq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/produkdigitalali~browser-use-ai-task-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-produkdigitalali-browser-use-ai-task-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~browser-use-ai-task-runner/runs": {
      "post": {
        "operationId": "runs-sync-produkdigitalali-browser-use-ai-task-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~browser-use-ai-task-runner/run-sync": {
      "post": {
        "operationId": "run-sync-produkdigitalali-browser-use-ai-task-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": [
          "task",
          "startUrls",
          "allowedDomains"
        ],
        "properties": {
          "task": {
            "title": "Task",
            "minLength": 1,
            "maxLength": 10000,
            "type": "string",
            "description": "Public-web goal. Do not include credentials."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Public HTTP(S) URLs on ports 80/443. Exact hosts must be allowed.",
            "items": {
              "type": "string"
            }
          },
          "allowedDomains": {
            "title": "Allowed domains",
            "type": "array",
            "description": "Exact hosts only; no wildcards. All page resources are restricted to these hosts.",
            "items": {
              "type": "string"
            }
          },
          "provider": {
            "title": "Provider",
            "enum": [
              "openai",
              "anthropic",
              "google"
            ],
            "type": "string",
            "description": "Provider. Enforced by the Actor; see README for limits.",
            "default": "google"
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "A compatible model from the selected provider.",
            "default": "gemini-3.5-flash-lite"
          },
          "apiKey": {
            "title": "Provider API key",
            "type": "string",
            "description": "BYOK secret. Can instead use the provider secret environment variable."
          },
          "maxSteps": {
            "title": "Maximum steps",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Maximum steps. Enforced by the Actor; see README for limits.",
            "default": 20
          },
          "maxTaskDurationSeconds": {
            "title": "Task timeout (seconds)",
            "minimum": 10,
            "maximum": 600,
            "type": "integer",
            "description": "Task timeout (seconds). Enforced by the Actor; see README for limits.",
            "default": 180
          },
          "maxBrowserPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum pages. Enforced by the Actor; see README for limits.",
            "default": 3
          },
          "maxArtifactBytes": {
            "title": "Screenshot byte limit",
            "minimum": 10000,
            "maximum": 2000000,
            "type": "integer",
            "description": "Screenshot byte limit. Enforced by the Actor; see README for limits.",
            "default": 1000000
          },
          "maxOutputBytes": {
            "title": "Result byte limit",
            "minimum": 1000,
            "maximum": 200000,
            "type": "integer",
            "description": "Result byte limit. Enforced by the Actor; see README for limits.",
            "default": 100000
          },
          "maxUserChargeUsd": {
            "title": "Actor event budget (USD)",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Does not cap BYOK provider charges or unpriced private-run platform usage.",
            "default": 0.2
          },
          "outputSchema": {
            "title": "Output JSON schema",
            "type": "object",
            "description": "Optional Draft 2020-12 schema, no references. Invalid output fails cleanly."
          },
          "includeStepTrace": {
            "title": "Include sanitized step rows",
            "type": "boolean",
            "description": "Include sanitized step rows. Enforced by the Actor; see README for limits.",
            "default": false
          },
          "screenshotMode": {
            "title": "Screenshot",
            "enum": [
              "off",
              "failure",
              "completion",
              "both"
            ],
            "type": "string",
            "description": "Public flows only; sensitive forms suppress capture.",
            "default": "off"
          },
          "proxyConfiguration": {
            "title": "Optional proxy",
            "type": "object",
            "description": "HTTP CONNECT upstream; destinations are pinned to public IPs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}