Logo of Lexmount
DocsTemplatesBlogHelp Center
GitHub
Logo of LexmountLexmount Browser

Get started

Lexmount Documentation

Browser

OverviewQuickstartCapabilitiesExamples

Web Fetch

OverviewQuick Start
Common Errors

Help and billing

Capability FAQCloud Browser Pricing and Web Fetch API Billing
ChangelogContact support
Python SDK

Python Examples

Choose a runnable Python quickstart script by browser task.

The maintained scripts live in the Python quickstart repository. Clone that repository when you need runnable examples; this page is the map, not a second copy of every script.

Setup

git clone https://github.com/lexmount/lexmount-python-sdk-quickstart.git
cd lexmount-python-sdk-quickstart

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
playwright install chromium

cp .env.example .env

Fill LEXMOUNT_API_KEY and LEXMOUNT_PROJECT_ID in .env before running a script.

Start here

ScriptPurpose
demo.pyMinimal Chromium session, Playwright connection, navigation, and screenshot
light_demo.pyMoli (light) session and LightMount resource switch
inspect_url_demo.pyPrint View URL and keep the session open for manual inspection
session_list.pyList active and historical sessions with pagination
session_targets.pyQuery page targets, View URLs, and websocket URLs
session_downloads.pyTrigger, list, retrieve, archive, and clear stored downloads

Run:

python3 demo.py
python3 light_demo.py
python3 inspect_url_demo.py

Persistent state and extensions

ScriptPurpose
context_basic.pyCreate a described context and use it in a read-write session
context_list_get.pyList contexts and inspect display name, description, and status
context_fork.pyFork an available context into a new context
extension_basic.pyUpload, list, and mount an extension
extension_list_get.pyList/get extensions and optionally upload/delete one

Network, region, and connection

ScriptPurpose
catalog_info.pyInspect the public region and endpoint catalog
connection_demo.pyBuild and use the direct /connection websocket URL
proxy_demo.pyUse an authenticated custom upstream proxy
official_proxy_demo.pyUse the Lexmount official proxy pool

Runtime shape and diagnostics

ScriptPurpose
custom_image_demo.pyStart an approved custom browser image
window_size_demo.pySet the initial browser size
wpt_demo.pyRun a Web Platform Tests path across one or more sessions
cpu_load_demo.pyGenerate controlled multi-page browser load for diagnostics

Examples that use custom images, proxies, contexts, or extensions require the corresponding project capability.

Safe cleanup

Prefer the SDK context manager pattern in your own scripts:

from lexmount import Lexmount

with Lexmount() as client:
    with client.sessions.create() as session:
        # Browser work
        ...

Before rerunning a failed example, inspect the console session list. Async create can reserve a session before the client sees a timeout.

Local Network Proxy Demo

After setting up the repository above, run on a machine that can reach the target:

python3 local_proxy_demo.py --url 'https://your-internal-site.example/'

Select a region with --region or LEXMOUNT_REGION in .env. After navigation, press a key to exit and clean up. The project needs custom_proxy. See the local proxy guide for SDK versions, tunnel setup, and session options.

Python Capabilities

Current client, session, context, extension, download, CDP, error, and logging APIs.

Node.js SDK

Build remote-browser workflows with the current Lexmount Node.js SDK.

Table of Contents

Setup
Start here
Persistent state and extensions
Network, region, and connection
Runtime shape and diagnostics
Safe cleanup
Local Network Proxy Demo

Still need help?Ask on Discord