Node.js SDK
TypeScript-first Node.js SDK for Crawlingo (napi-rs bindings). Full type definitions auto-generated from the Rust core.
8 min read Updated July 2026
ℹ️
Installation
npm install crawlingo — Node.js 18+. Pre-built native binaries. Auto-generated TypeScript .d.ts typings included.Quick Example
API Reference
Session
| Method | Description |
|---|---|
new Session() | Create session with defaults |
.headers(dict) | Default HTTP headers |
.cookies(dict) | Default cookies |
.proxy(url: string) | Single proxy URL |
.proxyPool(urls: string[]) | Round-robin proxy rotation |
.proxyProvider(url) | Remote proxy list endpoint |
.rateLimit(n: number) | Per-host req/s |
.autoMatch(bool) | Enable self-healing selectors |
.autoMatchWeights(weights) | Fingerprint similarity weights |
.timeout(seconds: number) | Request timeout |
.fetcherTier("standard"|"stealthy") | HTTP mode |
.browserProfile("chrome"|"firefox"|"safari") | TLS fingerprint browser identity |
.fingerprintPath(path) | Fingerprint storage folder |
.clone() | Clone session and its config |
.destroy() | Release all resources |
Page
| Method | Returns | Description |
|---|---|---|
Page.create(url, options?) | Promise<Page> | Async fetch and parse. options: { session?, autoMatch?, timeout?, headers?, cookies?, proxy?, browserProfile? } |
.title() | string | <title> text content |
.html | string | Raw HTML string (getter) |
.url | string | Fetched page URL (getter) |
.status | number | HTTP status code (getter) |
.css(sel) | ElementCollection | CSS query |
.xpath(expr) | ElementCollection | XPath query |
.regex(pat) | ElementCollection | Regex match on all text |
.findText(t) | ElementCollection | SIMD text anchor exact lookup |
.afterText(t) | ElementCollection | Sibling element after anchor text |
.beforeText(t) | ElementCollection | Sibling element before anchor text |
