π¦
Bot Browser
Token-efficient web browser for LLM agents
0 installs
Trust: 34 β Low
Blockchain
Ask AI about Bot Browser
Powered by Claude Β· Grounded in docs
I know everything about Bot Browser. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
BotBrowser
Token-efficient web browser for LLM agents
A typical web page is 50,000+ tokens. The useful content? 2,000β5,000 tokens.
BotBrowser strips the bloat and gives your agents clean markdown β saving 90β95% of tokens.
Raw HTML: 52,000 tokens ββββββββββββββββββββββββββββββββββββββββββββββββββββ
BotBrowser: 3,200 tokens ββββββ
β 94% savings
Install
npm install botbrowser # JavaScript / TypeScript
pip install botbrowser # Python
No API key. No server. No config. Just install and extract.
Quick Start
// JavaScript / TypeScript
import { extract } from 'botbrowser';
const result = await extract('https://example.com/article');
console.log(result.content); // clean markdown
console.log(result.metadata.tokenSavingsPercent); // 94
# Python
from botbrowser import extract
result = extract("https://example.com/article")
print(result.content) # clean markdown
print(result.metadata.token_savings_percent) # 94
What You Get Back
{
"url": "https://example.com/article",
"title": "Article Title",
"description": "Meta description",
"content": "# Article Title\n\nClean markdown content...",
"textContent": "Plain text version...",
"links": [
{ "text": "Related Article", "href": "https://example.com/related" }
],
"metadata": {
"rawTokenEstimate": 52000,
"cleanTokenEstimate": 3200,
"tokenSavingsPercent": 94,
"wordCount": 1250,
"fetchedAt": "2026-02-26T10:30:00.000Z"
}
}
Why BotBrowser?
- Token-first β Built specifically to minimize LLM token usage. Every design decision optimizes for fewer tokens while preserving meaning.
- Dual native SDKs β Real implementations in both JS and Python, not thin wrappers. Use whichever fits your stack.
- Zero setup β
npm installorpip install. No API key, no account, no server to run. Works offline. - Battle-tested extraction β Mozilla Readability (JS) and Trafilatura (Python) β the same engines powering Firefox Reader View and academic web research.
- Open source β MIT licensed. Self-host, fork, embed, do what you want.
How It Works
URL β Fetch β Extract β Clean β Markdown
- Fetch β Smart HTTP with user-agent rotation, redirect handling, timeouts
- Extract β Identifies main content using Readability (JS) / Trafilatura (Python)
- Clean β Strips scripts, styles, ads, nav, footers, cookie banners, tracking, hidden elements
- Convert β Clean Markdown preserving headings, lists, links, tables, code blocks
Options
const result = await extract({
url: 'https://example.com',
format: 'text', // "markdown" (default) or "text"
timeout: 10000, // request timeout in ms (default: 15000)
includeLinks: false, // extract links (default: true)
});
result = extract(
"https://example.com",
format="text",
timeout=10000,
include_links=False,
)
REST API (Optional)
For language-agnostic access or shared infrastructure:
docker compose up
# or: cd js && pnpm install && pnpm build && pnpm dev
curl -X POST http://localhost:3000/extract \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com"}'
Python client for the REST API:
from botbrowser import BotBrowserClient
client = BotBrowserClient("http://localhost:3000")
result = client.extract("https://example.com")
Development
# JS
cd js && pnpm install && pnpm build && pnpm test
# Python
cd python && pip install -e ".[dev]" && pytest tests/ -v
License
MIT
