<div align="center">
<img src="https://github.com/mirasoth/tarzi/blob/4e751f8d389c0ac7f2061afa9286d2d7fa551aaf/static/tarzi-320.png" alt="Tarzi Logo" width="200" height="200">
</div>
<h1 align="center">tarzi</h1>
<p align="center">
<a href="https://crates.io/crates/tarzi">
<img src="https://img.shields.io/crates/v/tarzi.svg?style=flat-square" alt="Crate Version" />
</a>
<a href="https://pypi.org/project/tarzi/">
<img src="https://img.shields.io/pypi/v/tarzi.svg?style=flat-square" alt="PyPI Version" />
</a>
<!-- CI and Docs -->
<a href="https://github.com/mirasoth/tarzi/actions/workflows/rust-ci.yml">
<img src="https://github.com/mirasoth/tarzi/actions/workflows/rust-ci.yml/badge.svg" alt="Rust CI" />
</a>
<a href="https://github.com/mirasoth/tarzi/actions/workflows/python-ci.yml">
<img src="https://github.com/mirasoth/tarzi/actions/workflows/python-ci.yml/badge.svg" alt="Python CI" />
</a>
<a href="https://pypi.python.org/pypi/tarzi">
<img src="https://img.shields.io/pypi/pyversions/tarzi.svg" alt="PyV" />
</a>
</p>
<p align="center">
<!-- License -->
<a href="https://www.apache.org/licenses/LICENSE-2.0">
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square" alt="License" />
</a>
<!-- X (formerly Twitter) -->
<a href="https://x.com/mirasoth_ai">
<img src="https://img.shields.io/twitter/follow/mirasoth_ai?label=@mirasoth_ai&style=flat-square" alt="X Follow" />
</a>
</p>
> **โ ๏ธ Current Limitation**: Currently only search engines without anti-bot protection are workable, such as DuckDuckGo and Brave. We require advanced features to bypass anti-bot measures for other engines like Google and Bing.
๐ **Tarzi** is a unified search interface designed for **Retrieval-Augmented Generation (RAG)** and **agentic systems** built on large language models. Search is a core functionality in these systems, yet most search engine providers (SEPs) impose API paywalls or strict rate limits. **Tarzi**, empowered by browser automation and web crawling technologies, removes these barriers by supporting token-free queries across multiple search engines. With a single dependency, you can integrate and switch between different SEPs as neededโseamlessly and efficiently.
<div align="center">
<img src="static/tarzi-workflow.png" alt="Tarzi Logo" width="100%">
</div>
## โ๏ธ Core Capabilities
- ๐ฆ **Dual Implementation**: Native Rust library and Python wrapper with CLI tools
- ๐ **Content Conversion**: Convert raw HTML into Markdown, JSON, or YAML, which is ready for LLMs
- ๐ **Search Integration**: API โ plain HTTP โ headless browser cascade with a unified result format
- ๐ง **Multi-Engine Support**: Bing, Google, Google Serper, DuckDuckGo, Brave, Baidu, Sogou Weixin, Tavily, Google AI (Gemini), SearxNG
- ๐ก๏ธ **Proxy Support**: Bypass network bans using proxy support to access global SEPs
- ๐ **End-to-End Workflow**: Full pipeline from search to content extraction for AI and automation use cases
## ๐งช Advanced Features (Under dev.)
- ๐ต๏ธโโ๏ธ **Anti-Bot Evasion**: Use fingerprint spoofing, proxy rotation, and human-like actions to avoid detection
- ๐ง **Smarter Queries**: Improve search results with prompt rewriting and intent-aware queries
- ๐ **Workflow Automation**: Chain steps like search, click, form fill, and scraping into automated flows
## Install
```
pip install tarzi
```
## CLI Commands
Tarzi provides two command-line interfaces:
- **`tarzi`**: Native Rust CLI (faster, more efficient)
- **`pytarzi`**: Python CLI (easier to extend, same functionality)
Both CLIs support the same commands and configuration precedence.
## Usage Examples
* Examples in Python and Rust: [examples](/examples/)
* Search cascade demo: `cargo run --example search_cascade` / `python examples/search_cascade.py`
* Serper (Google API): set `SERPER_API_KEY`, then `cargo run --example search_engine_serper`
### Search configuration
**Breaking change:** `tarzi.toml` / `~/.tarzi.toml` are removed. Configure with env vars (see [.env.example](.env.example)):
```bash
export TARZI_SEARCH_ENGINE=duckduckgo,bing,brave # default; or single engine / other ordered list
export TARZI_SEARCH_BROWSER=true # false disables browser fallback (default true)
# Engine API keys (tarzi has no product API key):
export BRAVE_API_KEY=... # or SERPER_API_KEY for google_serper
```
Access cascade (always): **API** (if credentials present) โ **plain HTTP** โ **browser** (if enabled).
API-only engines without keys are skipped before any network call. `google` is web-only; Google API results use `google_serper` (alias `serper`).
## Alternatives
* LangChain [PlayWrightBrowserToolkit](https://python.langchain.com/docs/integrations/tools/playwright/)
## Contributors
Thank you โค all human and non-human contributors.
[](https://github.com/mirasoth/tarzi/graphs/contributors)