Expand description
§Phrona
A high-performance metasearch engine library: it runs many search providers concurrently with per-provider browser impersonation, then merges, deduplicates and ranks the results by cross-engine agreement.
§Quick start
use phrona::{SearchOptions, search};
let opts = SearchOptions::new("rust async runtime");
let resp = search(opts).await?;
for r in resp.web() {
println!("{:>3}. {} - {}", r.position, r.title, r.url);
}§What it offers
- Multi-engine search over 29 providers across 8 categories (web,
images, news, videos, books, code, papers, archives):
search(),SearchClient. - Browser impersonation (TLS + HTTP/2 fingerprints and matching
User-Agents), per profile and proxy:
Profile,HttpClient. - Merging, deduplication and ranking:
dedup,rank. - Structured errors you can branch on:
Error,error. - Page extraction for AI grounding with SSRF guards:
extract(). - Autocomplete suggestions:
suggest,suggest_all. - Typed configuration from YAML + environment:
PhronaConfig,config.
§Resources
- Repository — the crate README is the full user guide.
docs/— architecture, engines, CLI, REST API and library references.- The
phrona-clicrate ships a full command line,phrona-apithe REST- MCP server, and
phrona-pythonthe Python bindings.
- MCP server, and
Re-exports§
pub use client::HttpClient;pub use client::HttpClientBuilder;pub use client::Profile;pub use client::TargetPolicy;pub use config::ConfigError;pub use config::PhronaConfig;pub use error::Error;pub use error::Result;pub use extract::ExtractedPage;pub use extract::extract;pub use extract::extract_from_html;pub use extract::extract_many;pub use extract::is_safe_ip;pub use options::SearchOptions;pub use search::EngineObserver;pub use search::NoopEngineObserver;pub use search::SearchClient;pub use search::available_engines;pub use search::search;pub use search::search_sync;pub use engines::suggest::SuggestSource;pub use engines::suggest::suggest;pub use engines::suggest::suggest_all;pub use engine::Engine;pub use engine::EngineContext;pub use models::*;
Modules§
- bootstrap
- Session bootstrap for engines that only return full results after a real-browser visit (google, anna’s archive; qwant accepts an operator-provided cookie and never triggers this itself).
- client
- HTTP client with browser impersonation, proxy pool and SSRF guards.
- config
- Typed YAML configuration for Phrona and its surfaces (CLI, REST API, MCP).
- crypto
- Minimal HMAC-SHA-256 / PBKDF2-HMAC-SHA-256 (used by the ALTCHA
proof-of-work solver in
engines/altcha). Standard definitions; verified against RFC-distributed test vectors in the tests below. - dedup
- Cross-engine result deduplication and grouping.
- engine
- Engine trait, registry and per-search shared state.
- engines
- Concrete search engines and their parsers.
- error
- Structured errors with scope and kind classification.
- extract
- Readable page extraction for AI grounding.
- models
- Response models: categories, typed results, engine reports.
- options
- Search parameters shared by every engine.
- parse
- HTML/URL/text parsing helpers for engine responses.
- rank
- Cross-engine ranking and scoring.
- search
- Orchestration: concurrent engines, merge, suggestions.
Constants§
- VERSION
- The crate version, read from
CARGO_PKG_VERSION.
Functions§
- version
- The crate version as a string.