JavaScript SDK
npm install webx-sdkZero dependencies, ESM, Node 18+, full TypeScript types.
import { WebX } from "webx-sdk";
const wx = new WebX({ baseUrl: "http://localhost:8080" }); // apiKey: "webx_..." if requiredScrape
Section titled “Scrape”const { data } = await wx.scrape("https://example.com");console.log(data.markdown);
// render + actions on JS-heavy pagesconst spa = await wx.scrape("https://spa.example.com", { render: true, actions: "click:.accept | scroll | screenshot", formats: ["markdown", "a11y"],});Search
Section titled “Search”const res = await wx.search("go generics tutorial", { limit: 5 });Crawl — async job, polls to completion
Section titled “Crawl — async job, polls to completion”const job = await wx.crawl("https://docs.example.com", { goal: "authentication docs", limit: 20, semantic: true,});for (const page of job.data) console.log(page.url);// wait:false to fire-and-forgetDeterministic extraction — zero LLM
Section titled “Deterministic extraction — zero LLM”const out = await wx.extract("https://shop.example.com/p/1", { css: { title: "h1", price: ".price" },});Tenancy (admin key)
Section titled “Tenancy (admin key)”const { key } = await wx.createKey("agent-1", { rpm: 120, monthlyUnits: 5000 });console.log(key); // webx_... — shown onceconsole.log(await wx.usage({ days: 7 }));
await wx.schedule({ name: "nightly docs crawl", cron: "0 3 * * *", action: "crawl", params: { url: "https://docs.example.com", limit: 50 }, webhookUrl: "https://me.example/hook",});Source: sdk/javascript/ — npm: webx-sdk.