Skip to main content
Install the Nimble Go library to interact with the Nimble API from your Go applications. Built with idiomatic Go patterns, full context support, and automatic retries.

Installation

Requires Go 1.22+. Set your API key via the NIMBLE_API_KEY environment variable or pass it directly using option.WithAPIKey().

Setup

Import the package and initialize the client:
Go

Quick Start

Extract content from a URL:
Go

Core Methods

Extract

Get clean HTML, markdown, or structured data from any URL:
Go
Optional fields are wrapped in param.Opt[T]. Use the provided constructors — nimble.Bool(), nimble.String(), nimble.Int() — to set them.
Perform real-time web searches:
Go

Map

Discover all URLs within a domain or sitemap:
Go

Crawl

Recursively crawl and extract an entire website:
Go

Agents

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

Error Handling

Check err != nil for any failed request. Use errors.As to inspect typed API errors:
Go
The *nimble.Error type exposes:
  • StatusCode int — HTTP status code
  • Message string — Human-readable error description

Configuration

Retries

The SDK retries automatically on connection errors, timeouts, and server failures (2 retries by default):
Go

Timeouts

Use Go’s standard context package for request timeouts:
Go
Or set a per-request timeout directly:
Go

Advanced

Raw Response Access

Capture the raw HTTP response alongside the parsed result:
Go

Custom Request Options

Attach additional headers or query parameters to any request:
Go

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