Firecrawl Browserless Adapter (POC)
Thin adapter that mimics a subset of the Firecrawl API using:
- Direct HTTP fetch for SSR/static pages.
- Browserless (headless Chromium) as fallback / SPA renderer.
- Readability + Turndown to extract clean Markdown.
Tech stack:
- NestJS, TypeScript, hexagonal architecture.
- Vitest for tests.
- Docker + docker-compose only; no host dependencies required.
Endpoints:
- GET /v1/health -> { success: true, status: "ok", service: "firecrawl-browserless-adapter" }
- POST /v1/scrape
- Body: { url: string, render?: boolean }
- Response: { url, title, markdown, html?, metadata: { source } }
Usage (local):
SPA / render mode:
- Set render=true to force Browserless for SPAs.
- Without it, the adapter tries direct fetch first and falls back if content looks incomplete.
Notes:
- This is a POC; not production-hardened.
- No auth, no rate limiting, basic error handling only.
Deployment (Home-Server / Production)
This service is designed to be a drop-in replacement for Firecrawl-style scraping endpoints.
Prerequisites
- Docker + Docker Compose installed on the target server.
- Port 3002 free (default external port).
- Internet access from the container (to scrape targets and pull Browserless image).
Steps
Copy this repository to your server:
- Example path: /opt/ai-tools
Ensure docker-compose.yaml uses a non-conflicting external port:
- Default mapping: 3002:3000
- If 3002 is in use, change it (e.g., 4000:3000).
Start the stack:
- docker compose up --build -d
Verify:
Environment / Configuration
Key environment variables (set in docker-compose.yaml or via .env):
Using as Drop-in Replacement
Once running, this adapter can be used like a Firecrawl-style scrape endpoint: