Spectrawl is a unified web interaction layer for AI agents, integrating search, browsing, crawling, structured extraction, and platform operations into a single self-hosted npm package, avoiding the need to separately stitch together Playwright, search APIs, cookie management, and platform scripts.
Purpose and main capabilities: Search supports cascading across 8 engines, with the default order being Gemini Grounded → Tavily → Brave, where Gemini Grounded Search has a free quota of 5,000 queries per month. It provides two modes: basic search and deep search: basic mode returns raw results, fast and lightweight; deep mode performs query expansion, parallel searches, merge and deduplication, reranking, crawling the top N pages, and optionally an AI summary with citations. By default, no summary is returned; instead, the raw sources are handed to the agent's own LLM for processing. With no keys at all, only DDG search raw results are supported, and data center IPs will be rate-limited.
Browsing uses a three-tier automatic escalation stealth scheme: Playwright plus stealth plugin (default), Camoufox binary (requires running npx spectrawl install-stealth), and remote Camoufox. It can identify 8 types of anti-bot block pages and returns blocked and blockInfo in the response. Some sites have dedicated fallback paths: Reddit and Amazon take effect automatically, X requires XAI_API_KEY, and LinkedIn requires a residential proxy. It has built-in CAPTCHA recognition based on Gemini Vision, supporting image, text/math, and simple visual challenges, but not reCAPTCHA v2/v3, hCaptcha, or Cloudflare Turnstile.
Other capabilities include: structured extraction using an LLM plus optional CSS/XPath selectors, with BM25 relevance filtering; controlling the browser with natural language to perform actions such as clicks, typing, selection, key presses, and scrolling; capturing page XHR/fetch requests; screenshots; sitemap-based multi-page crawling, automatically parallelized based on memory (about 250MB per tab); Webhook notifications and asynchronous crawling tasks; SQLite-persisted cookies and multi-account management; operation adapters for 24 platforms, with built-in rate limiting, content deduplication, and dead-letter retries; and ranking results by domain trust.
Usage: after npm installation, self-hostand run it; default options can be configured via spectrawl.json, and it supports MCP-compatible agents (such as Claude, Cursor, LangChain). Errors follow the RFC 9457 format. Limitations: LinkedIn must use a residential proxy, some CAPTCHA types cannot be solved, deep search and extraction depend on the corresponding LLM keys, and complete availability information for specific platform adapters is not fully listed.