Skip to main content

Node.js

X1-BaaS is a plain REST API. This guide provides a zero-dependency client using the built-in fetch (Node 18+), with optional axios examples.

Requirements

  • Node.js 18+ (native fetch)

Client wrapper

Filename baas.js

Usage

Scrape to Markdown

Screenshot to file

Structured extraction

Crawl a batch and poll

Using axios instead

Prefer axios? Swap the request method:

Error handling

Check err.statusCode and err.body.detail.error for the machine-readable code.