Installation
DataBlue provides official SDKs for Python and Node.js / TypeScript. The Python SDK includes sync and async clients with Pydantic response models. The Node SDK provides a typed async client for JavaScript and TypeScript apps.
Requirements
| Dependency | Version |
|---|---|
| Python | >= 3.10 |
| httpx | >= 0.27.0 |
| pydantic | >= 2.0.0 |
| Node.js | >= 18.0.0 |
Install from PyPI
pip install datablue
Or with a specific version:
pip install datablue==0.1.0
Install from npm
npm install @datablue/sdk
Install with Poetry / uv
# Poetry
poetry add datablue
# uv
uv add datablue
Verify Installation
python -c "import datablue; print(datablue.__version__)"
# 0.1.0
Quick Start
from datablue import DataBlue
with DataBlue(api_key="wh_your_api_key") as client:
result = client.scrape("https://example.com")
print(result.data.markdown)
import { DataBlue } from "@datablue/sdk";
const client = new DataBlue({ apiKey: "wh_your_api_key" });
const result = await client.scrape("https://example.com");
console.log(result.data?.markdown);
Python async support: Core methods available on DataBlue are also available on AsyncDataBlue with async signatures. Use await and async with for the async variant.
Using with AI Assistants
The SDK is fully typed and mirrors the public REST API, so AI coding assistants can generate reliable examples from the installed package types and this documentation.
Tip: Ask your assistant to use the typed SDK models and the examples on this docs page as the source of truth. The package exposes real method signatures, response models, and error types so generated code stays aligned with the API.
SDK Features
- Sync + Async clients —
DataBluefor synchronous code,AsyncDataBluefor asyncio/FastAPI/Django - Pydantic v2 response models — every response is a typed dataclass with autocomplete and validation
- Automatic retries — exponential backoff on 429 and 5xx errors, configurable max retries
- Context manager support —
with/async withfor clean resource management - Job polling built-in — crawl/search blocking methods poll automatically with configurable timeout
- Node/TypeScript support — typed async client with camelCase options mapped to the DataBlue REST API
- Typed error hierarchy — catch specific errors like
RateLimitError,AuthenticationError, etc. - Environment variable config — zero-config setup with
DataBlue.from_env()