@XAMTO_AI: AnakinScraper OSS – Open-source web scraping API built for AI. Convert any website to clean Markdown or structured JSON with a single click, directly for use in RAG and AI agents. Highlights: Anti-detection browser (Camoufox Firefox), Smart proxy…
Summary
AnakinScraper OSS is an open-source web scraping API designed for AI applications, converting websites to clean Markdown or structured JSON for use in RAG pipelines and AI agents.
View Cached Full Text
Cached at: 08/18/26, 08:24 AM
AnakinScraper OSS, the open-source web scraping API purpose-built for AI. Instantly convert any website into clean Markdown or structured JSON, ready to feed directly into RAG, AI Agents, and more. Key highlights: anti-detect browser (Camoufox Firefox), intelligent proxy auto-selection (Thompson Sampling), automatic handler chain degradation (HTTP → Browser → External API), one-command startup: make up. Fully self-hosted with zero cloud dependencies. Supports sync/async/batch modes and includes a built-in web dashboard. Lighter and smarter than Firecrawl or Crawlee, optimized specifically for AI scenarios!
https://github.com/Anakin-Inc/anakin…
Anakin-Inc/anakin
Source: https://github.com/Anakin-Inc/anakin
AnakinScraper OSS
CI (https://github.com/Anakin-Inc/anakinscraper-oss/actions/workflows/ci.yml) License: AGPL-3.0 Go (https://go.dev) Python (https://python.org) Docker React
The open-source web scraping API for AI. Turn any website into LLM-ready markdown or structured data. Self-host with a single command. No cloud dependencies. Powers RAG pipelines, AI agents, and data extraction at scale.
git clone https://github.com/Anakin-Inc/anakinscraper-oss.git && cd anakinscraper-oss && make up
# Scrape any website — one curl, full result:
curl -s -X POST http://localhost:8080/v1/scrape \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}' | jq .markdown
Why AnakinScraper?
| AnakinScraper | Firecrawl | Crawlee | Scrapy | |
|---|---|---|---|---|
| Anti-detect browser | Camoufox (Firefox) | Headless Chrome | Playwright | No |
| Smart proxy selection | Thompson Sampling (ML) | Round-robin | Manual | Manual |
| Zero-config start | go run — no DB needed | Docker required | npm install | pip install |
| Single binary | Go — one 30MB binary | Node.js | Node.js | Python |
| Handler chain fallback | HTTP → Browser → API | Single mode | Single mode | Single mode |
| Structured JSON (AI) | Gemini extraction | LLM extraction | No | No |
Features
- Handler chain with fallback — HTTP fetch → anti-detect browser → external API. Each handler tries in order; if one fails, the next picks up automatically. Most pages resolve on the free local HTTP handler — paid APIs are only called for the ~5% that actually need them. Docs →
- Custom API handlers — plug in any third-party scraping service as a chain fallback. Only invoked when local handlers fail — saves 90%+ on API costs vs routing everything through a paid service. Built-in anakin.io (https://anakin.io) handler included. How to add your own →
- Domain configs — per-domain scraping strategies: choose which handlers to use, set timeouts, retries, custom headers, block domains, and validate content with pattern matching. Docs →
- Failure detection — define failure patterns and required patterns per domain. If the scraped content matches a failure pattern (e.g. CAPTCHA page) or misses a required pattern, the job auto-retries with the next handler. Docs →
- Anti-detect browser — Camoufox (https://github.com/daijro/camoufox) (anti-detect Firefox) with realistic fingerprints, not headless Chrome. Docs →
- Proxy auto-select — Thompson Sampling (https://en.wikipedia.org/wiki/Thompson_sampling) picks the best proxy per domain, learning from success/failure in real time. Docs →
- Structured JSON extraction — use Gemini AI to extract structured data from any page (bring your own API key)
- Sync + async + batch API —
POST /v1/scrapefor instant results,/v1/url-scraperfor async with polling, batch up to 10 URLs - LLM-ready markdown — automatic boilerplate removal, clean content extraction. Feed directly into RAG pipelines, Claude, GPT, or any LLM without preprocessing
- Web dashboard — built-in React UI for scraping, job tracking, domain config management, and proxy monitoring
- Zero-config mode — run with just Go, no database needed. Or use Docker for the full stack
- Self-contained — no Redis, no AWS, no message queues. Single Go binary. Optional PostgreSQL for persistence
Quick Start (no Docker, no database)
Just Go 1.25+. Two commands:
cd server && go run cmd/server/main.go
# In another terminal:
curl -s -X POST http://localhost:8080/v1/scrape \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}' | jq .markdown
Jobs are stored in memory (lost on restart). For persistence, set DATABASE_URL. For JavaScript-heavy sites, add the browser service via Docker.
Self-Host (Docker — full stack)
Prerequisites
- Docker (https://docs.docker.com/get-docker/) and Docker Compose
Start
git clone https://github.com/Anakin-Inc/anakinscraper-oss.git
cd anakinscraper-oss
make up
That’s it. Three containers start:
| Service | Port | Description |
|---|---|---|
| Server | 8080 | REST API + worker pool |
| Browser Service | 9222 | Camoufox anti-detect browser (WebSocket) |
| PostgreSQL | 5432 | Job storage |
Web Dashboard
A built-in web UI is included for visual scraping, job tracking, and configuration:
cd webapp && npm install && npm run dev
Open http://localhost:3000 — the dashboard proxies API calls to the server on port 8080. Pages: Dashboard (health + quick scrape) | Scrape (sync/async/batch with live results) | Jobs (tracked history with status filters) | Domain Configs (CRUD with handler chain management) | Proxy Scores (Thompson Sampling performance)
Scrape a URL
Synchronous (recommended for getting started):
curl -s -X POST http://localhost:8080/v1/scrape \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}' | jq .
One request, full result back. No polling. Timeout: 30 seconds by default (configurable via the timeout request field, max 120 seconds).
Asynchronous (for long-running scrapes):
# Submit
curl -s -X POST http://localhost:8080/v1/url-scraper \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'
# Poll for result
curl -s http://localhost:8080/v1/url-scraper/JOB_UUID | jq .
With AI-powered JSON extraction (requires GEMINI_API_KEY):
curl -s -X POST http://localhost:8080/v1/scrape \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "generateJson": true}' | jq .generatedJson
No API keys required for the scraper itself. Just JSON in, results out.
Architecture
┌─────────────────┐
│ Your App │
│ (cURL / CLI) │
└────────┬────────┘
│ HTTP
▼
┌─────────────────┐ ┌──────────┐
│ Server │──────▶│ Gemini │
│ (Go/Fiber) │optional│ (JSON) │
│ Port 8080 │ └──────────┘
└──┬──────┬───┬──┘
│ │ │
┌──────┘ └────────────┐
│ ▼
▼ ▼
┌──────────┐ ┌──────────────┐ ┌──────────────┐
│ Storage │ │ Browser │ │ API Handler │
│ Postgres │ │ Service │ │ (anakin.io │
│ or memory│ │ (Camoufox) │ │ or custom) │
│(optional)│ │ (optional) │ │ (optional) │
└──────────┘ └──────────────┘ └──────────────┘
The server is a single Go binary that runs with zero dependencies. Optionally add PostgreSQL for persistence, the browser service for JavaScript-heavy sites, and API handlers for hard-to-scrape sites. Workers execute the handler chain (HTTP → browser → API fallback), convert HTML to markdown, and optionally extract structured JSON via Gemini.
API Reference
See docs/API.md for the complete API reference. Quick overview:
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/scrape | Sync — scrape a URL and get the result back directly (default 30s timeout, configurable via timeout field, max 120s) |
POST | /v1/url-scraper | Async — submit a scrape job, returns job ID |
GET | /v1/url-scraper/:id | Poll for async job result |
POST | /v1/url-scraper/batch | Batch scrape up to 10 URLs |
GET | /v1/url-scraper/batch/:id | Poll for batch result |
POST | /v1/domain-configs | Create a per-domain scraping config |
GET | /v1/domain-configs | List all domain configs |
GET | /v1/proxy/scores | View proxy Thompson Sampling scores |
GET | /v1/telemetry/status | View telemetry state and next payload (details) |
GET | /health | Health check |
Request Fields
| Field | Type | Default | Description |
|---|---|---|---|
url | string | required | URL to scrape |
useBrowser | bool | false | Skip HTTP handler, go straight to browser |
generateJson | bool | false | Extract structured JSON via Gemini AI (requires GEMINI_API_KEY) |
timeout | int | 30 | Seconds to wait for a sync result (max 120; sync endpoint only) |
Response
{
"id": "550e8400-...",
"status": "completed",
"url": "https://example.com",
"html": "...",
"cleanedHtml": "...",
"markdown": "# Page Title\n\nContent...",
"generatedJson": {
"status": "success",
"data": {"title": "Page Title", "content": "..."}
},
"durationMs": 1234
}
generatedJson is only present when generateJson: true and GEMINI_API_KEY is configured.
Handler Chain
Each scrape job goes through the handler chain. On failure, it falls back to the next handler:
HTTP Handler (fast, ~200ms) ──fail──▶ Browser Handler (Camoufox) ──fail──▶ API Handler (optional)
HTTP Handler — direct HTTP GET with a browser user-agent. Handles static HTML, server-rendered pages. No browser overhead.
Browser Handler — connects to Camoufox (https://github.com/daijro/camoufox) (anti-detect Firefox) over WebSocket via Playwright protocol. Full JavaScript rendering, network-idle detection, realistic browser fingerprints. Handles SPAs, lazy-loaded content, and sites with anti-bot protection.
API Handler (optional) — delegates to an external scraping API when local handlers fail. Set ANAKIN_API_KEY to enable the built-in anakin.io (https://anakin.io) fallback for hard-to-scrape sites (Cloudflare, DataDome, etc.). See Adding Custom API Handlers below.
Adding Custom API Handlers
The API handler pattern makes it easy to integrate any third-party scraping service as a chain fallback. The built-in anakin.io handler (server/internal/handler/api.go) is a working example — copy and modify it for your provider:
- Copy
api.gotomy_provider.go - Add a constructor like
NewAnakinHandler— set your provider’s URL, auth header name, and response format - Register in
main.go:
if cfg.MyProviderAPIKey != "" {
handlers = append(handlers, handler.NewAPIHandler(handler.APIHandlerConfig{
Name: "my-provider",
APIURL: "https://api.my-provider.com/scrape",
APIKey: cfg.MyProviderAPIKey,
AuthHeader: "Authorization", // or "X-API-Key", "Bearer", etc.
}))
}
- Add env var to
config.go:MyProviderAPIKey: os.Getenv("MY_PROVIDER_API_KEY")
API keys always come from environment variables — never hardcoded. The handler only activates when its key is set.
Extending the Chain
Implement the ScrapingHandler interface:
type ScrapingHandler interface {
Name() string
CanHandle(ctx context.Context, req *HandlerRequest) bool
Scrape(ctx context.Context, req *HandlerRequest) (*ScrapeResult, error)
IsHealthy() bool
}
Configuration
All configuration via environment variables:
| Variable | Default | Description |
|---|---|---|
PORT | 8080 | Server port |
DATABASE_URL | — | PostgreSQL connection string (optional — uses in-memory storage when not set) |
BROWSER_WS_URL | ws://localhost:9222/camoufox | Browser service WebSocket URL |
BROWSER_TIMEOUT | 60 | Page navigation timeout (seconds) |
BROWSER_LOAD_WAIT | 2 | Extra wait after page load (seconds) |
WORKER_POOL_SIZE | 5 | Concurrent scrape workers |
JOB_BUFFER_SIZE | 100 | Job queue buffer size |
JOB_TIMEOUT | 120 | Max job duration (seconds) |
PROXY_URL | — | Default HTTP proxy for the HTTP handler |
PROXY_URLS | — | Comma-separated proxy pool for auto-selection (Thompson Sampling) |
GEMINI_API_KEY | — | Google Gemini API key for structured JSON extraction (get one free (https://aistudio.google.com/apikey)) |
ANAKIN_API_KEY | — | anakin.io (https://anakin.io) API key — enables hosted API as chain fallback for hard-to-scrape sites |
LOG_LEVEL | INFO | Log level (DEBUG, INFO, WARN, ERROR) |
TELEMETRY | on | Anonymous usage telemetry (off to disable — see TELEMETRY.md) |
TELEMETRY_URL | — | Custom telemetry endpoint (defaults to https://telemetry.anakin.io/v1/collect) |
DISABLE_HOSTED_HINTS | — | Set to true to suppress hosted service tips in error messages |
Project Structure
anakinscraper-oss/
├── server/ # Go server (API + workers)
│ ├── cmd/server/ # Entry point
│ └── internal/
│ ├── config/ # Environment config
│ ├── models/ # Data types
│ ├── worker/ # Channel-based worker pool
│ ├── handler/ # Scraping handlers (HTTP, Browser)
│ ├── converter/ # HTML → Markdown
│ ├── gemini/ # Gemini AI JSON extraction
│ ├── domain/ # Domain configs + failure detection
│ ├── store/ # Job storage (PostgreSQL or in-memory)
│ ├── proxy/ # Proxy pool + Thompson Sampling
│ ├── telemetry/ # Anonymous usage telemetry
│ ├── processor/ # Job processing
│ └── http/
│ ├── handlers/ # API request handlers
│ └── router/ # Route registration
├── browser-service/ # Camoufox anti-detect browser server
├── webapp/ # React web dashboard (Vite + Tailwind)
├── openclaw-skill/ # OpenClaw skill wrapper
├── examples/ # Usage examples
├── docker-compose.yml # Full stack (3 containers)
├── scripts/init-db.sql # Database schema
└── .env.example # Config template
Development
Running Locally (without Docker)
Minimal (Go only):
cd server && go run cmd/server/main.go
No database, no browser service. HTTP handler scrapes static sites. Jobs stored in memory.
Full local stack (Go + Python + PostgreSQL):
# Terminal 1: PostgreSQL
docker compose up postgres -d
# Terminal 2: Browser Service (for JS-heavy sites)
cd browser-service && pip install -r requirements.txt && python server.py
# Terminal 3: Server with persistence
cd server && DATABASE_URL="postgres://postgres:postgres@localhost:5432/anakinscraper?sslmode=disable" go run cmd/server/main.go
Running Tests
cd server && go test ./...
Building
cd server && go build -o server ./cmd/server
CLI
Use the Anakin CLI (https://github.com/Anakin-Inc/anakin-cli) to scrape from your terminal. It works against both self-hosted and the hosted API (https://anakin.io):
# Install
pip install anakin-cli
# Scrape via your local instance (no API key needed)
anakin scrape "https://example.com" --api-url http://localhost:8080
# Or set it as your default
export ANAKIN_API_URL="http://localhost:8080"
anakin scrape "https://example.com"
# Extract structured JSON
anakin scrape "https://example.com" --format json --api-url http://localhost:8080
# Batch scrape
anakin scrape-batch "https://example.com" "https://httpbin.org/html" --api-url http://localhost:8080
The same CLI also supports AI web search and deep research via the hosted API — get a free API key (https://anakin.io/dashboard) to unlock those features. See the anakin-cli repo (https://github.com/Anakin-Inc/anakin-cli) for full usage.
Integrations
OpenClaw Skill
Use AnakinScraper as an OpenClaw (https://openclaw.ai) skill:
cp -r openclaw-skill ~/.openclaw/workspace/skills/anakinscraper
Self-Hosted vs Hosted
This repo gives you the full scraping engine. anakin.io (https://anakin.io) adds the infrastructure you’d otherwise build yourself:
| Feature | Self-Hosted (this repo) | Hosted (anakin.io (https://anakin.io)) |
|---|---|---|
| Sync + async scraping | Yes | Yes |
| Batch scraping | Yes | Yes |
| Anti-detect browser | Yes | Yes |
| Structured JSON extraction | Yes (bring your own Gemini key) | Yes (built-in) |
| Domain configs | Yes | Yes |
| Proxy auto-selection | Yes (Thompson Sampling) | Yes (Thompson Sampling) |
| Handler chain fallback | Yes | Yes |
| Zero-config start | go run (no DB needed) | Just sign up |
| Infrastructure management | You (VPS/Docker) | Managed (anakin.io) |
| Uptime SLA | Your setup | Yes |
| API rate limits | Your setup | Tiered plans |
| Cost | Free (self-hosted) | Free tier + paid plans |
Similar Articles
@IndieDevHailey: Crawl4AI: A 70,000-star open-source tool that turns web pages into clean Markdown ready for LLMs! Say goodbye to paid crawlers! Zero API Key, structured data in seconds, designed for RAG, Agents, and data pipelines. Super clean output: intelligent denoising, tables/code/quotes fully preserved, directly feedable to LLMs. Really fast: asynchronous browser pool + caching + adaptive crawling, deep mining also stable. Full control: proxies, sessions, JS execution, stealth anti-blocking, play as you like. Zero barrier: one-click CLI, Docker deployment, supports any LLM to extract structured data. Free and no barrier: 70k+ stars on GitHub, ready for production.
Crawl4AI is an open-source web crawler tool that converts web content into clean Markdown format, designed for LLM's RAG, Agents, and data pipelines. Zero API Key, fast output of structured data.
@gaoqian2580: GitHub Phenomenal Project Firecrawl! Over 134k Stars! A must-have tool for AI developers: turn any website directly into clean data usable by AI! Automatic crawling + cleaning + structured output as Markdown/JSON, supports JS pages. Even better, it supports AI Agent autonomous…
Firecrawl is an open-source project on GitHub with over 134k stars, capable of automatically crawling, cleaning, and converting websites into AI-usable Markdown or JSON formatted data. It supports JavaScript pages and AI Agent autonomous interaction, serving as the infrastructure for building RAG, knowledge bases, and automated Agent projects.
@GitHub_Daily: Trying to feed webpage content to AI, but ending up with a bunch of navigation bars, ads, and garbled text, wasting most of the context window, and AI still can't understand it. So I found this open-source project PullMD, which can extract any webpage content and convert it into clean Markdown files. Just provide a URL, auto-detect page type, layer by layer...
PullMD is an open-source URL to Markdown service that automatically extracts the main content of a webpage, removing navigation, ads, and other clutter. It supports headless browsers and multiple interfaces (web, REST API, MCP), making it easy for AI tools and users to obtain clean webpage text.
@CycleDecoded: For those building AI Agents and automated scrapers, look no further—this thing is basically a godsend that feeds the entire web to LLMs. Previously, to feed dynamic webpages to AI or scrape data, you had to wrestle with Puppeteer, set up dynamic proxies, deal with JavaScript, and tune API tokens…
Introducing the open-source project Firecrawl: a web data API that converts any URL into clean Markdown/JSON, supports AI interactions and whole-site crawling, designed specifically for LLMs and Agents, with 25k+ GitHub stars.
@binghe: The Cyber Bodhisattva of Web Scraping: Crawl4ai Free, AI-Powered Scraping Tool. 78.9k Free: No registration, no API keys, no per-page fees, a replacement for $16/month paid scrapers. Built for AI: Converts any complex webpage to Markdown with one click, directly usable by large language models,…
Crawl4ai is a free, AI-oriented scraping tool that converts web content to Markdown, ideal for RAG and Agent development.