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
Search
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
Async Client
UseAsyncNimble for non-blocking, concurrent operations:
Python
aiohttp Backend
For high-concurrency workloads, use theaiohttp HTTP backend (requires pip install "nimble_python[aiohttp]"):
Python
Error Handling
The SDK maps API failures to typed exception classes:Python
| Exception | HTTP Status | When it occurs |
|---|---|---|
APIConnectionError | — | Network failure or timeout |
AuthenticationError | 401 | Invalid or missing API key |
PermissionDeniedError | 403 | Insufficient account permissions |
RateLimitError | 429 | Request rate exceeded |
InternalServerError | 500+ | 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: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