Project · 2026

Google AI Mode API Wrapper

A lightweight local infrastructure layer that exposes Google AI Mode through a self-hosted HTTP API and a simple web UI, using Playwright to automate Chromium instead of relying on an official API.

Node.jsExpressPlaywright

Why it exists

The project was built to experiment with Google AI Mode from a local, scriptable environment without depending on paid scraping providers or unofficial third-party services. Instead of presenting browser automation as a fragile hack, it wraps it behind a small HTTP API that can be controlled locally and inspected through a web interface.

Project media

Architecture

  • A client or local web UI sends requests to an Express server.
  • The server manages chat sessions and delegates browser interactions to a Playwright client.
  • Playwright controls Chromium and interacts with the Google AI Mode web interface.
  • Configuration is exposed through environment variables for port, headless mode, locale, timezone and optional user agent.
  • Docker support makes the whole stack reproducible on a local machine.

Key features

  • Local HTTP API and web UI.
  • Multiple chat sessions.
  • Docker Compose quick start.
  • Health endpoint and API endpoint discovery.
  • Configurable browser locale, timezone and headless mode.
  • Explicit warning against public exposure without authentication and access controls.

Design decisions

The interesting part is not simply automating a browser, but drawing a clean boundary around an unofficial integration. The project keeps the API local-first, documents its security assumptions and makes the fragility of DOM-driven automation explicit instead of hiding it.

Links