> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spidra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs

> Official libraries for every major language and platform.

All Spidra SDKs wrap the same REST API with idiomatic helpers for your language: authentication, async job polling, error handling, and typed responses. Pick your language and you are up and running in a few lines of code.

All SDKs are open source at [github.com/spidra-io](https://github.com/spidra-io).

## Every SDK supports

* Scrape, batch scrape, and crawl
* Browser actions and forEach
* Structured output with JSON Schema
* Authenticated scraping with session cookies
* Stealth mode and proxy geo-targeting
* Async job submission and automatic polling

## Quick example

Every SDK follows the same pattern. Here is a scrape across all languages:

<CodeGroup>
  ```typescript Node.js theme={null}
  import { SpidraClient } from 'spidra-js'

  const spidra = new SpidraClient({ apiKey: process.env.SPIDRA_API_KEY })

  const job = await spidra.scrape.run({
    urls: [{ url: 'https://example.com/products' }],
    prompt: 'Extract all product names and prices',
    output: 'json',
  })

  console.log(job.result.content)
  ```

  ```python Python theme={null}
  import asyncio
  from spidra import SpidraClient, ScrapeParams, ScrapeUrl

  async def main():
      spidra = SpidraClient(api_key="spd_YOUR_API_KEY")

      job = await spidra.scrape.run(ScrapeParams(
          urls=[ScrapeUrl(url="https://example.com/products")],
          prompt="Extract all product names and prices",
          output="json",
      ))

      print(job.result.content)

  asyncio.run(main())
  ```

  ```go Go theme={null}
  client := spidra.New(os.Getenv("SPIDRA_API_KEY"))

  job, err := client.Scrape.Run(ctx, spidra.ScrapeParams{
      URLs:   []spidra.ScrapeURL{{URL: "https://example.com/products"}},
      Prompt: "Extract all product names and prices",
      Output: "json",
  })
  ```

  ```php PHP theme={null}
  $spidra = new SpidraClient(getenv('SPIDRA_API_KEY'));

  $job = $spidra->scrape->run([
      'urls'   => [['url' => 'https://example.com/products']],
      'prompt' => 'Extract all product names and prices',
      'output' => 'json',
  ]);
  ```

  ```ruby Ruby theme={null}
  client = Spidra.new(ENV["SPIDRA_API_KEY"])

  job = client.scrape.run(
    urls:   [{ url: "https://example.com/products" }],
    prompt: "Extract all product names and prices",
    output: "json"
  )

  puts job["result"]["content"]
  ```
</CodeGroup>

`run()` submits the job and polls until it completes. Use `submit()` and `get()` separately if you need manual control over polling.

## Official SDKs

<CardGroup cols={2}>
  <Card title="Node.js" icon="node" href="/sdks/node">
    Supports TypeScript natively. Works in Next.js, Express, Bun, and edge runtimes. LangChain and Vercel AI SDK tool support built in.

    `npm install spidra-js`
  </Card>

  <Card title="Python" icon="python" href="/sdks/python">
    Async-first with sync wrappers. Works in scripts, Django, Flask, FastAPI, and Jupyter notebooks.

    `pip install spidra`
  </Card>

  <Card title="Go" icon="golang" href="/sdks/go">
    Typed structs, idiomatic error handling, zero external dependencies. Standard library only.

    `go get github.com/spidra-io/spidra-go`
  </Card>

  <Card title="PHP" icon="php" href="/sdks/php">
    Requires PHP 8.1+ and Guzzle 7. Typed exceptions and configurable polling timeouts.

    `composer require spidra/spidra-php`
  </Card>

  <Card title="Ruby" icon="gem" href="/sdks/ruby">
    Pure stdlib, no external dependencies. Works in Rails, Sinatra, and plain scripts.

    `gem install spidra`
  </Card>

  <Card title="Elixir" icon="erlang" href="/sdks/elixir">
    Idiomatic pattern matching, OTP-ready. Works with Phoenix and plain Mix projects.

    `{:spidra, "~> 0.1.0"}`
  </Card>

  <Card title=".NET" icon="microsoft" href="/sdks/dotnet">
    Fully async with `Task`/`await`. Typed exceptions and JSON schema support. Requires .NET 8+.

    `dotnet add package Spidra`
  </Card>

  <Card title="Swift" icon="swift" href="/sdks/swift">
    Native `async/await` concurrency. Works on iOS, macOS, tvOS, watchOS, and server-side Swift.

    Swift Package Manager — add via Xcode or `Package.swift`.
  </Card>

  <Card title="Java" icon="java" href="/sdks/java">
    Java 17+. `CompletableFuture`-based async, builder pattern, no extra HTTP dependencies.

    `implementation 'io.spidra:spidra-java-sdk:0.1.0'`
  </Card>

  <Card title="Rust" icon="rust" href="/sdks/rust">
    Built on `tokio` and `reqwest`. Native async/await, returns `Result<T, SpidraError>` on every call.

    `cargo add spidra`
  </Card>
</CardGroup>

## Workflow integrations

<CardGroup cols={3}>
  <Card title="n8n" icon="diagram-project">
    Native node for n8n workflows. Trigger scrapes, batch jobs, and crawls as steps in any automation.

    Coming soon.
  </Card>

  <Card title="Zapier" icon="bolt">
    Connect Spidra to 6,000+ apps without code. Trigger on schedule or on demand and send results anywhere.

    Coming soon.
  </Card>

  <Card title="MCP Server" icon="robot">
    Give any LLM live web access as a native tool. Works with Claude, GPT-4, and any MCP-compatible agent runtime.

    Coming soon.
  </Card>
</CardGroup>
