LLM-Free Q&A v0.15
Ask a question about any webpage and get the most relevant passage back — instantly, with no LLM API key. Uses BM25 relevance scoring under the hood: fast, deterministic, and completely free.
What It Does
WebPeel fetches a page, splits it into sentences, scores each sentence against your question using BM25 (the same algorithm powering search engines like Elasticsearch), and returns the top passage with a confidence score. No OpenAI key. No Anthropic key. Zero cost per query.
- ✅ No LLM API key required
- ✅ Instant — no round-trip to an LLM provider
- ✅ Completely free, unlimited use
- ✅ Deterministic — same question always returns the same answer
- ✅ Confidence score so you know how relevant the result is
CLI
# Short flag
npx webpeel "https://example.com/pricing" -q "what does the pro plan cost?"
# Long flag
npx webpeel "https://example.com/pricing" --question "what does the pro plan cost?"
# JSON output (includes confidence score)
npx webpeel "https://example.com/pricing" -q "what does the pro plan cost?" --json
# Works with any URL — news articles, docs, product pages
npx webpeel "https://en.wikipedia.org/wiki/BM25" -q "who invented BM25?"
API
# Basic quick answer
GET /v1/answer/quick?url=https://example.com/pricing&question=what+does+the+pro+plan+cost
# With curl
curl "https://api.webpeel.dev/v1/answer/quick?url=https://example.com/pricing&question=what+does+the+pro+plan+cost" \
-H "Authorization: Bearer YOUR_API_KEY"
Query Parameters
| Parameter | Type | Description |
|---|---|---|
url |
string (required) | Page URL to query |
question |
string (required) | Natural language question |
MCP
Use the webpeel_quick_answer tool in Claude, Cursor, or any MCP client:
{
"tool": "webpeel_quick_answer",
"arguments": {
"url": "https://example.com/pricing",
"question": "what does the pro plan cost?"
}
}
How It Works
Quick Answer uses a lightweight, purely local pipeline — no external AI calls:
- Fetch & extract — WebPeel fetches the page and strips noise (nav, ads, footers)
- Sentence splitting — Content is split into individual sentences using punctuation and whitespace heuristics
- Question-type detection — Detects whether the question is a "what", "how much", "who", "when", etc. to apply appropriate boost signals
- BM25 scoring — Each sentence is ranked against the question using BM25 term frequency–inverse document frequency
- Boost signals — Sentences near headings, in tables, or containing numbers get score boosts for price/quantity questions
- Top passage selection — The top-scoring sentence(s) are merged into a coherent passage and returned with a confidence score
Example
Querying a SaaS pricing page:
npx webpeel "https://example.com/pricing" -q "what does the pro plan cost?" --json
{
"url": "https://example.com/pricing",
"question": "what does the pro plan cost?",
"answer": "The Pro plan costs $49/month and includes unlimited API calls, 5 team seats, and priority support.",
"confidence": 0.87,
"source": {
"text": "The Pro plan costs $49/month and includes unlimited API calls, 5 team seats, and priority support.",
"context": "Pricing — Pro",
"score": 12.4
}
}
SDK Usage
import { quickAnswer } from 'webpeel';
const result = await quickAnswer(
'https://example.com/pricing',
'what does the pro plan cost?'
);
console.log(result.answer); // "The Pro plan costs $49/month..."
console.log(result.confidence); // 0.87
from webpeel import WebPeel
client = WebPeel()
result = client.quick_answer(
"https://example.com/pricing",
"what does the pro plan cost?"
)
print(result.answer) # "The Pro plan costs $49/month..."
print(result.confidence) # 0.87
quick_answer vs answer
WebPeel has two answer endpoints. Choose the right one for your use case:
quick_answer |
answer |
|
|---|---|---|
| LLM required | ❌ No | ✅ Yes (BYOK) |
| Cost | Free | LLM tokens |
| Speed | ~200ms | 2–10s |
| Answer quality | Good (extractive) | Better (generative) |
| Synthesises multiple sources | ❌ | ✅ |
| Best for | Fact lookup, pricing, dates, specs | Complex questions, summaries, comparisons |
💡 When to use quick_answer
Use
Use
quick_answer when you need to pull a specific fact from a page (price, date, name, spec) and speed or cost matters. Use answer when the question requires reasoning across multiple sentences or you want a polished, written response.