BrowserWing Executor API

API Base URL: http://localhost:8080/api/v1/executor

What Is BrowserWing Executor API?

BrowserWing Executor API is a browser automation skill for the Happycapy Skills platform. It provides a robust HTTP API interface for controlling and interacting with web browsers programmatically. By exposing endpoints for common browser actions, the skill allows users to script complex workflows involving page navigation, element interaction, data extraction, accessibility analysis, visual inspection, and batch operations using simple HTTP requests.

The skill is designed to be used locally, with its API available at http://localhost:8080/api/v1/executor. Authentication is enforced either via the X-BrowserWing-Key header or a standard Bearer token in the Authorization header. The skill is open source and integrates with the MemTensor/MemOS ecosystem, but can be used standalone for browser automation tasks.

Key features include:

  • Navigating to web pages, reloading, and traversing browser history
  • Interacting with page elements (click, type, select, hover, etc.)
  • Extracting text, attributes, and values from the DOM
  • Running custom JavaScript in the page context
  • Capturing screenshots
  • Generating accessibility snapshots for structure and compliance analysis
  • Executing multiple commands in a single batch

Why Use BrowserWing Executor API?

BrowserWing Executor API is ideal for developers, testers, and automation engineers who require programmatic control over web browsers as part of their productivity workflows.

Some typical use cases include:

  • Automated web testing: Perform end-to-end tests by scripting navigation, interactions, and assertions
  • Data scraping: Extract structured or semi-structured data from web pages
  • Accessibility auditing: Generate accessibility snapshots to review and analyze compliance issues
  • Continuous integration: Integrate browser interactions into CI/CD pipelines for regression testing or monitoring
  • RPA (Robotic Process Automation): Automate repetitive web-based tasks for productivity gains
  • Web page monitoring: Capture screenshots, analyze DOM, or extract key data points at regular intervals

By exposing a clean HTTP API, BrowserWing Executor decouples your automation scripts from any specific programming language, enabling integration with virtually any system that can issue HTTP requests.

How to Use BrowserWing Executor API

1. Authentication

All API requests require authentication. You must provide either:

  • X-BrowserWing-Key: <api-key> header
  • Authorization: Bearer <token> header

Requests without authentication will be rejected.

2. Discovering Available

Commands

Always start by retrieving the list of supported commands and their usage:

curl -H 'X-BrowserWing-Key: YOUR_API_KEY' \
     -X GET 'http://localhost:8080/api/v1/executor/help'

The response will include all commands, expected parameters, example payloads, and usage notes. To query a specific command, you can append the command name, such as:

curl -H 'Authorization: Bearer YOUR_TOKEN' \
     -X GET 'http://localhost:8080/api/v1/executor/help/navigate'

3. Navigating to a Web

Page

To visit a specific URL:

curl -H 'X-BrowserWing-Key: YOUR_API_KEY' \
     -X POST 'http://localhost:8080/api/v1/executor/navigate' \
     -H 'Content-Type: application/json' \
     -d '{"url": "https://example.com"}'

4. Interacting with

Elements

Click an element specified by a CSS selector:

curl -H 'X-BrowserWing-Key: YOUR_API_KEY' \
     -X POST 'http://localhost:8080/api/v1/executor/click' \
     -H 'Content-Type: application/json' \
     -d '{"selector": "#submit-button"}'

Type text into an input field:

curl -H 'X-BrowserWing-Key: YOUR_API_KEY' \
     -X POST 'http://localhost:8080/api/v1/executor/type' \
     -H 'Content-Type: application/json' \
     -d '{"selector": "#search", "text": "Happycapy"}'

5. Extracting

Data

Extract text content from a page element:

curl -H 'X-BrowserWing-Key: YOUR_API_KEY' \
     -X POST 'http://localhost:8080/api/v1/executor/extract' \
     -H 'Content-Type: application/json' \
     -d '{"selector": ".result-title"}'

6. Accessibility

Analysis

Request an accessibility snapshot:

curl -H 'X-BrowserWing-Key: YOUR_API_KEY' \
     -X POST 'http://localhost:8080/api/v1/executor/accessibility-snapshot'

The API will return a structured accessibility tree that can be analyzed for compliance or structure.

7. Screenshots and JavaScript

Execution

Take a screenshot:

curl -H 'X-BrowserWing-Key: YOUR_API_KEY' \
     -X POST 'http://localhost:8080/api/v1/executor/screenshot' \
     -H 'Content-Type: application/json' \
     -d '{"fullPage": true}'

Run arbitrary JavaScript:

curl -H 'X-BrowserWing-Key: YOUR_API_KEY' \
     -X POST 'http://localhost:8080/api/v1/executor/evaluate' \
     -H 'Content-Type: application/json' \
     -d '{"expression": "document.title"}'

8. Batch

Operations

To execute multiple actions in a single request:

curl -H 'X-BrowserWing-Key: YOUR_API_KEY' \
     -X POST 'http://localhost:8080/api/v1/executor/batch' \
     -H 'Content-Type: application/json' \
     -d '{
           "commands": [
             {"command": "navigate", "args": {"url": "https://example.com"}},
             {"command": "click", "args": {"selector": "#accept"}},
             {"command": "extract", "args": {"selector": ".headline"}}
           ]
         }'

The API will execute each command in order and return results for all actions.

When to Use BrowserWing Executor API

Use BrowserWing Executor API when you need:

  • Language-agnostic browser automation via HTTP
  • Fine-grained control over browser actions in local workflows
  • Integration with CI/CD, RPA, or monitoring tools
  • Accessibility and compliance analysis at scale
  • Advanced data extraction beyond simple scraping libraries
  • Automation that requires batch command execution for efficiency

It is especially suitable when local browser control is required without reliance on cloud services, or when you need tight integration with local data and system processes.

Important Notes

  • The API is intended for local use. By default, it binds to localhost for security.
  • Always use the /help endpoint to check for new or updated commands.
  • Ensure your API key or token remains confidential to prevent unauthorized access.
  • The skill does not manage browser sessions across requests by default. If session state is important, consult the documentation or source for session management options.
  • Advanced features such as accessibility snapshots and JavaScript execution can expose sensitive data. Use with caution and ensure compliance with privacy requirements.
  • For stability, always validate the API response and handle errors gracefully in your automation scripts.
  • Review the official source for updates, security advisories, and advanced usage patterns.

BrowserWing Executor API is a powerful addition to the Happycapy Skills ecosystem, enabling high-precision, scriptable browser automation for a broad range of productivity and testing scenarios.