Metadata-Version: 2.4
Name: arachne-sdk
Version: 0.2.1
Summary: Python SDK for Arachne — Web Intelligence Platform: search, scrape, browser, vision, transcribe, RAG, and more
Author-email: Samuel Medeiros <dev@example.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/Samuelfmedeiros/arachne
Project-URL: Source, https://github.com/samuelmedeiros/arachne
Project-URL: Documentation, https://github.com/Samuelfmedeiros/arachne
Keywords: scraping,web-intelligence,crawler,rag,mcp
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27

# Arachne Python SDK

> **🔥 Firecrawl alternative — 100% open source, self-hosted, sem limites abusivos.**

**Web Intelligence Platform** — search, scrape, browser automation, vision, transcribe, RAG queries, and more. Tudo que Firecrawl, ScrapingBee e Apify fazem, num pacote só, rodando na sua máquina.

```bash
pip install arachne-sdk
```

```python
from arachne_sdk import Arachne

client = Arachne(api_key="arn_...")

# 🔍 Web search
results = client.search("preço iPhone 16 Brasil 2026")
for r in results:
    print(f"{r.title}: {r.url}")

# 📄 Scrape any URL → clean markdown
content = client.scrape("https://example.com")
print(content.markdown[:500])

# 🎯 Smart Router — fala em português, ela decide a ferramenta
result = client.do("busca e extrai o conteúdo do site da Amazon sobre iPhone")

# 🧠 RAG query (pergunta pra sua base de conhecimento)
answer = client.query("como funciona a RAG do Arachne?", kb_id=1)

# 🌐 Browser extraction (Cloudflare/CAPTCHA evasion)
data = client.browser_extract("https://site-com-cloudflare.com")

# 👁️ Image analysis (OCR + VLM)
vision = client.vision("https://example.com/foto.jpg")
print(vision.ocr_text)

# 🎤 Audio/video transcription (Whisper)
transcript = client.transcribe("https://youtube.com/watch?v=...")
```

## ✨ Features

| Feature | Arachne | Firecrawl | ScrapingBee |
|---------|---------|-----------|-------------|
| **Preço** | Free + R$49/mês | A partir de $79/mês | A partir de $49/mês |
| **Self-hosted** | ✅ Sim | ❌ | ❌ |
| **MCP Server** | ✅ 9 tools | ❌ | ❌ |
| **Browser evasão** | ✅ Camoufox + Playwright | ✅ | ✅ |
| **OCR/Vision** | ✅ Tesseract + VLM | ❌ | ❌ |
| **Transcrição áudio** | ✅ Whisper | ❌ | ❌ |
| **RAG + Chatbot** | ✅ FTS5 + Vector | ❌ | ❌ |
| **Python SDK** | ✅ pip install | ✅ | ✅ |
| **Export PDF/PPTX/Excel** | ✅ | ❌ | ❌ |
| **Conectores e-commerce** | ✅ 7 marketplaces | ❌ | ❌ |

## 🚀 Quick Examples

### Pricing Intelligence
```python
client.do("monitora preço do iPhone 16 na Amazon, Shopee e Mercado Livre")
```

### Content Monitoring
```python
result = client.extract("https://blog.concorrente.com")
# Auto-indexa no RAG, detecta mudanças automaticamente
```

### Multi-tool pipeline
```python
results = client.chain([
    {"tool": "arachne_search", "args": {"query": "iPhone 16 review"}},
    {"tool": "arachne_scrape", "args": {"url": "https://example.com/iphone"}},
], parallel=True)
```

## 📦 All Tools

| Tool | Description |
|------|-------------|
| `search` | Web search via DuckDuckGo |
| `scrape` | Clean markdown extraction |
| `extract` | Universal extract (web/audio/video/PDF/YouTube) |
| `browser_extract` | Full browser with Cloudflare evasion |
| `browser_run` | Browser actions (click, type, navigate) |
| `query` | RAG question answering |
| `vision` | Image analysis (OCR + colors + faces + VLM) |
| `transcribe` | Audio/video/YouTube transcription |
| `suggest` | Smart selector suggestion |
| `preview` | Selective extraction preview |
| `capabilities` | Auto-discover platform features |
| `health` | Platform status |
| `do` | Smart Router — natural language → tool |
| `chain` | Multi-tool pipeline (parallel or sequential) |

## 📊 Plans

| Plan | Price | Requests/mo | Features |
|------|-------|-------------|----------|
| **Free** | R$ 0 | 500 | search, scrape, jobs |
| **Pro** | R$ 49/mês | 10.000 | + browser, vision, transcribe, MCP |
| **Enterprise** | R$ 199/mês | 100.000 | + admin, export, dedicated support |

Get your API key at **[localhost:8000/dev](https://localhost:8000/dev)**

## 🔗 Links

- [Website](https://localhost:8000)
- [Developer Portal](https://localhost:8000/dev)
- [MCP Server (GitHub)](https://github.com/Samuelfmedeiros/arachne-mcp)
- [Documentation](https://localhost:8000/dev)

## License

MIT
