Skip to main content
Install the Nimble JavaScript/TypeScript library to interact with the Nimble API from Node.js, Deno, Bun, Cloudflare Workers, and modern browsers. All methods are async and return typed responses.

Installation

Requires Node.js 20 LTS+ (also supports Deno v1.28+, Bun 1.0+, and Cloudflare Workers). Never hardcode your API key — use environment variables.

Setup

Initialize the client with your API key:
TypeScript

Quick Start

Extract content from a URL in one call:
TypeScript

TypeScript Types

The SDK ships full TypeScript definitions for all request parameters and responses, with IDE autocompletion:
TypeScript

Core Methods

Extract

Get clean HTML, markdown, or structured data from any URL. Supports JavaScript rendering, stealth mode, browser actions, and more.
TypeScript
See the Extract docs for the full parameter list — geo-targeting, output formats, parsing schemas, and more.
Perform real-time web searches and get structured results:
TypeScript

Map

Discover all URLs within a domain or sitemap:
TypeScript

Crawl

Recursively crawl and extract an entire website at scale:
TypeScript

Agents

Run pre-built agents for structured data from popular platforms:
TypeScript
Browse the full agent catalog in the Agent Gallery.

Error Handling

The SDK throws typed APIError subclasses for failed requests:
TypeScript
Error ClassHTTP StatusWhen it occurs
BadRequestError400Invalid request parameters
AuthenticationError401Invalid or missing API key
PermissionDeniedError403Insufficient account permissions
NotFoundError404Resource not found
RateLimitError429Request rate exceeded
InternalServerError500+Server-side error

Configuration

Timeouts & Retries

The SDK retries automatically on connection errors and server failures. Defaults: 2 retries, 3-minute timeout.
TypeScript

Logging

Control log verbosity via environment variable:
Or configure programmatically using any compatible logger (pino, winston, consola, etc.):
TypeScript

Advanced

Raw Response Access

Access HTTP headers and status alongside the parsed response:
TypeScript

Custom Fetch / Proxy

Provide a custom fetch implementation or configure proxies for Node.js, Bun, and Deno:
TypeScript

MCP Server

The SDK includes a built-in MCP Server for AI assistant integrations, enabling API exploration and request testing directly from tools like Claude.

Next Steps

API Reference

Full REST API documentation for all endpoints

Extract

Rendering, formats, stealth mode, and more

Search

Real-time web search with structured results

Agents

Pre-built extraction agents for popular platforms