Installation
Get your API key from app.spidra.io under Settings → API Keys.
Keep your API 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 at initialization:Quick start
RunAsync submits the job and polls until it completes, then returns the result.
Scraping
RunAsync — submit and wait
| Property | Type | Description |
|---|---|---|
Urls | ScrapeUrl[] | Up to 3 URLs, each with optional per-URL browser actions |
Prompt | string | AI extraction instruction |
Output | OutputFormat | OutputFormat.Markdown (default) or OutputFormat.Json |
Schema | JsonElement? | JSON Schema for guaranteed output shape |
UseProxy | bool | Route through a residential proxy |
ProxyCountry | string? | Two-letter country code, e.g. "us", "de", "jp" |
ExtractContentOnly | bool | Strip navigation, ads, and boilerplate before AI extraction |
Screenshot | bool | Capture a screenshot of the page |
FullPageScreenshot | bool | Capture a full-page (scrolled) screenshot |
Cookies | string? | Raw Cookie header string for authenticated pages |
SubmitAsync + GetAsync — manual control
If you need to track progress yourself, useSubmitAsync and GetAsync directly:
waiting · active · completed · failed
Structured output
Pass a JSON schema to get a typed, deserializable result instead of raw text:required always appear in the response (as null if the data is not found). Optional fields are omitted when unavailable.
Batch scraping
Process up to 50 URLs in one call. All URLs are processed in parallel.pending · running · completed · failed
Batch statuses: pending · running · completed · failed · cancelled
Retry failed items
Crawling
Crawl an entire site and extract structured data from each page.| Property | Type | Description |
|---|---|---|
BaseUrl | string | Starting URL for the crawl |
CrawlInstruction | string | Which links to follow and which to skip |
TransformInstruction | string | What to extract from each page |
MaxPages | int | Maximum number of pages to crawl |
UseProxy | bool | Route through a residential proxy |
ProxyCountry | string? | Two-letter country code, e.g. "us" |
Cookies | string? | Raw Cookie header string for authenticated sites |
Error handling
All exceptions inherit fromSpidraException.
| Exception | When |
|---|---|
SpidraAuthenticationException | 401 — invalid or missing API key |
SpidraInsufficientCreditsException | 402 — not enough credits |
SpidraRateLimitException | 429 — rate limit exceeded |
SpidraServerException | 5xx — server-side error |
SpidraRateLimitException.RetryAfter contains the server-suggested wait time when available.
Elixir
Official Elixir SDK — idiomatic pattern matching, OTP-ready, works with Phoenix and plain Mix projects.
Swift
Official Swift SDK — async/await native, works on iOS, macOS, tvOS, watchOS, and server-side Swift.

