A local retrieval index built from the live web. SpecStream, the live web data engine, searches and reads the pages; one SQLite file keeps them as chunks with their URL, title, published date and read time, and ranks them with full text search (FTS5, BM25) and, when you add sqlite-vec, with vectors too. No server, no vector database, no framework: one Python file, standard library only for full text.
| Step | What runs | Price |
|---|---|---|
ingest "<topic>" |
GET /v1/web-search?speed=fast, then POST /v1/extract on the results, 20 pages a call |
$1 per 1,000 searches, $0.80 per 1,000 pages |
add <urls> |
POST /v1/extract |
$0.80 per 1,000 pages |
ask "<question>" |
SQLite only: BM25, fused with vector distance when vectors are on | free |
refresh --days 7 |
reads again every page older than 7 days | $0.80 per 1,000 pages |
So indexing the top 10 pages on a topic costs at most $0.009, and a thousand pages $0.80.
git clone https://github.com/specstream/sqlite-vec-rag-specstream-starter
cd sqlite-vec-rag-specstream-starter
export SPECSTREAM_API_KEY=your_key # Agents & API at specstream.ai/workspace; $2 free credit, no card
python rag.py ingest "vector database benchmarks 2026" --pages 10
python rag.py add https://www.sqlite.org/fts5.html https://alexgarcia.xyz/sqlite-vec/
python rag.py ask "which vector database is fastest at 10M rows?"
python rag.py statsingest prints how many results it found, how many pages it read and indexed, and the most it cost. ask prints each chunk as [n] title, published date, its URL, and the first 300 characters of its text.
A page that refuses the read or holds no text is left out; the rest keep the date the page states and the time SpecStream read it, so an answer can say how fresh it is.
pip install sqlite-vec # Python whose sqlite3 can load extensions
export EMBED_BASE_URL=http://localhost:11434/v1 # any OpenAI compatible /embeddings: Ollama, vLLM, LM Studio, OpenAI
export EMBED_MODEL=nomic-embed-text
python rag.py --db rag-vec.sqlite ingest "vector database benchmarks 2026"
python rag.py --db rag-vec.sqlite ask "managed vector search price per GB"Each chunk gets its vector in a vec0 table, and ask fuses the BM25 and vector rankings by reciprocal rank. A page read again replaces its chunks and their vectors.
from rag import Index, web_search, extract
index = Index("rag.sqlite")
sources = web_search("EU AI Act general purpose AI obligations", num=10)
index.store(extract([s["url"] for s in sources if s.get("url")]))
for hit in index.search("when do the obligations apply?", k=5):
print(hit["url"], hit["published"], hit["text"][:200])Hand hit["text"] with its URL to any model as numbered sources. For a ready answer step on any model, see perplexity-rag-grounding-specstream.
python -m unittest discover -s tests -v # offline: a local fake plays SpecStream and the embeddings endpoint
pip install sqlite-vec && python -m unittest discover -s tests -v # adds the vector tests
python tests/live_check.py # live and free: both SpecStream routes answer and ask for a keyAll tests pass on Python 3.9 with sqlite-vec 0.1.9.
- Extract API: specstream.ai/extract-api
- Search API: specstream.ai/search-api, first on WideSearch and 99 on SimpleQA Verified (benchmarks)
- Prices: specstream.ai/pricing, and the Monthly Pro Pass at $49 a month: 5,000 ready list rows a month and $49 of API credit
- Side by side: SerpApi alternative, Exa alternative, Tavily alternative, Firecrawl alternative
- Open samples with DOIs: SpecStream tools and Open Web Authority 100K
- API reference, quickstarts and the MCP server: specstream.ai/docs
- Every request ready to run in Postman: SpecStream API collection
- Ready datasets searched in plain words: dataset finder
- Current offers: specstream.ai/deals
- Monthly plans: Starter $49, Growth $199 and Scale $499, each fee paid back as API credit; Enterprise from $2,500 a month. Every new account starts with $2 of credit, no card: specstream.ai/pricing
MIT