- Java 17+ — uses
java.net.http.HttpClient, no extra HTTP dependencies - Jackson for JSON (de)serialization
CompletableFuture<T>for all async operations- Builder pattern for all request parameter objects
Installation
Gradle
Maven
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 or a secrets manager.
Getting started
All requests require an API key sent as thex-api-key header. Pass it to the client:
Quick start
run() submits the job and polls until it completes. The CompletableFuture resolves with the final result.
Scraping
Single-page scrape
waiting · active · completed · failed
Submit and poll manually
If you need to track progress yourself, usesubmit() and get() directly:
Browser actions
| Action | Required fields | Description |
|---|---|---|
click | selector or value | Click a button, link, or any element |
type | selector, value | Type text into an input or textarea |
check | selector or value | Check a checkbox |
uncheck | selector or value | Uncheck a checkbox |
wait | waitMs (ms) | Pause for a set number of milliseconds |
scroll | to (0–100%) | Scroll the page to a percentage of its height |
Batch scraping
Submit up to 50 URLs in a single request. All URLs are processed in parallel.pending · running · completed · failed
Batch statuses: pending · running · completed · failed · cancelled
Cancel a batch
Crawling
Give Spidra a starting URL and instructions for which links to follow. It discovers pages automatically and extracts structured data from each one.Retrieve all crawled pages
Re-extract without re-crawling
Apply a new AI prompt to an existing completed crawl without fetching pages again.Logs
Every API scrape job is logged automatically.Usage statistics
Returns credit and request usage broken down by day or week.| Range | Description |
|---|---|
"7d" | Last 7 days, one row per day |
"30d" | Last 30 days, one row per day |
"weekly" | Last 7 weeks, one row per week |
Error handling
All exceptions extendSpidraException (an unchecked RuntimeException):
| Exception | HTTP Status |
|---|---|
SpidraAuthException | 401, 403 |
SpidraInsufficientCreditsException | 402 |
SpidraRateLimitException | 429 |
SpidraServerException | 5xx |
SpidraException | any other |
Configuration
Custom base URL
Environment variable pattern
Building from source
Swift
Official Swift SDK — async/await native, works on iOS, macOS, tvOS, watchOS, and server-side Swift.
Rust
Official Rust SDK — tokio-based async, zero-cost abstractions, returns Result on every call.

