Skip to main content
The Spidra Fastify integration (spidra-fastify) provides a first-class plugin for Fastify applications:
  • spidraPlugin: Decorates fastify.spidra and request.spidra with the official client.
  • Turnkey Routes: Optional routes: true registers /spidra/scrape, /spidra/crawl, /spidra/search, /spidra/batch, /spidra/map, /spidra/parse, /spidra/account, and /spidra/usage automatically.
  • HMAC Webhook Verification: Built-in verification for X-Spidra-Signature on asynchronous crawl and batch events.

Installation

Requires Node.js 18+ and Fastify 4+.
Get your API key from app.spidra.io under API Keys. Store it in your environment variables.

Configuration

Set environment variables in .env:

Quickstart

1. Register plugin & decorate instance

2. Turnkey REST endpoints

Mount all Spidra REST API endpoints under /api/spidra in one line:

Scraping & browser actions

Deep site crawling

Batch scraping

Domain mapping

Document parsing (PDF, Word, Excel)

Turnkey templates & monitors

Error handling

NestJS

NestJS dynamic modules, injectable service, and webhook guard.

Hono

Cloudflare Workers and edge-ready web standard middleware.