Logo of Lexmount
DocsTemplatesBlogHelp Center
GitHub
Logo of LexmountLexmount Browser

Get started

Lexmount Documentation
Console guide

Browser

OverviewQuickstartCapabilitiesExamples

Web Fetch

OverviewQuick Start
Common Errors

Web Search

OverviewQuick StartSearch API

Runtime

OverviewQuickstartCapabilitiesExamples

Help and billing

Capability FAQ
ChangelogContact support
Node.js SDK

Node.js Examples

Choose a runnable Node.js quickstart script by browser task.

The maintained scripts live in the Node.js 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-js-sdk-quickstart.git
cd lexmount-js-sdk-quickstart
npm install
cp .env.example .env

Fill in LEXMOUNT_API_KEY and LEXMOUNT_PROJECT_ID, then start with:

npm run demo

Browser Agent

Use SDK 0.7.0 and a project enabled for Browser Agent. See the Browser Agent guide for configuration, idempotency and result handling.

CommandPurpose
npm run browser-agentBasic Run
npm run browser-agent-advancedSaved Agent and structured output
npm run browser-agent-recoveryRecover a known request

Save Run IDs and idempotency keys; recovery does not require creating a replacement Run.

Browser creation and connection

CommandWhat it demonstrates
npm run demoCreate Chromium, connect with Playwright, navigate, and take a screenshot
npm run light-demoCreate Moli (browserMode: 'light') and extract links
npm run catalog-infoInspect the region catalog and selected endpoint
npm run connection-demoConnect through the direct /connection endpoint
npm run custom-image-demoStart a session with customImageId
npm run window-size-demoSet and verify the ACE window size
npm run inspect-url-demoPrint the console View URL
npm run session-listList session status and metadata
npm run session-targetsList page/target metadata from /json
npm run session-downloadsTrigger a download and save the stored archive

Persistent contexts

CommandWhat it demonstrates
npm run context-basicCreate a context and mount it read-write
npm run context-list-getList contexts and retrieve one detail record
npm run context-fork -- <context_id>Copy an available offline context
npm run context-modesCompare read-write and read-only access
npm run context-lock-handlingHandle locks and retry information

Extensions and proxies

CommandWhat it demonstrates
npm run extension-basicUpload and mount an extension archive
npm run extension-list-getList uploaded extensions and retrieve details
npm run proxy-demoUse an authenticated custom upstream proxy
npm run official-proxy-demoUse the Lexmount official proxy pool

Some scripts require additional values documented in .env.example, such as an extension path, custom image ID, or proxy credentials. Feature availability depends on the project plan.

Cleanup

The examples close browser connections, sessions, and the SDK client in finally. If a process is interrupted, inspect active sessions in the console before rerunning it.

Local Network Proxy Demo

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

npm run local-proxy-demo -- --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.

Node.js Capabilities

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

Web Fetch API

Public overview for fetching structured content from public web pages with Lexmount Web Fetch.

Table of Contents

Setup
Browser Agent
Browser creation and connection
Persistent contexts
Extensions and proxies
Cleanup
Local Network Proxy Demo

Still need help?