spidra-express) brings Spidra’s web intelligence platform into Express.js:
spidraMiddleware(): Automatically attaches a configuredreq.spidraclient to all requests.createSpidraRouter(): Pre-built router exposing endpoints for/scrape,/crawl,/search,/batch,/map,/parse,/account, and/usage.spidraWebhookMiddleware(): Validates HMAC-SHA256 signatures on incoming asynchronous webhooks.spidraErrorHandler(): Express error middleware mapping Spidra exceptions directly to formatted JSON responses.
Installation
Get your API key from app.spidra.io under API Keys.
Store it as an environment variable in
.env.Configuration
Set environment variables in.env:
Quickstart
1. Attaching req.spidra
2. Pre-built REST router
Mount all Spidra REST API endpoints under/api/spidra in a single line:
3. HMAC webhook middleware
Receive and verify asynchronous crawl and batch completion events:Scraping & browser actions
Execute browser interactions before extraction:Deep site crawling
Live SERP & web search
Batch scraping
Domain mapping
Document parsing (PDF, Word, Excel)
Turnkey templates & monitors
Error handling
Next.js
React Server Components, Server Actions, and App Router route handlers.
NestJS
NestJS dynamic modules, injectable service, and webhook guard.

