Skip to main content
The official Rust SDK for Spidra lets you extract structured data from any website by describing what you want in plain English. It handles JavaScript rendering, anti-bot bypass, and CAPTCHA solving as a managed API, so your Rust code stays focused on the data. Built on tokio and reqwest, the SDK uses native Rust async/await throughout and returns Result<T, SpidraError> on every call.

Installation

Add the dependency to your Cargo.toml:
Or via Cargo:
Get your API key from app.spidra.io under Settings → API Keys. Keep your key out of source control — read it from an environment variable.

Getting started

All requests require an API key. Pass it to the client:

Quick start

run() submits the job and polls until it completes, then returns the result.

Scraping

Scrape a single page

AI extraction with a prompt

Submit and poll manually

If you need more control over polling (e.g. to show progress), submit and poll separately:
Job statuses: waiting · active · completed · failed · cancelled

Custom polling options

Use run_with_options to override the default poll interval and timeout:

Batch scraping

Submit up to 50 URLs in a single request. All URLs are processed in parallel.
Item statuses: pending · running · completed · failed Batch statuses: pending · running · completed · failed · cancelled

Crawling

Give Spidra a starting URL and instructions for which links to follow. It discovers pages automatically and extracts structured data from each one.

Logs

Every API scrape job is logged automatically.

Usage statistics

Returns credit and request usage broken down by day or week.

Error handling

All methods return Result<T, SpidraError>. The error variants are:

Java

Official Java SDK — CompletableFuture-based, builder pattern, no extra HTTP dependencies.