返回项目目录
xberg-io

xberg-io

crawlberg

High-performance web crawling engine with bindings for 11 languages

MCPcrawlingcsharpelixirffigolangjava
Stars
156
Forks
24
Watchers
156
Issues
1

README

项目介绍

14274 bytes

Xberg

Crawlberg

Built with alef Rust Python Node.js WASM Java Go C# PHP Ruby Elixir Dart Kotlin Swift Zig C FFI Docker License Documentation
Join Discord

Turn any website into clean, structured data. Point Crawlberg at a URL and get back Markdown, metadata, and links — from a single page or a whole site — in the language you already use.

What and Why?

You need data that lives on the web, and raw HTML is not it. Crawlberg does the crawling, scraping, and cleanup end-to-end: it fetches pages, follows links, converts each one to Markdown, and hands you structured metadata (titles, links, images, social-card and JSON-LD data) — so you skip the parsing and go straight to the content.

It runs from a single Rust core with identical results across 14 language bindings, and it handles the awkward parts for you: JavaScript-heavy pages fall back to a real headless browser, bot filters are detected and worked around, robots and sitemaps are respected, requests are throttled per domain, and requests to private or internal addresses are refused by default. Drive it from your code, an AI agent, a REST service, or the CLI.

Every part of the pipeline is a trait you can swap — the crawl frontier, rate limiter, storage, event stream, and content filters — so you can plug in your own behavior. Managed extras like proxy pools, tuned bot-evasion, authenticated sessions, scheduling, and billing live in xberg-enterprise.

Features

Feature Description
Structured extraction Text, metadata, links, images, assets, JSON-LD, Open Graph, hreflang, favicons, headings, response headers
Markdown conversion Clean Markdown with citations, document structure, and fit-content mode
Concurrent crawling Depth-first, breadth-first, or best-first traversal with configurable depth, page limits, and concurrency
14 language bindings Rust, Python, Node.js, Ruby, Go, Java, Kotlin (Android), C#, PHP, Elixir, Dart, Swift, Zig, and WebAssembly
Smart filtering BM25 relevance scoring, URL include/exclude patterns, robots.txt compliance, sitemap discovery
Browser rendering Optional headless browser for JavaScript-heavy SPAs with WAF detection and bypass
Batch & streaming Scrape or crawl hundreds of URLs concurrently; real-time crawl events via async streams
SSRF-safe by default Refuses loopback, private, link-local, and cloud-metadata addresses; opt out via env var or CrawlConfig
Auth & rate limiting HTTP Basic, Bearer, and custom-header auth with cookie jars; per-domain request throttling
MCP server & REST API Model Context Protocol integration for AI agents plus an HTTP server with OpenAPI spec

Supported Platforms

Precompiled binaries for Linux (x86_64/aarch64), macOS (ARM64), and Windows (x64) across every binding. See the platform support reference for the full matrix.

⭐ Star this repo to show your support — it helps others discover Crawlberg.

Quick Start

Language Packages

Python
pip install crawlberg
See [Python README](https://github.com/xberg-io/crawlberg/tree/main/packages/python) for full documentation. Node.js
npm install @xberg-io/crawlberg
See [Node.js README](https://github.com/xberg-io/crawlberg/tree/main/crates/crawlberg-node) for full documentation. Rust
cargo add crawlberg
See [Rust README](https://github.com/xberg-io/crawlberg/tree/main/crates/crawlberg) for full documentation. Go
go get github.com/xberg-io/crawlberg/packages/go
See [Go README](https://github.com/xberg-io/crawlberg/tree/main/packages/go) for full documentation. Java Available on Maven Central as `io.xberg.crawlberg:crawlberg`. See [Java README](https://github.com/xberg-io/crawlberg/tree/main/packages/java) for the dependency snippet and current version. C#
dotnet add package XbergIo.Crawlberg
See [C# README](https://github.com/xberg-io/crawlberg/tree/main/packages/csharp) for full documentation. Ruby
gem install crawlberg
See [Ruby README](https://github.com/xberg-io/crawlberg/tree/main/packages/ruby) for full documentation. PHP
composer require xberg-io/crawlberg
See [PHP README](https://github.com/xberg-io/crawlberg/tree/main/packages/php) for full documentation. Elixir Add `{:crawlberg, "~> 0.3"}` to your `mix.exs` dependencies. See [Elixir README](https://github.com/xberg-io/crawlberg/tree/main/packages/elixir) for full documentation. Dart / Flutter
dart pub add crawlberg
See [Dart README](https://github.com/xberg-io/crawlberg/tree/main/packages/dart) for full documentation. Kotlin (Android) Available on Maven Central as `io.xberg.crawlberg.android:crawlberg-android`. See [Kotlin README](https://github.com/xberg-io/crawlberg/tree/main/packages/kotlin-android) for the dependency snippet and current version. Swift Add via Swift Package Manager. See [Swift README](https://github.com/xberg-io/crawlberg/tree/main/packages/swift) for full documentation. Zig See [Zig README](https://github.com/xberg-io/crawlberg/tree/main/packages/zig) for installation and usage. WebAssembly
npm install @xberg-io/crawlberg-wasm
See [WebAssembly README](https://github.com/xberg-io/crawlberg/tree/main/crates/crawlberg-wasm) for full documentation. C/C++ (FFI) C header + shared library from [GitHub Releases](https://github.com/xberg-io/crawlberg/releases). See [FFI crate](https://github.com/xberg-io/crawlberg/tree/main/crates/crawlberg-ffi) for full documentation. CLI
cargo install crawlberg-cli
# Or install the prebuilt binary via cargo-binstall:
cargo binstall crawlberg-cli
brew install xberg-io/tap/crawlberg
See [CLI README](https://github.com/xberg-io/crawlberg/tree/main/crates/crawlberg-cli) for full documentation.

AI Coding Assistants

Install the Crawlberg plugin from xberg-io/crawlberg. It ships the Crawlberg agent skills (site crawling, HTML→Markdown scraping, headless-Chrome fallback) plus the crawlberg MCP server, and works with every major coding agent — expand your harness below.

Claude Code
/plugin marketplace add xberg-io/crawlberg
/plugin install crawlberg@crawlberg
Codex CLI
/plugins add https://github.com/xberg-io/crawlberg
Then search for `crawlberg` and select **Install Plugin**. Cursor Settings → Plugins → Add from URL → `https://github.com/xberg-io/crawlberg`, then select **crawlberg**. Gemini CLI
gemini extensions install https://github.com/xberg-io/crawlberg
Factory Droid
droid plugin marketplace add https://github.com/xberg-io/crawlberg
droid plugin install crawlberg@crawlberg
GitHub Copilot CLI
copilot plugin marketplace add https://github.com/xberg-io/crawlberg
copilot plugin install crawlberg@crawlberg
opencode Add the package to `opencode.json`:
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@xberg-io/opencode-crawlberg"]
}

Documentation

Full guides, per-language API references, the substrate/operational model, antibot strategy, and observability live at docs.crawlberg.xberg.io.

Contributing

Contributions are welcome! See our Contributing Guide.

Part of Xberg.io

  • Xberg — the open-source content-intelligence engine: text, tables, and metadata from 101 formats (115 file extensions), with OCR, transcription, and code intelligence. MIT.
  • Xberg Pro — a complete self-hosted content-intelligence backend in a single container. Commercial.
  • Xberg Enterprise — the distributed, governed content-intelligence platform, scaled on Kubernetes with team governance and support. Commercial.
  • crawlberg — web crawling and scraping with HTML→Markdown and headless-Chrome fallback.
  • html-to-markdown — fast, lossless HTML→Markdown engine.
  • liter-llm — universal LLM API client with native bindings for 14 languages and 165 providers.
  • tree-sitter-language-pack — tree-sitter grammars and code-intelligence primitives.
  • alef — the polyglot binding generator that produces every per-language binding across the 5 polyglot repos.

License

MIT License

Links