spidra/spidra-laravel) brings AI-powered web intelligence directly into Laravel:
- Laravel Auto-Discovery: Automatically registers
SpidraServiceProviderand theSpidraFacade. - Config Publishing: Configurable via
config/spidra.phpand.env. SpidraFacade &spidra()Helper: Ergonomic syntax for controllers, queue jobs, Artisan commands, and Blade templates.- Dependency Injection: Inject
Spidra\SpidraClientorSpidra\Laravel\SpidraManageranywhere in your application. - HMAC Webhook Routing & Events: One-line
Route::spidraWebhooks()macro with automatic HMAC signature verification andSpidraWebhookReceivedevent dispatching. - Full API Surface: Web Scraping, Recursive Crawling, SERP Search, Batch Scraping, Document Parsing, Domain Mapping, Turnkey Templates, Presets, and Monitors.
Installation
Install the package via Composer:config/spidra.php.
Get your API key from app.spidra.io under API Keys.
Store it in your
.env file.Configuration
Set your Spidra credentials in.env:
Quickstart
1. In a Controller using the Facade
2. In a Route Closure
3. In a Queueable Job
4. Using the spidra() Helper
Complete Spidra Features Guide
1. Scraping with Browser Actions & Proxies
Handle JavaScript-heavy SPAs, dynamic tables, and login screens using residential proxies:2. Deep Site Crawling
Initiate recursive domain crawls with depth controls, path filters, and webhook callbacks:3. Real-Time SERP Web Search
Query web, news, and images to ground AI models with fresh web data:4. High-Throughput Batch Scraping
Scrape multiple independent URLs concurrently in a single batch job:5. Fast Domain Link Mapping
Discover all discoverable URLs across a domain without downloading full page bodies:6. Document Parsing (PDF, Word, Excel, PPTX)
Extract clean markdown and tables from remote URLs or local document files:7. Turnkey AI Templates & Scheduled Monitors
Execute pre-tuned extraction templates and schedule automated website monitors:Webhook Handling & Laravel Events
Spidra sends asynchronous webhooks upon completion of crawl jobs, batch scrapes, or monitor alerts.1. Register Webhook Route
Inroutes/api.php or routes/web.php:
If registered inside
routes/web.php, add spidra/* to the $except array in app/Http/Middleware/VerifyCsrfToken.php or bootstrap/app.php (Laravel 11+).2. Listen to Webhook Events
When a verified webhook arrives,SpidraWebhookReceived is automatically dispatched.
Create a listener:
app/Listeners/HandleSpidraWebhook.php:
app/Providers/EventServiceProvider.php (or auto-discovered in Laravel 11+):
Error Handling
All Spidra exceptions are strongly typed:Testing & Mocking
Test your controllers and jobs using theSpidra facade mock:
Related SDKs
PHP SDK
Core PHP client library with Guzzle for vanilla PHP applications.
FastAPI SDK
High-performance async Python integration with FastAPI.

