Xberg

crawlberg

Built with alefRustPythonNode.jsWASMJavaGoC#PHPRubyElixirDartKotlinSwiftZigC FFIDockerLicenseDocumentation
Join Discord

Elixir bindings for crawlberg — a high-performance Rust web crawling engine. Uses Rustler NIFs for native BEAM integration with OTP-compatible error tuples and ResourceArc handles.

What This Package Provides

Installation

def deps do
[{:crawlberg, "~> 1.0.5"}]
end

Agent plugin

The crawlberg plugin is available via the xberg-io/plugins marketplace.

/plugin marketplace add xberg-io/plugins
/plugin install crawlberg@xberg

Works with Claude Code, Codex, Cursor, Gemini CLI, Factory Droid, GitHub Copilot CLI, and opencode. See the marketplace README for harness-specific install instructions.

Quick Start

# Simplest case: scrape a single page with default settings.
{:ok, engine} = Crawlberg.create_engine()
{:ok, scrape_json} = Crawlberg.scrape_async(engine, "https://example.com/")
scrape = Jason.decode!(scrape_json)
IO.puts("Title: #{scrape["metadata"]["title"]}")
IO.puts("Status: #{scrape["status_code"]}")
IO.puts("Links found: #{length(scrape["links"] || [])}")
# Crawl from a seed URL, limited to one hop and a handful of pages.
config_json = Jason.encode!(%Crawlberg.CrawlConfig{max_depth: 1, max_pages: 5})
{:ok, crawl_engine} = Crawlberg.create_engine(config_json)
{:ok, crawl_json} =
Crawlberg.crawl_async(crawl_engine, "https://en.wikipedia.org/wiki/Web_scraping")
crawl = Jason.decode!(crawl_json)
IO.puts("Pages crawled: #{length(crawl["pages"] || [])}")

API Reference

Full API documentation is available at docs.crawlberg.xberg.io.

Key functions:

Contributing

Contributions are welcome! Please see our Contributing Guide for details.

Part of Xberg.dev

License

This project is licensed under MIT License.