Skip to main content
The official Java 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 Java code stays focused on the data.
  • 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. 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

Job statuses: waiting · active · completed · failed

Submit and poll manually

If you need to track progress yourself, use submit() and get() directly:

Browser actions

Available actions

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

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.

Error handling

All exceptions extend SpidraException (an unchecked RuntimeException):

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.