Skip to main content
The official Elixir SDK for Spidra wraps the Spidra API so you’re not writing raw HTTP calls and polling loops yourself. It handles job submission, status polling, retry logic, and error mapping. All results come back as structured data ready to feed into your LLM pipelines or store directly.

Installation

Add spidra to your list of dependencies in mix.exs:
Then run mix deps.get in your terminal.
Get your API key from app.spidra.io under Settings → API Keys. Store it as an environment variable — never hardcode it in source.

Requirements


Getting started

From here you access everything through Spidra.Scrape, Spidra.Batch, Spidra.Crawl, Spidra.Logs, and Spidra.Usage.

Scraping

All scrape jobs run asynchronously on the Spidra platform. Spidra.Scrape.run/3 submits a job and polls until it finishes. If you need more control, use submit/2 and get/2 directly. Up to 3 URLs can be passed per request and they are processed in parallel.

Basic scrape

Submit a scrape job and wait for results.
Parameters

Fire-and-forget approach

Use submit/2 and get/2 when you want to manage polling yourself.
Job statuses: waiting · active · completed · failed

Structured JSON output

Pass a schema to enforce an exact output shape. Missing fields come back as null rather than hallucinated values.

Geo-targeted scraping

Pass use_proxy: true and a proxy_country code to route the request through a specific country. Useful for geo-restricted content or localized pricing.
Supported country codes include us, gb, de, fr, jp, au, ca, br, in, nl, sg, es, it, mx, and 40+ more. Use "global" or "eu" for regional routing.

Authenticated pages

Pass cookies as a string to scrape pages that require a login session.

Browser actions

Actions let you interact with the page before the scrape runs. They execute in order, and the scrape happens after all actions complete.
Available actions Use selector for a CSS selector or XPath. Use value for plain English — Spidra locates the element using AI.

Batch scraping

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

batch.submit() + batch.get()

Retry failed items

Re-queue only the items that failed — successful items are not re-run.

Cancel a batch

Stops all pending items and refunds credits for unprocessed work.

List past batches


Crawling

Give Spidra a starting URL and instructions for which links to follow. It discovers pages automatically, extracts structured data from each one, and returns everything when the crawl is done.
Parameters

crawl.submit() + crawl.get()

Download crawled content

Returns signed S3 URLs for the raw HTML and Markdown of each crawled page. Links expire after 1 hour.

Re-extract without re-crawling

Apply a new AI prompt to an existing completed crawl without fetching the pages again. Only transformation credits are charged.

History and stats


Logs

Every API scrape job is logged automatically. Access your full history with optional filters.
Filter parameters Get a single log entry including the full AI extraction result:

Usage statistics

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

Python

Official Python SDK — async-first with sync wrappers. Works in scripts, Django, Flask, and Jupyter.

.NET

Official .NET SDK — fully async, typed exceptions, JSON schema support. Requires .NET 8+.