Skip to main content
Install the Nimble Python library to interact with the Nimble API from your Python applications. Supports both synchronous and asynchronous usage with full type hints.

Installation

Requires Python 3.9+. Never hardcode your API key — use environment variables instead.

Setup

Initialize the client with your API key. We recommend loading it from the environment:
Python

Quick Start

Extract clean content from a URL in one call:
Python

Core Methods

Extract

Get clean HTML, markdown, or structured data from any URL. Supports JavaScript rendering, stealth mode, browser actions, and more.
Python
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:
Python

Map

Discover all URLs within a domain or sitemap:
Python

Crawl

Recursively crawl and extract an entire website at scale:
Python

Agents

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

Async Client

Use AsyncNimble for non-blocking, concurrent operations:
Python

aiohttp Backend

For high-concurrency workloads, use the aiohttp HTTP backend (requires pip install "nimble_python[aiohttp]"):
Python
Always use async with when working with DefaultAioHttpClient to ensure proper resource cleanup.

Error Handling

The SDK maps API failures to typed exception classes:
Python
ExceptionHTTP StatusWhen it occurs
APIConnectionErrorNetwork failure or timeout
AuthenticationError401Invalid or missing API key
PermissionDeniedError403Insufficient account permissions
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.
Python

Logging

Enable SDK-level debug logging via environment variable:
Or configure programmatically:
Python

Advanced

Raw Response Access

Access HTTP headers and response metadata alongside the parsed result:
Python

Streaming Response

Stream large response bodies instead of buffering them in memory:
Python

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