# Browser Use AI Task Runner (`produkdigitalali/browser-use-ai-task-runner`) Actor

Beta: Run bounded public-web browser tasks with validated JSON output. Bring your own AI key; the Google Gemini path is live-tested.

- **URL**: https://apify.com/produkdigitalali/browser-use-ai-task-runner.md
- **Developed by:** [ProdukDigitalAli](https://apify.com/produkdigitalali) (community)
- **Categories:** AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 completed browser steps

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Browser Use AI Task Runner

Beta version 0.1.7. Runs a natural-language task on public websites and returns one final JSON result, with optional sanitized step rows.

### Beta status

Start with short public-web tasks. The default Gemini 3.5 Flash-Lite passed live heading and two-page author extraction; the two-page case was repeated successfully with default fields omitted. Gemini 3.8 Flash remains selectable but returned provider HTTP 503 twice during final validation. Free-tier quota can also return HTTP 429. There is no guarantee that every task will complete. OpenAI and Anthropic adapters are available but have not been live-benchmarked for this release. Long responses, authenticated workflows, and broad adversarial coverage remain unverified.

### Quick start

Supply a public start URL, its exact allowed domain, your provider/model, and a provider key in the secret API key field. Never put credentials inside the task.

```json
{
  "task": "Read the page heading and return it as JSON.",
  "startUrls": ["https://example.com"],
  "allowedDomains": ["example.com"],
  "provider": "google",
  "model": "gemini-3.5-flash-lite",
  "maxSteps": 5,
  "outputSchema": {
    "type": "object",
    "properties": {"heading": {"type": "string"}},
    "required": ["heading"]
  }
}
```

The example does not contain a key. Alternative secret environment variables: OPENAI\_API\_KEY, ANTHROPIC\_API\_KEY, GOOGLE\_API\_KEY (or GEMINI\_API\_KEY). Provider key usage is billed by the provider separately. Provider wrappers exist for all three; Google gemini-3.5-flash-lite passed live heading extraction and the two-page author acceptance task. OpenAI/Anthropic benchmarks remain pending credentials.

### What to use it for

- Extract public information into a specified JSON schema.
- Compare details on public product pages.
- Research specified company website fields.
- Navigate a permitted public workflow and summarize the outcome.

AI actions are not deterministic. Use the Playwright Browser Automation Runner for repeatable locator/action sequences.

### Inputs and enforced limits

See the Input tab for the complete contract. Exact domain hosts only, no wildcard matching; include required asset hosts. Public HTTP(S) on 80/443 only.

- maxSteps: default 20, range 1-40; one agent action per step.
- maxTaskDurationSeconds: default 180, range 10-600; leave extra platform time for startup/cleanup.
- maxBrowserPages: default 3, range 1-5. Excess tabs are closed and execution is stopped.
- maxArtifactBytes: default 1 MB, maximum 2 MB, screenshot only.
- maxOutputBytes: default 100 KB, maximum 200 KB.
- Memory watchdog: 1536 MiB process tree; deploy with 2048 MiB.
- maxUserChargeUsd: default 0.20, maximum 1.00; Actor event limit, not a guarantee on BYOK or private-run compute.
- outputSchema: optional Draft 2020-12 JSON schema up to 20 KB; references and regex constraints are rejected. Validation is performed after redaction. Invalid results fail cleanly.
- screenshotMode: off by default, optional failure/completion/both. Visible sensitive forms suppress captures.
- includeStepTrace: false by default; only action names/step numbers/status, no raw parameters or model reasoning.
- proxyConfiguration: optional HTTP CONNECT upstream. Final destination is resolved locally and pinned to a public IP; compatibility with Apify Proxy remains a release gate.

### Output

Canonical result is in KVS record FINAL-RESULT. Dataset has one final row; optional trace rows have recordType=step.
Final fields: success/status, actorVersion/timestamp/inputHash, durationMs, provider/model, stepsUsed/completedSteps/chargedSteps, finalUrl, data/summary, screenshotUrl, warnings, errorCode/errorSummary.
Input hash covers non-secret execution settings and start hosts, not the task, schema, queries or credentials. Final URL omits query/fragment.

Example from a real local Chromium + Browser Use integration using a scripted model (not a live-provider benchmark):

```json
{"success":true,"status":"succeeded","stepsUsed":2,"completedSteps":1,"finalUrl":"https://example.com/","data":{"heading":"Example Domain"},"errorCode":null,"chargedSteps":0}
```

Errors are machine-readable: INVALID\_INPUT, MISSING\_API\_KEY, NETWORK\_BLOCKED, TASK\_TIMEOUT, TASK\_FAILED, OUTPUT\_VALIDATION\_FAILED, STEP\_LIMIT, BUDGET\_LIMIT and TARGET\_RESTRICTED. A successfully exited Apify run can still contain success=false: inspect the final row. On platform kill, final output may be unavailable. A restart does not automatically repeat browser actions or uncertain billing/dataset writes.

### Cost and billing

PPE pricing: USD 0.01 per successfully executed browser action, plus the standard Apify startup event of USD 0.00005 per GB (USD 0.0001 with the default 2 GB). AI provider usage is separate and uses your own key. Check the Pricing tab for the effective rates.
Event: completed-browser-step. No completion or dataset-row event is configured. With default memory, 1/5/10 completed actions cost USD 0.0101/0.0501/0.1001 including startup, excluding provider usage. A zero-action result incurs only the startup event.

Completed error-free browser action steps qualify; done and wait do not. Prior valuable steps can remain billable if the final task later fails. Failed actions are not charged. Application-level ambiguous charging requests are recorded pending and not automatically replayed. SDK/remote retry behavior still needs verification. A live two-page test reconciled one completed action with one charged event. Broader maximum-spend, retry and abort reconciliation remains unverified. This is a beta; choose a small platform spending limit.

### Security and limitations

Fresh temporary browser profile, no user browser profile or saved login. Private destinations are blocked through a public-IP-pinning forward proxy, plus browser route/allowlist checks. WebSockets/service workers/downloads and Browser Use code/file/search/extraction tools are disabled. No arbitrary API endpoints. Telemetry/cloud sync are disabled.
No authenticated workflows or credential persistence in this candidate. No CAPTCHA or access-control evasion. 403/404/429 return a target limitation. Strict resource allowlisting can break sites with third-party assets. Screenshot heuristics do not constitute a general sensitive-image detector; leave screenshots off for sensitive targets.
Framework/provider logs are suppressed; raw exception messages and model reasoning are not emitted. The candidate still requires broader adversarial, auth-artifact, timeout/pages/memory, upstream proxy and live-provider testing before Store release.

### Local development

Python 3.12. Install requirements-dev.txt in an isolated virtual environment, then install Chromium with Playwright.
Run: python -m pytest -q
Browser smoke: python -m tests.browser\_smoke
Scripted integration: python -m tests.integration\_scripted
Actor entrypoint: python -m src
Apify CLI deployment uses development tag. Docker base image is pinned by digest. Docker is absent locally; actual container validation is performed on Apify.

### Three task-example drafts

1. Read a public page heading into JSON: examples/heading.json.
2. Extract public quote text: examples/quotes.json.
3. Compare two public pages: examples/compare.json.
   Live-provider inputs/outputs must be verified before publishing examples. API/n8n/Make calls use the ordinary Actor run interface after validation. This Actor is not an MCP server.

### Family

Puppeteer: simple deterministic Chrome workflows. Selenium: WebDriver workflows. CDP Runner: diagnostics/emulation. Playwright: modern deterministic actions. HAR Inspector: network diagnostics. Browser Use: AI goals. MCP Server: interactive tool calls.

### Support

Provide run ID, version, sanitized input and expected/actual behavior. Never include keys, passwords, cookies, auth headers or sensitive screenshots.
Store title: Browser Use AI Task Runner | Natural-Language Web Automation.
Keywords: browser use, AI browser agent, web automation agent, natural language browser automation, browser AI, structured web task, AI web agent.
Categories proposed: AI, Automation. See the Actor page for current publication status.

# Actor input Schema

## `task` (type: `string`):

Public-web goal. Do not include credentials.

## `startUrls` (type: `array`):

Public HTTP(S) URLs on ports 80/443. Exact hosts must be allowed.

## `allowedDomains` (type: `array`):

Exact hosts only; no wildcards. All page resources are restricted to these hosts.

## `provider` (type: `string`):

Provider. Enforced by the Actor; see README for limits.

## `model` (type: `string`):

A compatible model from the selected provider.

## `apiKey` (type: `string`):

BYOK secret. Can instead use the provider secret environment variable.

## `maxSteps` (type: `integer`):

Maximum steps. Enforced by the Actor; see README for limits.

## `maxTaskDurationSeconds` (type: `integer`):

Task timeout (seconds). Enforced by the Actor; see README for limits.

## `maxBrowserPages` (type: `integer`):

Maximum pages. Enforced by the Actor; see README for limits.

## `maxArtifactBytes` (type: `integer`):

Screenshot byte limit. Enforced by the Actor; see README for limits.

## `maxOutputBytes` (type: `integer`):

Result byte limit. Enforced by the Actor; see README for limits.

## `maxUserChargeUsd` (type: `number`):

Does not cap BYOK provider charges or unpriced private-run platform usage.

## `outputSchema` (type: `object`):

Optional Draft 2020-12 schema, no references. Invalid output fails cleanly.

## `includeStepTrace` (type: `boolean`):

Include sanitized step rows. Enforced by the Actor; see README for limits.

## `screenshotMode` (type: `string`):

Public flows only; sensitive forms suppress capture.

## `proxyConfiguration` (type: `object`):

HTTP CONNECT upstream; destinations are pinned to public IPs.

## Actor input object example

```json
{
  "task": "Read the heading on https://example.com and return it.",
  "startUrls": [
    "https://example.com"
  ],
  "allowedDomains": [
    "example.com"
  ],
  "provider": "google",
  "model": "gemini-3.5-flash-lite",
  "maxSteps": 20,
  "maxTaskDurationSeconds": 180,
  "maxBrowserPages": 3,
  "maxArtifactBytes": 1000000,
  "maxOutputBytes": 100000,
  "maxUserChargeUsd": 0.2,
  "includeStepTrace": false,
  "screenshotMode": "off"
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `finalResult` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "task": "Read the heading on https://example.com and return it.",
    "startUrls": [
        "https://example.com"
    ],
    "allowedDomains": [
        "example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("produkdigitalali/browser-use-ai-task-runner").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "task": "Read the heading on https://example.com and return it.",
    "startUrls": ["https://example.com"],
    "allowedDomains": ["example.com"],
}

# Run the Actor and wait for it to finish
run = client.actor("produkdigitalali/browser-use-ai-task-runner").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "task": "Read the heading on https://example.com and return it.",
  "startUrls": [
    "https://example.com"
  ],
  "allowedDomains": [
    "example.com"
  ]
}' |
apify call produkdigitalali/browser-use-ai-task-runner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,produkdigitalali/browser-use-ai-task-runner"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ZnVXQa3cPjAytadUB/builds/oTh22v6jkf2x5mTfq/openapi.json
