Publish 5 Dec 1 2026 technical & empirical papers and wiki-vector-bench
Browse filesFiles changed (10)
- README.mdAdded+35
- artifacts/wiki-vector-bench/MakefileAdded+10
- artifacts/wiki-vector-bench/README.mdAdded+25
- artifacts/wiki-vector-bench/bench.pyAdded+109
- artifacts/wiki-vector-bench/hamming_rescore.cAdded+156
- papers/01-eu-sovereign-6-7b-web-index-12-nvme-nodes.mdAdded+108
- papers/02-non-autoregressive-web-search-15-benchmarks.mdAdded+103
- papers/03-millisecond-semantic-retrieval-47m-wikipedia-6gb-ram.mdAdded+105
- papers/04-google-custom-search-json-api-retirement-2027-migration-benchmark.mdAdded+144
- papers/05-state-of-saas-ai-infrastructure-2026-subprocessor-report.mdAdded+134
1234567891011121314151617181920212223242526272829303132333435---license: cc-by-4.0task_categories: - text-retrieval - question-answeringtags: - web-search - benchmarks - vector-search - subprocessors - infrastructure---
# SpecStream Web Infrastructure & Empirical Research Papers (December 2026)
Five technical and empirical papers published by SpecStream (https://specstream.ai), alongside standalone benchmark code and reproducible evaluation links.
## Papers
1. **How we run a 6.7-billion-page, EU-sovereign web index on 12 local-NVMe nodes** (`papers/01-eu-sovereign-6-7b-web-index-12-nvme-nodes.md`) Canonical URL: https://specstream.ai/blog/eu-sovereign-6-7b-web-index-12-nvme-nodes2. **Non-autoregressive web search: why decision models beat LLM wrappers across 15 public benchmarks** (`papers/02-non-autoregressive-web-search-15-benchmarks.md`) Canonical URL: https://specstream.ai/blog/non-autoregressive-web-search-15-benchmarks3. **Millisecond semantic retrieval over 47 million Wikipedia paragraphs in 6 GB of RAM** (`papers/03-millisecond-semantic-retrieval-47m-wikipedia-6gb-ram.md`) Canonical URL: https://specstream.ai/blog/millisecond-semantic-retrieval-47m-wikipedia-6gb-ram Standalone C + Python benchmark: `artifacts/wiki-vector-bench/` and https://github.com/Specstreamai/wiki-binary-int8-bench4. **Google Custom Search JSON API retires Jan 1, 2027: drop-in /customsearch/v1 migration and benchmark report** (`papers/04-google-custom-search-json-api-retirement-2027-migration-benchmark.md`) Canonical URL: https://specstream.ai/blog/google-custom-search-json-api-retirement-2027-migration-benchmark5. **State of SaaS AI infrastructure 2026: Anthropic leads OpenAI (1,942 vs 1,832) across 6,807 trust centers** (`papers/05-state-of-saas-ai-infrastructure-2026-subprocessor-report.md`) Canonical URL: https://specstream.ai/blog/state-of-saas-ai-infrastructure-2026-subprocessor-report
## Raw benchmark traces & datasets
- All 15 public web-search and extraction benchmark raw traces: https://huggingface.co/datasets/SpecStreamAI/benchmark-results- SaaS AI Subprocessors open dataset (6,807 trust centers, 74,008 edges): https://github.com/Specstreamai/saas-ai-subprocessors-202612345678910CC ?= gccCFLAGS = -O3 -march=native -fopenmp -shared -fPIC -Wall -Wextra
all: libhamming_rescore.so
libhamming_rescore.so: hamming_rescore.c $(CC) $(CFLAGS) -o $@ $< -lm
clean: rm -f libhamming_rescore.so12345678910111213141516171819202122232425# Binary Hamming + Int8 Rescore Vector Retrieval Benchmark
Clean, standalone C + Python reproduction benchmark accompanying SpecStream's engineering paper:**"Millisecond semantic retrieval over 47 million Wikipedia paragraphs in 6 GB of RAM"**Canonical paper: https://specstream.ai/blog/millisecond-semantic-retrieval-47m-wikipedia-6gb-ram
## What this benchmark demonstrates
At 47,018,430 paragraphs x 1,024 dimensions (`BAAI/bge-m3`, from `Upstash/wikipedia-2024-06-bge-m3`):- Raw `float32`: 192.59 GB (179.36 GiB)- Stage 1 binary sign bits (`128 B/vec`, 16 x `uint64_t` little-endian): **6.018 GB (5.605 GiB)**, 32x RAM compression, `mlock()` pinned in RAM- Stage 2 scalar `int8` (`1,024 B/vec`, `clip(round(v * 127), -127, 127)`): **48.147 GB (44.840 GiB)**, `mmap()` on local NVMe, read only for the top `cand` Hamming candidates (default 3,000 = 3.07 MB read per query)
## Build and run
```bashmakepython3 bench.py --n 1000000 --dim 1024 --cand 3000 --k 10 --queries 20```
Set `--n` to match available RAM (1,000,000 vectors = 128 MB binary + 1 GB int8; 10,000,000 vectors = 1.28 GB binary + 10 GB int8).
## License
MIT123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109#!/usr/bin/env python3"""Reproducible benchmark for two-stage 1024-dim binary Hamming + int8 rescore retrieval."""
from __future__ import annotations
import argparseimport ctypesimport timefrom pathlib import Path
import numpy as np
def pack_binary(vecs: np.ndarray) -> np.ndarray: bits = np.packbits(vecs > 0, axis=-1, bitorder="little") return np.ascontiguousarray(bits).view(np.uint64)
def quantize_i8(vecs: np.ndarray) -> np.ndarray: return np.ascontiguousarray(np.clip(np.round(vecs * 127.0), -127, 127).astype(np.int8))
def main() -> None: ap = argparse.ArgumentParser() ap.add_argument("--n", type=int, default=200_000, help="Corpus vectors (1024-dim)") ap.add_argument("--dim", type=int, default=1024) ap.add_argument("--cand", type=int, default=3000) ap.add_argument("--k", type=int, default=10) ap.add_argument("--queries", type=int, default=20) ap.add_argument("--seed", type=int, default=42) args = ap.parse_args() assert args.dim == 1024, "Kernel specializes 1024 dimensions (16 x uint64 words)."
lib_path = Path(__file__).resolve().parent / "libhamming_rescore.so" lib = ctypes.CDLL(str(lib_path)) lib.scan_hamming_top_k.argtypes = [ ctypes.POINTER(ctypes.c_uint64), ctypes.c_uint32, ctypes.POINTER(ctypes.c_uint64), ctypes.c_int, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32), ] lib.scan_hamming_top_k.restype = ctypes.c_int lib.rescore_int8.argtypes = [ ctypes.POINTER(ctypes.c_int8), ctypes.c_int, ctypes.POINTER(ctypes.c_float), ctypes.POINTER(ctypes.c_uint32), ctypes.c_int, ctypes.POINTER(ctypes.c_float), ]
rng = np.random.default_rng(args.seed) print(f"Generating {args.n:,} unit-normalized {args.dim}-dim vectors...") db_f32 = rng.standard_normal((args.n, args.dim), dtype=np.float32) db_f32 /= np.linalg.norm(db_f32, axis=1, keepdims=True) db_bin = pack_binary(db_f32) db_i8 = quantize_i8(db_f32)
q_f32 = rng.standard_normal((args.queries, args.dim), dtype=np.float32) # Mix real corpus neighbors + noise so top-k recall is meaningful on synthetic unit sphere for qi in range(args.queries): q_f32[qi] = 0.65 * db_f32[qi * (args.n // args.queries)] + 0.35 * q_f32[qi] q_f32 /= np.linalg.norm(q_f32, axis=1, keepdims=True) q_bin = pack_binary(q_f32)
out_ids = np.empty(args.cand, dtype=np.uint32) out_dists = np.empty(args.cand, dtype=np.uint32) out_scores = np.empty(args.cand, dtype=np.float32)
scan_ms, rescore_ms, recalls = [], [], [] for qi in range(args.queries): t0 = time.perf_counter() got = lib.scan_hamming_top_k( db_bin.ctypes.data_as(ctypes.POINTER(ctypes.c_uint64)), args.n, q_bin[qi].ctypes.data_as(ctypes.POINTER(ctypes.c_uint64)), args.cand, out_ids.ctypes.data_as(ctypes.POINTER(ctypes.c_uint32)), out_dists.ctypes.data_as(ctypes.POINTER(ctypes.c_uint32)), ) t1 = time.perf_counter() lib.rescore_int8( db_i8.ctypes.data_as(ctypes.POINTER(ctypes.c_int8)), args.dim, q_f32[qi].ctypes.data_as(ctypes.POINTER(ctypes.c_float)), out_ids.ctypes.data_as(ctypes.POINTER(ctypes.c_uint32)), got, out_scores.ctypes.data_as(ctypes.POINTER(ctypes.c_float)), ) t2 = time.perf_counter() scan_ms.append((t1 - t0) * 1000.0) rescore_ms.append((t2 - t1) * 1000.0)
top_pred = set(out_ids[np.argsort(-out_scores[:got])[: args.k]].tolist()) exact = db_f32 @ q_f32[qi] top_true = set(np.argpartition(-exact, args.k)[: args.k].tolist()) recalls.append(len(top_pred & top_true) / args.k)
print(f"Binary RAM: {db_bin.nbytes / 1e6:.1f} MB | Int8 size: {db_i8.nbytes / 1e6:.1f} MB") print(f"Extrapolated to 47,018,430 vecs: {47_018_430 * 128 / 1e9:.3f} GB RAM (binary) | {47_018_430 * 1024 / 1e9:.3f} GB NVMe (int8)") print(f"Hamming scan p50: {np.median(scan_ms):.2f} ms (p95: {np.percentile(scan_ms, 95):.2f} ms)") print(f"Int8 rescore p50: {np.median(rescore_ms):.2f} ms (p95: {np.percentile(rescore_ms, 95):.2f} ms)") print(f"Recall@{args.k} vs exact float32: {np.mean(recalls) * 100:.1f}%")
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156/* * Standalone two-stage binary Hamming scan + int8 cosine rescore benchmark kernel. * Companion artifact to SpecStream's engineering paper: * "Millisecond semantic retrieval over 47 million Wikipedia paragraphs in 6 GB of RAM" * https://specstream.ai/blog/millisecond-semantic-retrieval-47m-wikipedia-6gb-ram * * License: MIT */
#include <stdint.h>#include <stdlib.h>#include <string.h>#include <omp.h>
#if defined(__AVX512F__) && defined(__AVX512VPOPCNTDQ__)#include <immintrin.h>#define HAVE_AVX512_POPCNT 1#else#define HAVE_AVX512_POPCNT 0#endif
static inline uint32_t hamming_1024(const uint64_t *a, const uint64_t *b) {#if HAVE_AVX512_POPCNT __m512i x0 = _mm512_xor_si512(_mm512_loadu_si512((const void *)a), _mm512_loadu_si512((const void *)b)); __m512i x1 = _mm512_xor_si512(_mm512_loadu_si512((const void *)(a + 8)), _mm512_loadu_si512((const void *)(b + 8))); __m512i p = _mm512_add_epi64(_mm512_popcnt_epi64(x0), _mm512_popcnt_epi64(x1)); return (uint32_t)_mm512_reduce_add_epi64(p);#else uint32_t d = 0; for (int w = 0; w < 16; w++) { d += (uint32_t)__builtin_popcountll(a[w] ^ b[w]); } return d;#endif}
static inline void heap_sift_down(uint64_t *h, int n, int i) { uint64_t v = h[i]; for (;;) { int l = (i << 1) + 1; if (l >= n) break; int r = l + 1; int big = (r < n && h[r] > h[l]) ? r : l; if (h[big] <= v) break; h[i] = h[big]; i = big; } h[i] = v;}
static int cmp_u64(const void *a, const void *b) { uint64_t x = *(const uint64_t *)a; uint64_t y = *(const uint64_t *)b; return (x > y) - (x < y);}
/* * Exact top-cand binary Hamming scan across n 1024-bit vectors (16 uint64 words each). * Deterministic tie-breaking via (distance << 32) | row_id. */int scan_hamming_top_k( const uint64_t *bin_db, uint32_t n, const uint64_t *query_bin, int cand, uint32_t *out_ids, uint32_t *out_dists) { if (cand <= 0 || n == 0) return 0; if ((uint32_t)cand > n) cand = (int)n;
int max_threads = omp_get_max_threads(); uint64_t *all_heaps = (uint64_t *)malloc((size_t)max_threads * (size_t)cand * sizeof(uint64_t)); int *counts = (int *)calloc((size_t)max_threads, sizeof(int)); if (!all_heaps || !counts) { free(all_heaps); free(counts); return -1; }
#pragma omp parallel { int tid = omp_get_thread_num(); uint64_t *heap = all_heaps + (size_t)tid * (size_t)cand; int sz = 0;
#pragma omp for schedule(static) for (uint32_t i = 0; i < n; i++) { uint32_t dist = hamming_1024(bin_db + (size_t)i * 16, query_bin); uint64_t key = ((uint64_t)dist << 32) | (uint64_t)i; if (sz < cand) { heap[sz] = key; int c = sz++; while (c > 0) { int p = (c - 1) >> 1; if (heap[p] >= heap[c]) break; uint64_t tmp = heap[p]; heap[p] = heap[c]; heap[c] = tmp; c = p; } } else if (key < heap[0]) { heap[0] = key; heap_sift_down(heap, cand, 0); } } counts[tid] = sz; }
size_t total = 0; for (int t = 0; t < max_threads; t++) total += (size_t)counts[t]; uint64_t *merged = (uint64_t *)malloc(total * sizeof(uint64_t)); size_t pos = 0; for (int t = 0; t < max_threads; t++) { if (counts[t] > 0) { memcpy(merged + pos, all_heaps + (size_t)t * (size_t)cand, (size_t)counts[t] * sizeof(uint64_t)); pos += (size_t)counts[t]; } } qsort(merged, total, sizeof(uint64_t), cmp_u64);
int out_n = (total < (size_t)cand) ? (int)total : cand; for (int i = 0; i < out_n; i++) { out_ids[i] = (uint32_t)(merged[i] & 0xFFFFFFFFULL); out_dists[i] = (uint32_t)(merged[i] >> 32); }
free(merged); free(all_heaps); free(counts); return out_n;}
/* * Stage 2: float32 query dot-product rescore against int8 quantized candidates. */void rescore_int8( const int8_t *i8_db, int dim, const float *query_f32, const uint32_t *cand_ids, int cand_n, float *out_scores) { const float inv_scale = 1.0f / 127.0f; for (int c = 0; c < cand_n; c++) { const int8_t *row = i8_db + (size_t)cand_ids[c] * (size_t)dim; float acc = 0.0f; for (int d = 0; d < dim; d++) { acc += query_f32[d] * (float)row[d]; } out_scores[c] = acc * inv_scale; }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108---title: "How we run a 6.7-billion-page, EU-sovereign web index on 12 local-NVMe nodes"description: "Architecture, storage layout, bounded-time search mechanics, and monthly economics of SpecStream's 6.76-billion-page web index running on 12 local-NVMe nodes in Frankfurt for EUR 862.86 per month."date: 2026-12-01author: Tarekcategory: Engineeringcover: "6.76 billion pages, <em>on 12 local-NVMe nodes.</em>"tags: web index, search architecture, NVMe, Lucene, EU sovereignty, infrastructure---
SpecStream operates a live web index of 6,767,212,601 pages across 17 language-family partitions and 80 segments, plus 435,223,639 site contact records and 432,842,112 page vector entries. The entire index runs inside Frankfurt, Germany (IONOS Cloud `de/fra`), on 12 direct-attached local-NVMe nodes connected over a private VPC network with zero extra public IPv4 addresses. Total compute and storage cost for all 12 index nodes is EUR 862.86 per month, or EUR 946.08 per month including the front-end product node (EUR 31.12 per day).
Most web search APIs choose between two failure modes. A provider with no index of its own waits on external search engines for every query and inherits their rate limits, latency spikes, and jurisdiction boundaries. A provider that builds an index on hyperscaler network-attached block storage pays tens of thousands of dollars per month for provisioned IOPS and still stalls on cold posting-list reads.
We designed our index around a different premise: direct-attached local NVMe in Frankfurt, rank-ordered immutable segments, bounded-time segment walks, and compact in-memory auxiliary structures that eliminate unnecessary disk reads before they reach the drive.
## Why network-attached storage broke cold search
Before moving to 12 local-NVMe nodes, we traced kernel page faults on a monolithic network-attached block volume holding 6.67 billion pages. Under an 8-caller cold query workload, the network volume saturated at 35,000 to 40,000 reads per second (11 to 12 KB per read). A single never-asked query at a 3-second budget read 532 MiB on average (267 MiB median): 65% in posting lists, 14% in candidate doc values, 12% in anchor lists, and 5% in length tables. Common-word queries such as book and film titles read 1.3 to 1.8 GiB of posting lists per query.
Two system bottlenecks amplified every cold read:
1. **OS readahead amplification.** Default cloud volume readahead (8 MB) caused single cold queries to pull 35 to 530 MB of adjacent unused blocks. Lowering volume readahead to 16 KB cut read amplification dramatically while preserving sequential block throughput.2. **Unbounded bulk-scorer time checks.** Standard Lucene time-limiting bulk scorers start with a small slice between clock checks and grow that slice exponentially with no upper bound. On a cold disk, the final slice could span a third of a segment, causing queries to overrun a 300 ms deadline by seconds and return zero results.
Splitting the index across 12 local-NVMe cubes solves the IOPS ceiling at the hardware layer (each local NVMe drive sustains hundreds of thousands of random IOPS with no network hop), and our search engine fixes the read path in software.
## Hardware topology and monthly unit economics
Every node runs inside `de/fra` (Frankfurt, Germany) under EU jurisdiction, connected over a private layer-2 LAN. Only the API gateway exposes a public interface; all 12 index nodes sit strictly on the private network.
| Node group | Count | Specs per node | Monthly unit cost | Subtotal || --- | --- | --- | --- | --- || High-memory index cubes | 6 | 16 vCPU, 64 GB RAM, 960 GB local NVMe | EUR 83.22 | EUR 499.32 || Standard index cubes | 6 | 16 vCPU, 32 GB RAM, 960 GB local NVMe | EUR 60.59 | EUR 363.54 || **Index cluster total** | **12** | **192 vCPU, 576 GB RAM, 11.52 TB NVMe** | | **EUR 862.86** || Production API node | 1 | 16 vCPU, 64 GB RAM, 960 GB local NVMe | EUR 83.22 | EUR 83.22 || **Full production cluster** | **13** | **208 vCPU, 640 GB RAM, 12.48 TB NVMe** | | **EUR 946.08** |
Active payload across the 12 index nodes totals 9,027 GB (9.03 TB), leaving headroom on every 960 GB local NVMe drive (the fullest node holds 818 GB) for daily incremental merges, temporary sort buffers, and Bloom filter builds.
## Partitioning 6.76 billion pages across 12 cubes
Instead of hash-sharding every document blindly across all machines, we partition by language family and workload type. That lets the query router prune irrelevant nodes on language-scoped requests and keeps specialized workloads (link graph traversal, structured item search, site contact lookups, and semantic vector scans) isolated from full-text posting-list I/O.
| Cube role | Hardware tier | Payload (GB) | Indexed pages | Shards and datasets | Key filters || --- | --- | --- | --- | --- | --- || English primary 1 | 64 GB / 960 GB NVMe | 793 | 1,139,825,519 | `eng-4` (1.02B), `nld-1` (114.9M) | 11 / 11 || English primary 2 | 64 GB / 960 GB NVMe | 803 | 952,569,323 | `eng-5` (711.9M), `pol-1` (118.8M), `por-1` (121.8M) | 13 / 13 || English primary 3 | 64 GB / 960 GB NVMe | 806 | 906,081,615 | `eng-1` (359.8M), `eng-2` (229.6M), `eng-3` (316.8M) | 12 / 12 || Chinese shard | 32 GB / 960 GB NVMe | 789 | 551,792,876 | `zho-1` (551.8M) | 9 / 9 || Multilingual 1 | 32 GB / 960 GB NVMe | 783 | 962,543,139 | `oth-1` (962.5M) | 9 / 9 || European and Japanese | 32 GB / 960 GB NVMe | 818 | 928,517,345 | `deu-1` (467.6M), `ita-1` (163.7M), `jpn-1` (297.2M) | 11 / 11 || European and Russian | 32 GB / 960 GB NVMe | 803 | 994,256,668 | `fra-1` (335.2M), `rus-1` (317.0M), `spa-1` (342.0M) | 12 / 12 || Structured items | 32 GB / 960 GB NVMe | 788 | 0 | 16 structured item shards (JSON-LD, microdata, OpenGraph) | n/a || Anchor graph 1 | 64 GB / 960 GB NVMe | 727 | 0 | Inbound anchor partitions (727.2 GB) | n/a || Anchor graph 2 | 64 GB / 960 GB NVMe | 726 | 0 | Inbound anchor partitions (726.2 GB) | n/a || Auxiliary and vectors 1 | 64 GB / 960 GB NVMe | 677 | 331,626,116 | `oth-2` (331.6M), 435.2M site records, 432.8M page vectors, 47M Wikipedia vectors | 3 / 3 || Auxiliary and link graph 2 | 32 GB / 960 GB NVMe | 514 | 0 | Site link graph, pair words, outbound edges, host authority table | n/a || **Total** | **12 cubes** | **9,027** | **6,767,212,601** | **17 text parts, 80 segments** | **80 / 80** |
All 80 text segments across the 17 parts maintain an active, file-mapped key Bloom filter (`80 / 80` ready as of December 1, 2026).
## Four software mechanisms that keep tail latency bounded
Local NVMe gives us hardware IOPS, but four architectural choices in the search service keep median latency in the tens of milliseconds and stop cold queries from timing out empty.
### 1. Static rank ordering inside every segment
Every Lucene 10 segment is written in descending static-rank order before it is sealed. Static rank combines host authority from the web link graph (computed via HyperBall harmonic centrality and stored in compact 10-byte hash-ordered records so 300 million sites fit in 3 GB of page cache) with page-level structural quality signals. Because the highest-authority pages always sit at the front of every posting list, terminating a segment walk early still yields the strongest candidate pages rather than an arbitrary crawl-order slice.
### 2. Adaptive bounded-time segment walks
Instead of letting Lucene's default bulk scorer grow its step size without bound, our segment walker advances in adaptive stretches targeting ~8 ms per stretch, checking the wall clock between stretches. Each stretch expands while disk reads hit page cache and shrinks immediately when a cold read takes longer. The walk receives 60% of the request's time budget (reserving up to 150 ms for candidate row retrieval). When a walk reaches its time limit, it stops cleanly and returns every match collected so far.
On our cold-query stress benchmark (40 never-asked entity names at a 300 ms deadline, four concurrent callers), replacing the default bulk scorer with bounded adaptive walks dropped empty responses from 26 of 40 to 0 of 40 while lifting top-10 target recall from 4 of 40 to 21 of 40.
### 3. In-memory rank samples and selective doc-value reads
Reading stored doc values (URL, domain, crawl day, exact rank) for 200 candidates per part across 17 parts meant 3,400 random lookups per query, consuming 45 ms of a 66 ms warm query. We replaced bulk doc-value reads with `RankSamples`, an in-memory table holding the first 262,144 ranks of each segment exactly and every 4,096th rank thereafter (43 MB total for the entire 6.76-billion-page index, built in 3 seconds). Candidates are ranked from memory first, and full doc values are read only for the leading candidates needed to fill the output page. Against reading 200 rows per part, selective reading preserved the exact #1 result in 296 of 299 test queries.
### 4. Segment-level 12-bit Bloom filters for point lookups
Point lookups by URL key (`/doc`, `/page`, and joins from the anchor and vector lanes) would otherwise touch the term dictionary of all 80 segments. Each sealed segment gets a 12-bit-per-key Bloom filter (~0.5% false-positive rate, roughly 10 GB file-mapped across the entire cluster). A URL lookup checks the Bloom filters in RAM and touches disk on the single segment that holds the document.
## Live latency measurements (December 1, 2026)
We probed the production Frankfurt cluster directly over the private VPC network on December 1, 2026. All requests returned HTTP 200 with zero errors.
| Endpoint | Target cube | Sample size | Min | Median (p50) | p95 || --- | --- | --- | --- | --- | --- || `GET /links` (anchor graph) | Anchor 1 | 10 | 1.0 ms | **1.4 ms** | 369.7 ms || `GET /links` (site graph) | Aux 2 | 10 | 1.2 ms | **1.4 ms** | 372.9 ms || `GET /items` (structured entities) | Items | 20 | 3.1 ms | **12.2 ms** | 171.2 ms || `GET /search` (`k=10`, `ms=800`) | English 1 | 20 | 11.7 ms | **36.5 ms** | 568.1 ms || `GET /site` (site contact graph) | Aux 1 | 20 | 54.3 ms | **101.3 ms** | 929.3 ms |
Under live concurrent traffic, single-node English full-text search answers in 36.5 ms at median, structured schema-entity lookups in 12.2 ms, and link-graph lookups in 1.4 ms. Combined with live web fetching and extraction, this local index underpins our Search API ($1 per 1,000 calls on the fast tier, $5 per 1,000 calls on default) and our #1 accuracy across 15 public web-search and extraction benchmarks.
## European data sovereignty by architecture
Hosting the entire 6.76-billion-page index, structured item store, link graph, and vector engine inside Frankfurt on EU-owned infrastructure is not a compliance checkbox added after the fact. For European enterprises, financial institutions, and regulated SaaS teams operating under GDPR and DORA, every API key can enforce `zero_retention: true` (no query text, results, or extracted pages stored after the response leaves) and `eu_egress_only: true` (direct egress from our Frankfurt infrastructure with no third-country proxy hops).
Because our own index answers locally alongside live web retrieval, queries never depend on a single outside search monopoly. A slow or rate-limited origin does not stall the response, and every value returned carries its source URL and read timestamp.
## Try the Search API and Extract API
Every new account starts with $2 of credit with no card required, covering 2,000 fast searches or 2,500 extracted pages. Full benchmark scores, raw outputs, and methodology are published at [specstream.ai/benchmarks](/benchmarks) and on [Hugging Face](https://huggingface.co/datasets/SpecStreamAI/benchmark-results). Create an API key at [specstream.ai/workspace](/workspace).123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103---title: "Non-autoregressive web search: why decision models beat LLM wrappers across 15 public benchmarks"description: "How SpecStream pairs calibrated non-autoregressive System One decision models with deterministic three-valued evidence contracts to rank #1 across 15 public web-search, research, and extraction benchmarks at under a tenth of frontier agent cost."date: 2026-12-01author: Tarekcategory: Researchcover: "Non-autoregressive web search, <em>#1 across 15 benchmarks.</em>"tags: benchmarks, web search API, non-autoregressive, evidence contracts, WideSearch, FRAMES, SimpleQA---
Most AI search pipelines wrap a generic web search endpoint in an autoregressive language model loop. The model writes verbose reasoning chains to decide whether a snippet answers a question, guesses when a page is ambiguous, and burns thousands of output tokens per task while still hallucinating unsupported claims.
SpecStream is built on a different architecture. Instead of asking an autoregressive LLM to narrate every relevance and evidence judgment token by token, we separate fast calibrated judgment from deterministic logical evaluation: the AI reads, and the rules decide. From one frozen production build (`75054770ec`), that architecture ranks #1 across 15 public web-search, research, and extraction benchmarks, including WideSearch, SimpleQA Verified, AA-Omniscience, SurfBench v2, FRAMES, Seal-0, Seal-Hard, FinSearchComp Global T3, cloro FreshQA, webcode-highlights, TRACE Extract v6, search-provider-bench Extract, WCXB, Scrapinghub, and scrapingbench.
Every raw answer, task trace, and score summary is published openly on [Hugging Face](https://huggingface.co/datasets/SpecStreamAI/benchmark-results) and documented at [specstream.ai/benchmarks](/benchmarks).
## The failure mode of autoregressive search wrappers
Autoregressive wrappers break down in three predictable ways on production research and extraction tasks:
1. **Output-token latency and cost blowup.** Generating JSON explanations or chain-of-thought text for dozens of candidate pages per query dominates both wall-clock latency and token spend. On wide research tasks (WideSearch), frontier-model agent stacks running against standard search APIs cost $547 to $1,072 per 1,000 tasks.2. **Coerced binary judgments.** When a search snippet omits a fact, an autoregressive classifier frequently coerces absence of evidence into `"false"` or fills the gap from pretraining memory. On conflicting-source benchmarks such as Seal-0 and Seal-Hard, prior-knowledge leakage causes models to pick outdated or misleading consensus answers over primary sources.3. **Unverifiable citations.** Free-form generation can emit a valid-looking URL next to a value that never appeared on that page. Without structural binding between an asserted value and an exact witnessed byte or character span, downstream agents cannot tell grounded evidence from plausible synthesis.
## System One non-autoregressive decision models
In our production pipeline, high-frequency reading and routing judgments run through a non-autoregressive System One decision model rather than open-ended text generation. Instead of emitting output tokens, the decision model evaluates a bounded state window and returns calibrated option probabilities in a single forward pass with zero generated output tokens.
Two architectural bounds keep System One fast and accurate under real web noise:
- **Bounded input budget.** Context per evaluation pass is capped at 2,000 input tokens and at most 16 independent questions per pass. Packing hundreds of snippets into one sprawling prompt degrades attention calibration; keeping each pass tight preserves calibration and makes latency scale linearly with input length (roughly 150 ms base overhead plus 0.17 ms per input token, completing a full 2,000-token pass in under 500 ms).- **Independent question evaluation.** Each predicate in a multi-condition request is evaluated against the witnessed page context independently, preventing one satisfied condition from biasing the model toward approving an unsupported second condition on the same candidate.
Because no text generation loop runs during screening and evidence classification, compute cost stays an order of magnitude below multi-turn autoregressive wrappers, while latency stays predictable even across complex multi-hop tasks.
## Deterministic three-valued evidence contracts
Calibrated probabilities alone are not enough for reliable web data infrastructure. Every condition in SpecStream's evidence layer evaluates under a strict three-valued logic (`true`, `false`, `unknown`) enforced by deterministic schema contracts:
- **Absence is always `unknown`, never `false`.** Under `all`, `any`, and `not` combinators, a missing or unread field propagates as `unknown` rather than silently failing or passing. If a page never states a company's certification or filing date, the engine knows it must retrieve another source instead of guessing.- **Zero prior-knowledge authority.** Our `target-source-assertion.v1` contract explicitly fixes `prior_knowledge_authority = false` and `modifies_typed_predicates = false`. A linguistic reading cannot invent a source, identifier, timestamp, or scalar value, and cannot overwrite structured fields parsed from primary registries.- **Exact character-offset source witnesses.** Every extracted assertion binds to an immutable `SourceWitness` envelope recording the `source_url`, `observed_at` UTC timestamp, exact `start` and `end` character offsets (`end - start == len(quote)`), verbatim `quote`, and SHA-256 digests of both the source response and the normalized value.- **Bounded structural proofs.** Multi-condition logical proofs are bounded in depth (at most 14 levels) and node count (at most 768 nodes), with every `true` or `false` leaf linked directly to a witnessed evidence record.
When paired with our 6.76-billion-page Frankfurt web index and live extraction pipeline, this contract lets even a low-cost downstream agent outperform frontier-model stacks on hard multi-hop benchmarks.
## Complete results across 15 public benchmarks
All SpecStream runs below were executed on official benchmark question sets and official scorers, with zero unanswered questions across every full search and research sweep. Other providers' scores are their published figures as of November 2026 (full source links are listed on [specstream.ai/benchmarks](/benchmarks)).
### Web search and multi-hop research
| Benchmark | Protocol and split | SpecStream | Next best published API / system | Cost or latency note || --- | --- | --- | --- | --- || **AA-Omniscience** | All 600 questions, 0 unanswered | **82.67%** | Keenable 73%, Exa 73%, Perplexity 72% | Frozen build `75054770ec` || **SurfBench v2** | 80 tasks x 3 rounds (search 84.8, access 83.6) | **84.6** (95% CI 78.1 to 91.0) | perplexity-fast 80.4, exa-lite 79.3, exa 77.9, parallel 76.6 | **$9.03 per 1,000 passed** || **webcode-highlights** | All 250 questions, 0 failed | **87.15%** grounded (**88.76%** citation precision) | Parallel 85.6% | Frozen build `75054770ec` || **WideSearch (4-trial official)** | All 200 tasks x 4 trials (800 runs, 0 unanswered) | **57.32%** Avg@4 item F1, **7.00%** Avg@4 SR, **13.00%** Pass@4 | Exa 56.1%, Tavily 55.9%, Brave 54.8%, Perplexity 54.0%, Parallel 53.7% | Single-trial 200 tasks: **64.0%** item F1 || **SimpleQA Verified** | Official verified factual benchmark | **99** | Parallel 97, Perplexity 95, Tavily 92, Exa 91 | Full 1,000-question protocol on `/benchmarks` || **Seal-0** | All 111 conflicting-source questions, 0 unanswered | **66.7%** (74/111) | Linkup Research 61%, Parallel Ultra 8x 56.8%, Exa Research Pro 45.0% | Official SealQA grader prompt || **Seal-Hard** | All 254 hard conflicting-source questions, 0 unanswered | **71.26%** (181/254, F1 71.83%) | Parallel 70.1%, Firecrawl 26.0% (100-Q) | 0.4% server CPU stall || **FinSearchComp Global T3** | All 84 complex historical financial investigations | **60.7%** (51/84) | Linkup Research 58.3%, Parallel Ultra 46.4%, Tavily 36.9%, Exa 26.2% | Blind two-pass + adjudication || **FRAMES** | All 824 multi-hop reasoning questions, 0 unanswered | **90.78%** (748/824) | Tongyi DeepResearch 90.6%, Gemini 1.5 Pro oracle Wiki 72.9% | Official FRAMES auto-rating || **cloro FreshQA** | All 358 time-sensitive questions, single call, 0 errors | **84.9%** (304/358; 91.8% attempted) | Brave 84.9% (tie #1), Exa 83.0%, Parallel 82.7%, Tavily 81.8% | Single call, **p50 3.19 s** |
### Live web extraction and scraping
| Benchmark | Protocol and split | SpecStream Extract API | Next best published extractor | Cost or latency note || --- | --- | --- | --- | --- || **TRACE Extract v6** | All 2,527 live URLs (`POST /v1/extract`) | **88.51%** overall (**87.04%** live-only) | Context.dev 87.0%, Jina Reader 86.8%, Exa Contents 85.0% | **$0.80 / 1,000 pages**, p50 **1.23 s** || **search-provider-bench Extract** | 105 live pages, 382 facts (zero-model scorer) | **0.7812** macro fact recall (**99.0%** avail.) | Linkup 0.764, Tavily 0.745, Exa 0.708 | p50 **1.27 s** || **WCXB** | 511-page extraction test set | **0.914 F1** | rs-trafilatura 0.903, Trafilatura 0.841, Resiliparse 0.817 | Official scorer || **Scrapinghub Article** | 181 news and blog pages | **0.971 F1** | AutoExtract 0.970, rs-trafilatura 0.970, Trafilatura 0.958 | Official scorer || **scrapingbench** | 40 live documentation tasks (scrape track) | **40/40** done (**40/40** answer in response) | Context.dev 38/40, Spider 37/40, Scrapfly 36/40, Firecrawl 32/40 | Verified against live sources |
In addition, six open, mergeable SpecStream benchmark runs are live on OpenBenchmarks pull requests, including `OB-LegalQA Document Parsing` at **99.997% recall and 0.0000% false positives at $0.0008 per contract**.
## The accuracy-to-cost curve on WideSearch
The sharpest consequence of non-autoregressive evidence retrieval shows up on the WideSearch cost frontier. On the 100-task WideSearch comparison, a low-cost agent paired with SpecStream scores **60.93 item F1 at $39.40 per 1,000 tasks**. Every competing search API paired with a frontier agent scores lower (53.5 to 57.6) while spending **$547 to $1,072 per 1,000 tasks**, more than 13x to 27x more per task.
| Search API | Agent tier | WideSearch Item F1 | Cost per 1,000 tasks || --- | --- | --- | --- || **SpecStream** | **Low-cost (GPT-5.6 Luna)** | **60.93** | **$39.40** || Parallel Advanced | Frontier (GPT-5.6 Sol) | 57.6 | $692.00 || Exa Auto | Frontier (GPT-5.6 Sol) | 55.9 | $1,061.00 || Tavily | Frontier (GPT-5.6 Sol) | 55.9 | $1,072.00 || Parallel Basic | Frontier (GPT-5.6 Sol) | 55.3 | $965.00 || Perplexity | Frontier (GPT-5.6 Sol) | 53.5 | $547.00 |
When the search layer returns clean, witnessed passages and resolves ambiguity before tokens reach the reasoning model, the downstream agent no longer needs a frontier model to recover from noisy snippets.
## Reproducibility and raw verification
Benchmark marketing without raw traces is unverifiable. Every SpecStream score reported above links directly to raw per-question responses, timestamps, tool call counts, and official scorer outputs published in our public [Hugging Face benchmark repository](https://huggingface.co/datasets/SpecStreamAI/benchmark-results).
## Build on the engine
- **Search API:** `GET /v1/web-search` at $5 per 1,000 default searches and $1 per 1,000 fast searches (and on every drop-in route for Google CSE, Exa, Tavily, Brave, Serper, and Firecrawl).- **Extract API:** `POST /v1/extract` at $0.80 per 1,000 pages; pages with no text are not charged.- **Deep Search:** Structured, condition-checked rows from the live web, billed per delivered row under an approved maximum.
New accounts receive $2 of credit with no card required at [specstream.ai/workspace](/workspace).123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105---title: "Millisecond semantic retrieval over 47 million Wikipedia paragraphs in 6 GB of RAM"description: "How SpecStream serves dense semantic search across 47,018,430 Wikipedia paragraphs in 6.02 GB of locked RAM using AVX-512 binary Hamming scans and NVMe-backed int8 rescoring, with live benchmarks and reproducible open code."date: 2026-12-01author: Tarekcategory: Engineeringcover: "47 million vectors, <em>in 6 GB of RAM.</em>"tags: vector search, binary quantization, SIMD, AVX-512, semantic retrieval, Wikipedia, systems engineering---
Serving 47 million 1,024-dimensional embeddings in standard `float32` requires 192.6 GB of raw vector memory before adding any HNSW graph edges or metadata. With an HNSW graph (`M=32`), a single corpus of 47 million paragraphs routinely demands 250 to 320 GB of RAM and dedicated high-memory clusters costing thousands of dollars per month.
We serve semantic retrieval over all 47,018,430 paragraphs of English Wikipedia (6,614,230 articles, 1,024-dimensional `BAAI/bge-m3` embeddings from the public `Upstash/wikipedia-2024-06-bge-m3` corpus) inside a single 14 GB memory cgroup with swap disabled, pinning the entire searchable vector index in **5.605 GiB (6.018 GB) of `mlock`-pinned RAM**. On live production traffic measured December 1, 2026, query encoding runs in **0.23 ms** at median, the full 47.02-million-vector exact Hamming scan completes in **171.77 ms** at median, and NVMe `mmap` `int8` rescoring plus paragraph text retrieval finishes in **2.87 ms** at median.
## The exact memory math: 32x RAM compression
Dense 1,024-dimensional unit vectors do not need 32 bits per coordinate to narrow 47 million paragraphs down to the top few thousand candidates. They only need sign bits for the first pass and 8-bit scalar quantization for final cosine rescoring.
| Representation | Bytes per vector | Total size (47,018,430 paragraphs) | Storage tier | Read pattern per query || --- | --- | --- | --- | --- || Uncompressed `float32` | 4,096 B | 192.59 GB (179.36 GiB) | Not stored | None || `float32` + HNSW (`M=32`) | ~5,400 B | ~254 GB | Not stored | Random pointer chasing || **Stage 1: Binary sign bits (`bin.dat`)** | **128 B** | **6.018 GB (5.605 GiB)** | **`mlock()` pinned RAM** | **100% sequential SIMD scan** || **Stage 2: Scalar `int8` (`i8.dat`)** | **1,024 B** | **48.147 GB (44.840 GiB)** | **Local NVMe (`mmap`)** | **Top 3,000 candidates (~3.07 MB)** |
Each 1,024-dimensional unit vector is stored twice in flat, aligned binary files indexed by paragraph row ID:
1. **Binary sign file (`bin.dat`):** Bit `d` is `1` if `vec[d] > 0`, packed little-endian into 128 bytes (`16 x uint64_t` words) per paragraph. Across 47,018,430 paragraphs, the file is exactly `6,018,359,040` bytes (`5.605 GiB`). At startup, the service prewarms and locks `bin.dat` in physical RAM with `mlock()` so random page faults on the 48 GB `int8` file can never evict the hot binary scan buffer.2. **Scalar `int8` rescore file (`i8.dat`):** Each unit-normalized dimension is quantized as `clip(round(v * 127), -127, 127)`, requiring 1,024 bytes per paragraph (`48,146,872,320` bytes total, `44.840 GiB`). It lives memory-mapped on direct-attached local NVMe.3. **Zero-copy paragraph store (`texts.dat` + `text_ends.dat` + `article_ids.dat` + `articles.tsv`):** UTF-8 paragraph texts sit back to back with a `uint64` end-offset array and a `uint32` article ID table, so returning full matched paragraphs and article URLs requires one O(1) offset lookup per winning hit.
Because Stage 1 scans flat contiguous arrays in RAM with zero graph pointers, there is no index build overhead, no HNSW graph corruption on updates, no recall cliff on filtered queries, and zero pointer-chasing stalls.
## Two-stage retrieval pipeline
Every incoming query passes through three deterministic stages:
```Query text | v[1] Quantized ONNX encoder (p50: 0.23 ms) |---> 1024-dim float32 query vector |---> pack_binary(q) -> 16 x uint64_t (128 bytes) | v[2] OpenMP + AVX-512 VPOPCNTDQ Hamming scan over 47,018,430 x 128 B in RAM (p50: 171.77 ms) |---> exact top-3,000 candidates via (distance << 32) | row min-heap | v[3] Local NVMe mmap int8 dot-product rescore + text fetch (p50: 2.87 ms) |---> 3,000 candidates x 1,024 B = 3.07 MB read |---> exact float-to-int8 cosine ranking + article deduplication vTop-k paragraphs with URL, title, score, and matched text```
### Stage 1: AVX-512 VPOPCNTDQ and micro-batched memory bandwidth
An exact scan over 6.018 GB of RAM is memory-bandwidth bound, not compute bound. On modern x86 CPUs supporting `AVX-512F` and `AVX-512VPOPCNTDQ`, each 128-byte binary vector fits cleanly in two 512-bit ZMM registers (`_mm512_xor_si512` followed by `_mm512_popcnt_epi64` and `_mm512_reduce_add_epi64`). On hosts without AVX-512, the same kernel compiles cleanly to 16 unrolled 64-bit XOR plus `__builtin_popcountll` instructions via `-O3 -march=native -fopenmp`.
Two engineering details make the scan predictable and scalable under load:
- **Deterministic tie-breaking in one 64-bit integer.** Each thread keeps a local fixed-size max-heap of `cand` entries keyed by `((uint64_t)distance << 32) | row_id`. Ties break identically by paragraph row ID regardless of OpenMP thread scheduling order, making retrieval results 100% reproducible across runs.- **4-way query micro-batching.** Because single-query Hamming scans saturate memory bandwidth across 12 OpenMP threads, serving concurrent requests independently causes threads to thrash DRAM channels. Micro-batching up to 4 concurrent queries in registers computes `XOR + POPCNT` against all 4 query vectors per cache line fetched from `bin.dat`, amortizing the 6.018 GB DRAM sweep across multiple callers simultaneously.
### Stage 2: Sub-3-millisecond NVMe `int8` rescoring
Once the binary pass selects the top 3,000 candidates (0.0064% of the 47M corpus), Stage 2 touches `i8.dat` on local direct-attached NVMe. Reading 3,000 rows of 1,024 bytes pulls just 3.07 MB total. Computing the `float32` query dot product against 3,000 `int8` vectors recovers high-precision cosine ordering in **2.87 ms at median** (4.41 ms p95) on local NVMe, including fetching the final UTF-8 paragraph texts for the returned hits.
## Live production benchmark results (December 1, 2026)
We benchmarked the live production service running inside a 12-thread cgroup (`OMP_NUM_THREADS=12`, `MemoryMax=14G`, `MemorySwapMax=0`) on one Frankfurt local-NVMe node across 47,018,430 Wikipedia paragraphs.
### Stage breakdown (sequential factual queries, `k=10`, `n=20`)
| Pipeline stage | Median (p50) | p95 | Share of server time || --- | --- | --- | --- || Query encoding (quantized ONNX) | **0.23 ms** | 0.32 ms | 0.1% || Exact 47.02M binary Hamming scan (RAM) | **171.77 ms** | 261.49 ms | 98.0% || NVMe `mmap` `int8` rescore + text lookup | **2.87 ms** | 4.41 ms | 1.6% || **Total server latency** | **175.21 ms** | | **100%** |
### End-to-end throughput: sequential vs 8-way concurrent micro-batching (`n=60`)
| Workload | Requests OK | Total wall time | Throughput | Server p50 | Server p95 | Client p50 | Client p95 || --- | --- | --- | --- | --- | --- | --- | --- || Sequential (1 caller) | 60 / 60 | 16.02 s | **3.75 QPS** | 248.05 ms | 336.59 ms | 258.65 ms | 347.26 ms || 8-way concurrent (micro-batched) | 60 / 60 | 7.49 s | **8.01 QPS** | 836.87 ms | 1,016.30 ms | 885.52 ms | 1,191.44 ms |
Micro-batching delivers a **2.14x throughput increase** (3.75 QPS to 8.01 QPS) on the exact same 12 threads and 6.02 GB RAM budget because multiple queries share each DRAM sweep of `bin.dat`, while `int8` rescore median rises only from 2.87 ms to 6.16 ms under 8x concurrency.
## Why exact binary scan + NVMe `int8` beats managed vector databases for web search
For a web-scale search engine that answers multi-hop factual questions (where SpecStream ranks #1 across 15 public benchmarks including 90.78% on FRAMES and 99 on SimpleQA Verified), this architecture offers three operational advantages over HNSW-based vector services:
1. **Zero memory blowup.** 47 million paragraphs fit in 6.02 GB of pinned RAM on a shared EUR 83.22/month node alongside hundreds of millions of other records, rather than requiring a dedicated 256 GB vector cluster.2. **Exact recall over the binary space.** There is no approximate graph navigation failure when a query lies near a sparse region of the embedding manifold, and no `efSearch` tuning cliffs.3. **Crash-safe, resumable flat-file builds.** Building the index streams the 471 shards of `Upstash/wikipedia-2024-06-bge-m3` directly into append-only binary files with atomic shard checkpoints, requiring under 2 GB of scratch disk.
## Reproducible open benchmark
To let any systems engineer verify the memory layout, binary-to-int8 recall curve, and SIMD scan throughput on their own hardware, we published a clean standalone C + Python reproduction suite (`binary_int8_bench`) alongside this post. It implements the exact 1024-bit sign packing, AVX-512 / portable POPCNT scan, `int8` rescoring, and latency/recall script on synthetic unit-sphere corpora or real `BAAI/bge-m3` Parquet shards.
Explore SpecStream's Search API and Extract API with $2 of free credit (no card required) at [specstream.ai/workspace](/workspace), or inspect all 15 public benchmark runs at [specstream.ai/benchmarks](/benchmarks).123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144---title: "Google Custom Search JSON API retires Jan 1, 2027: drop-in /customsearch/v1 migration and benchmark report"description: "Google ends its Custom Search JSON API on January 1, 2027, impacting 25,280 public GitHub files. Complete parameter parity, 1-line migration code for Python, JS, LangChain, and Open WebUI, and benchmark comparison at $1 per 1,000 searches."date: 2026-12-01author: Tarekcategory: Search APIcover: "Google CSE ends Jan 1, 2027. <em>Keep your code.</em>"tags: Google Custom Search, customsearch/v1, migration, search API, LangChain, benchmarks---
On January 1, 2027, 31 days from today, Google shuts down the Custom Search JSON API (`googleapis.com/customsearch/v1`) for all existing customers. The API is already closed to new sign-ups, and Google's own suggested alternative (Vertex AI Search) caps site-scoped indexes at 50 domains with no self-serve drop-in replacement for open web search.
In our November 20, 2026 audit of public GitHub repositories ([specstream.ai/studies/google-custom-search-shutdown-2026](/studies/google-custom-search-shutdown-2026)), **25,280 public code files** still reference `googleapis.com/customsearch/v1`, **18,464 files** read `GOOGLE_CSE_ID`, and **8,368 files** depend on LangChain's `GoogleSearchAPIWrapper` alone. Across the open-source ecosystem, 457 repositories with 50+ stars (and 145 repositories with 1,000+ stars, including `OmniRoute`, `litellm`, `llama_index`, `LocalAI`, `discourse`, `LibreChat`, and `microsoft/semantic-kernel`) still carry active Google CSE integrations.
SpecStream exposes a wire-compatible drop-in route at `https://api.specstream.ai/customsearch/v1` (and `/customsearch/v1/siterestrict`). Moving an existing client requires changing two values: the base host and the API key. Every call runs at **$1.00 per 1,000 searches** (one-fifth of Google's $5.00 per 1,000 list price), removes Google's hard **10,000 queries per day cap**, and runs on the web search engine ranked **#1 across 15 public web-search and extraction benchmarks**.
## Ecosystem exposure before the January 1, 2027 cutoff
| Language or pattern | Public GitHub files (Nov 20, 2026) || --- | --- || Total files calling `googleapis.com/customsearch/v1` | **25,280** || Files reading `GOOGLE_CSE_ID` | **18,464** || Python | **10,208** || LangChain `GoogleSearchAPIWrapper` | **8,368** || Inline `customsearch/v1?key=` URLs | **7,072** || JavaScript | **5,008** || TypeScript | **3,028** || PHP | **659** || Java | **550** || C# | **352** || Go | **342** || Ruby | **155** |
Every single one of these integrations stops receiving search results on January 1, 2027 unless migrated.
## Side-by-side comparison: Google CSE vs SpecStream drop-in
| Capability | Google Custom Search JSON API | SpecStream `/customsearch/v1` || --- | --- | --- || Status | Shuts down Jan 1, 2027 (closed to new users) | Live production, EU-sovereign Frankfurt infrastructure || Price per 1,000 searches (10 results) | $5.00 (after 100 free/day) | **$1.00** (fast drop-in tier; $5.00 on default answer tier) || Daily query cap | Hard 10,000 queries/day ceiling | **No daily cap** || Programmable Search Engine (`cx`) config | Required in Google console | Accepted and echoed; **zero console config required** || Median latency (production) | ~0.5 to 1.2 s | **0.82 s** on fast drop-in route || Web and image search (`searchType=image`) | Supported | **Supported** (with `imgSize`, `imgType`, `imgColorType`, `imgDominantColor`) || Partial response `fields` selector | Supported | **Supported** (`a,b/c,d(e,f)` and `*` wildcard masking) || Zero retention and EU-only egress | Not available per key | **Supported per API key** (`zero_retention`, `eu_egress_only`) || Starting credit | Closed to new accounts | **$2 free credit on sign-up** (2,000 drop-in searches, no card) |
## Complete parameter and JSON schema parity
A drop-in route only saves engineering time if existing parsers, SDKs, and edge-case clients keep working without code rewrites. SpecStream's `/customsearch/v1` implementation (`GET /customsearch/v1` and `GET /customsearch/v1/siterestrict`) implements Google's full request and response contract:
- **Authentication:** Accepts your SpecStream key in `key=<key>`, `X-Goog-Api-Key`, or `Authorization: Bearer <key>`.- **Pagination edge cases:** Supports `num` (1 to 10, default 10) and `start` (up to reach 100), including `start=0` normalized to page 1 (which `microsoft/semantic-kernel` sends by default). Emits `queries.request`, `queries.nextPage`, and `queries.previousPage` plus `searchInformation.totalResults`.- **Query shaping operators:** Translates `siteSearch`, `siteSearchFilter` (`i` / `e`), `exactTerms`, `excludeTerms`, `orTerms`, `hq`, `fileType`, `dateRestrict` (`d[N]`, `w[N]`, `m[N]`, `y[N]`), `lowRange`, and `highRange` directly into native search operators.- **Locale, safety, and sorting:** Maps `lr`, `hl`, `cr`, `gl`, `safe`, and `sort=date` (newest dated results first).- **Image search (`searchType=image`):** Returns `items[].link` (image URL), `image.contextLink` (hosting page), `width`, `height`, `thumbnailLink`, `thumbnailWidth`, `thumbnailHeight`, and `mime`, enforcing `imgSize`, `imgType`, `imgColorType`, and `imgDominantColor`.- **Response shape and `pagemap`:** Returns `kind: "customsearch#search"`, `url.template`, `context`, `spelling` (`correctedQuery`, `htmlCorrectedQuery`), and `items[]` with `kind: "customsearch#result"`, `title`, `htmlTitle`, `link`, `displayLink`, `snippet`, `htmlSnippet`, `formattedUrl`, `htmlFormattedUrl`, `mime`, `fileFormat`, and `pagemap` (`metatags` and `cse_image`, required by strict parsers such as `trpc-agent-go`).- **Google `fields` partial response masking and `prettyPrint`:** Full tree-selector masking (used automatically by `google-api-python-client` and LangChain).- **Canonical error codes:** Maps HTTP statuses (`400`, `401`, `402`, `403`, `429`, `500`, `503`, `504`) to Google's `google.rpc.Code` JSON error envelope (`INVALID_ARGUMENT`, `UNAUTHENTICATED`, `FAILED_PRECONDITION`, `PERMISSION_DENIED`, `RESOURCE_EXHAUSTED`), returning `Retry-After` on `429` with zero charge.- **Retired no-op parameters:** Accepts `cx`, `linkSite`, `relatedSite`, `rights`, `filter`, `c2coff`, and `googlehost` without error so legacy callers never break.
## One-line migration examples
### cURL
```bash# Before (retires January 1, 2027)curl -G "https://www.googleapis.com/customsearch/v1" \ --data-urlencode "key=$GOOGLE_API_KEY" \ --data-urlencode "cx=$GOOGLE_CSE_ID" \ --data-urlencode "q=EU DORA subprocessor reporting rules"
# After (SpecStream drop-in, $1 per 1,000 searches)curl -G "https://api.specstream.ai/customsearch/v1" \ --data-urlencode "key=$SPECSTREAM_API_KEY" \ --data-urlencode "q=EU DORA subprocessor reporting rules"```
### Python (`requests`)
```pythonimport os, requests
resp = requests.get( "https://api.specstream.ai/customsearch/v1", params={ "key": os.environ["SPECSTREAM_API_KEY"], "q": "EU DORA subprocessor reporting rules", "num": 10, "dateRestrict": "m6", }, timeout=15,)items = resp.json().get("items", [])for row in items: print(row["title"], row["link"])```
### JavaScript / TypeScript (`fetch`)
```tsconst url = new URL("https://api.specstream.ai/customsearch/v1");url.searchParams.set("q", "PostgreSQL 18 release notes");url.searchParams.set("num", "10");
const res = await fetch(url, { headers: { "X-Goog-Api-Key": process.env.SPECSTREAM_API_KEY ?? "" },});const data = await res.json();console.log(data.items.map((item: { title: string; link: string }) => [item.title, item.link]));```
### Open WebUI and agent frameworks
In Open WebUI or any client that takes a Google PSE base URL, replace `https://www.googleapis.com/customsearch/v1` with `https://api.specstream.ai/customsearch/v1` and set your SpecStream key. You can also inspect any request rewrite interactively using the free [Google CSE Migrator](/tools/google-cse-migrator) or [Drop-In API Converter](/tools/drop-in-api-converter).
## Search accuracy behind the drop-in route
Switching away from Google CSE does not mean trading down on retrieval quality. SpecStream's search infrastructure runs on our own 6.76-billion-page EU-sovereign index in Frankfurt paired with live web retrieval, ranking **#1 across 15 public web-search and extraction benchmarks** from one frozen build (`75054770ec`):
| Benchmark | SpecStream | Published competitors || --- | --- | --- || **AA-Omniscience** (all 600 questions) | **82.67%** | Keenable 73%, Exa 73%, Perplexity 72% || **SurfBench v2** (80 tasks x 3 rounds) | **84.6** | perplexity-fast 80.4, exa-lite 79.3, exa 77.9, parallel 76.6 || **WideSearch** (200 tasks x 4 trials, Avg@4 item F1) | **57.32%** (single-trial 64.0%) | Exa 56.1%, Tavily 55.9%, Brave 54.8%, Perplexity 54.0%, Parallel 53.7% || **SimpleQA Verified** | **99** | Parallel 97, Perplexity 95, Tavily 92, Exa 91 || **FRAMES** (all 824 multi-hop questions) | **90.78%** | Tongyi DeepResearch 90.6% || **Seal-0** (all 111 conflicting-source questions) | **66.7%** | Linkup 61%, Parallel Ultra 8x 56.8%, Exa 45.0% || **cloro FreshQA** (all 358 single-call questions) | **84.9%** (tie #1) | Brave 84.9%, Exa 83.0%, Parallel 82.7%, Tavily 81.8% || **TRACE Extract v6** (all 2,527 live URLs) | **88.51%** | Context.dev 87.0%, Jina Reader 86.8%, Exa Contents 85.0% |
Need full page passages or a verified factual answer on the same key? Pass `specstream_speed=default` ($5 per 1,000 calls) or call `GET /v1/web-search` with `passages=true` or `POST /v1/extract` ($0.80 per 1,000 pages).
## Cutover checklist before January 1, 2027
1. Create a SpecStream API key at [specstream.ai/workspace](/workspace) ($2 free credit, no card required, covering 2,000 drop-in searches).2. Point staging from `https://www.googleapis.com/customsearch/v1` (or `https://customsearch.googleapis.com/customsearch/v1`) to `https://api.specstream.ai/customsearch/v1`.3. Run your existing integration test suite against the response JSON (`items[]`, `queries.nextPage`, `pagemap`, `searchInformation`).4. For production volume above 100,000 searches per month or custom SLA / committed capacity packs, email `tarek@specstream.ai` or configure auto top-up in the workspace.5. Complete production cutover ahead of December 31, 2026 so your service has zero downtime when Google retires `/customsearch/v1` on January 1, 2027.
Full benchmark traces are published at [specstream.ai/benchmarks](/benchmarks) and [Hugging Face](https://huggingface.co/datasets/SpecStreamAI/benchmark-results).123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134---title: "State of SaaS AI infrastructure 2026: Anthropic leads OpenAI (1,942 vs 1,832) across 6,807 trust centers"description: "Empirical measurement of 74,008 subprocessor edges across 6,807 SaaS and AI trust centers (November 2026): Anthropic leads OpenAI 1,942 to 1,832 with more than 4x net 30-day momentum (+31 vs +7), 1,096 companies run dual-stack AI, and 78.4% of cloud-disclosing SaaS rely on one hyperscaler."date: 2026-12-01author: Tarekcategory: Researchcover: "Anthropic 1,942 vs OpenAI 1,832, <em>across 6,807 trust centers.</em>"tags: subprocessors, Anthropic, OpenAI, SaaS infrastructure, DORA, compliance, empirical research---
Surveys measure what engineering leaders intend to adopt. Legal subprocessor disclosures measure what production software actually sends customer data to. Under GDPR Article 28 and enterprise data processing addenda, B2B SaaS and AI vendors publish their active subprocessors on public trust centers and legal pages, updating those lists before routing live customer traffic to a new cloud, model, or data vendor.
Between November 11 and November 29, 2026, SpecStream read and normalized the published subprocessor pages of **6,807 SaaS and AI companies**, capturing **74,008 live company-to-vendor edges** spanning **13,567 distinct vendors** (public snapshot and CC BY 4.0 sample dataset published on [GitHub](https://github.com/Specstreamai/saas-ai-subprocessors-2026) and [Kaggle](https://www.kaggle.com/datasets/specstream/saas-ai-subprocessors-trust-centers-2026), and searchable live at [specstream.ai/data/subprocessors](/data/subprocessors)).
Four empirical findings stand out across the corpus:
1. **Anthropic leads OpenAI in disclosed SaaS production adoption:** **1,942 companies (28.53%)** name Anthropic against **1,832 (26.91%)** naming OpenAI, ranking Anthropic 5th and OpenAI 6th among all 13,567 vendors in SaaS infrastructure, trailing only AWS, Stripe, Google, and Cloudflare.2. **Anthropic's 30-day net gain is more than 4x OpenAI's:** In the 30 days ending November 29, 2026, 44 companies added Anthropic and 13 removed it (**net +31**), compared with 13 additions and 6 removals for OpenAI (**net +7**). OpenRouter recorded 10 additions and zero removals (**net +10**).3. **Multi-model routing is already the default among AI-native SaaS:** **1,096 companies (16.10% of the entire corpus)** disclose both Anthropic and OpenAI on the same trust center, representing 56.4% of Anthropic's SaaS footprint and 59.8% of OpenAI's.4. **Cloud and AI concentration risk is acute under EU DORA:** Just 10 vendors account for **25.93%** of all 74,008 edges (top 50 vendors account for **49.90%**). Among companies disclosing AWS, Google Cloud, or Microsoft Azure, **78.4% (2,849 of 3,634)** depend on a single hyperscaler.
## Top 25 infrastructure vendors across 6,807 SaaS trust centers
Every count deduplicates legal entity variants per company (for example, `Anthropic, PBC` and `Claude` normalize to one edge per disclosing company).
| Rank | Vendor | Category | Companies naming it | Share of 6,807 || ---: | --- | --- | ---: | ---: || 1 | Amazon Web Services | Cloud | 2,919 | 42.88% || 2 | Stripe | Payments | 2,876 | 42.25% || 3 | Google | Cloud / platform | 2,445 | 35.92% || 4 | Cloudflare | Edge / security | 2,084 | 30.62% || 5 | **Anthropic** | **AI models** | **1,942** | **28.53%** || 6 | **OpenAI** | **AI models** | **1,832** | **26.91%** || 7 | Sentry | Observability | 1,492 | 21.92% || 8 | Vercel | Cloud / frontend | 1,255 | 18.44% || 9 | Resend | Transactional email | 1,246 | 18.30% || 10 | Google Cloud | Cloud | 1,097 | 16.12% || 11 | PostHog | Product analytics | 1,028 | 15.10% || 12 | Slack | Communications | 985 | 14.47% || 13 | Twilio | Communications | 977 | 14.35% || 14 | Microsoft | Cloud / enterprise | 976 | 14.34% || 15 | Supabase | Data infrastructure | 840 | 12.34% || 16 | HubSpot | CRM | 813 | 11.94% || 17 | SendGrid | Email | 659 | 9.68% || 18 | Google Analytics | Analytics | 627 | 9.21% || 19 | Meta | Advertising / social | 614 | 9.02% || 20 | Microsoft Azure | Cloud | 610 | 8.96% || 21 | Hetzner | European cloud | 558 | 8.20% || 22 | GitHub | Developer tools | 556 | 8.17% || 23 | Intercom | Support | 538 | 7.90% || 24 | Zendesk | Support | 495 | 7.27% || 25 | Salesforce | CRM | 492 | 7.23% |
Other notable infrastructure vendors in the top 500 include Datadog (#26, 480 companies, 7.05%), MongoDB (#30, 358, 5.26%), OpenRouter (#31, 338, 4.97%), DigitalOcean (#32, 326, 4.79%), Snowflake (#36, 288, 4.23%), Auth0 (#44, 201, 2.95%), Clerk (#46, 197, 2.89%), Okta (#65, 139, 2.04%), Databricks (#88, 90, 1.32%), Pinecone (#114, 69, 1.01%), and Qdrant (#185, 42, 0.62%).
## AI model adoption, dual-stack overlap, and 30-day churn
Two AI model labs have crossed into core SaaS infrastructure alongside cloud and payments, while specialized audio, routing, and fast-inference providers form a growing second tier.
### Direct AI model and inference vendors (November 29, 2026)
| Rank | AI vendor | Companies | Share of 6,807 | Added (30d) | Removed (30d) | Net (30d) || ---: | --- | ---: | ---: | ---: | ---: | ---: || 1 | Anthropic | **1,942** | 28.53% | 44 | 13 | **+31** || 2 | OpenAI | **1,832** | 26.91% | 13 | 6 | **+7** || 3 | OpenRouter | 338 | 4.97% | 10 | 0 | **+10** || 4 | ElevenLabs | 318 | 4.67% | 9 | 1 | **+8** || 5 | xAI | 191 | 2.81% | 4 | 0 | **+4** || 6 | Deepgram | 185 | 2.72% | 4 | 2 | **+2** || 7 | Mistral AI | 184 | 2.70% | 3 | 1 | **+2** || 8 | Google Gemini (named directly) | 170 | 2.50% | 1 | 3 | -2 || 9 | Perplexity | 150 | 2.20% | 8 | 2 | **+6** || 10 | Groq | 142 | 2.09% | 6 | 1 | **+5** || 11 | AssemblyAI | 96 | 1.41% | 7 | 2 | **+5** || 12 | fal.ai | 85 | 1.25% | 2 | 0 | **+2** || 13 | Fireworks AI | 78 | 1.15% | 5 | 3 | **+2** || 14 | Google Vertex AI (named directly) | 72 | 1.06% | 0 | 0 | 0 || 15 | Voyage AI | 70 | 1.03% | 8 | 0 | **+8** || 16 | Cohere | 53 | 0.78% | 1 | 3 | -2 || 17 | DeepSeek | 53 | 0.78% | 0 | 0 | 0 |
### Cloud-wrapped AI disclosures
Many enterprises route frontier models through their hyperscaler's existing DPA rather than adding a standalone model-lab row. Parsing both vendor names and service descriptions recovers those cloud-hosted AI deployments:
- **Google Gemini** (vendor or service line): **686** companies- **Google Vertex AI** (vendor or service line): **218** companies- **AWS Bedrock** (vendor or service line): **173** companies- **Azure OpenAI** (vendor or service line): **103** companies
### Dual-stack Anthropic and OpenAI breakdown
| Cohort | Companies | Share of 6,807 || --- | ---: | ---: || Any Anthropic or OpenAI disclosure | **2,678** | 39.34% || **Both Anthropic and OpenAI** | **1,096** | **16.10%** || Anthropic only (not OpenAI) | 846 | 12.43% || OpenAI only (not Anthropic) | 736 | 10.81% |
Rather than exclusive lock-in, production AI teams increasingly treat model labs as interchangeable inference backends behind multi-provider routers (reflected in OpenRouter's zero-churn +10 net additions and 1,096 dual-stack disclosures).
## Full-graph churn velocity
Trust centers are living operational ledgers, not static PDFs. Across a 14-day observation window (November 10 to November 24, 2026, covering 6,724 tracked companies and 72,916 edges), SpecStream recorded **2,516 vendor change events** (**1,436 additions** and **1,080 removals**) touching **1,420 distinct vendors**. Within 18 closely tracked battleground infrastructure vendors alone, 310 displacement events occurred in two weeks (159 additions and 151 removals).
For GTM, competitive intelligence, and third-party risk management (TPRM) teams, every subprocessor addition or removal is a timestamped, legally disclosed production stack transition.
## EU DORA concentration risk analysis
Under the EU Digital Operational Resilience Act (DORA), financial entities must maintain a Register of Information mapping ICT third-party concentration across critical and important functions, including fourth-party subprocessors. Our graph exposes steep power-law concentration across the SaaS supply chain:
| Vendor tier (ranked by edge count) | Cumulative edges (of 74,008) | Share of all SaaS subprocessor edges || --- | ---: | ---: || Top 3 vendors (AWS, Stripe, Google) | 8,240 | **11.13%** || Top 10 vendors | 19,188 | **25.93%** || Top 25 vendors | 29,956 | **40.48%** || Top 50 vendors | 36,932 | **49.90%** || Top 100 vendors | 42,980 | **58.07%** || Top 500 vendors | 54,138 | **73.15%** |
Two structural bottlenecks dominate fourth-party risk audits:
1. **Hyperscaler single-vendor dependency:** Across 3,634 companies disclosing AWS, Google Cloud, or Microsoft Azure, **2,849 (78.4%)** depend on a single hyperscaler (2,137 rely solely on AWS), 663 (18.2%) disclose two, and only 122 (3.4%) disclose all three.2. **AI layer duopoly:** Across 3,049 companies disclosing any AI model vendor, Anthropic and OpenAI together cover **2,678 unique companies (87.8%)**.
## Methodology, zero-PII verification, and open dataset
Every edge in this study is extracted directly from each company's own public subprocessor page or trust center using SpecStream's live web data engine, with exact `source_url`, `first_seen`, and `last_seen` dates recorded per edge. Legal entity aliases are canonicalized so each company counts at most once per vendor. The public release contains zero personal data (zero email addresses, phone numbers, or personal names, verified programmatically across all columns).
### Open data and weekly monitoring
- **Free public dataset (CC BY 4.0):** Top-500 vendor rankings, AI subprocessor rankings, and a 1,000-row sample are available on [GitHub](https://github.com/Specstreamai/saas-ai-subprocessors-2026) and [Kaggle](https://www.kaggle.com/datasets/specstream/saas-ai-subprocessors-trust-centers-2026).- **Live directory:** Browse all 6,807 companies and 13,567 vendors with source URLs at [specstream.ai/data/subprocessors](/data/subprocessors).- **Weekly Subprocessor Monitor:** Receive every competitor addition and removal across all 6,807+ trust centers each week ($299/month single vendor, $699/month five-vendor battleground pack, or $1,500/month full graph) at [specstream.ai/subprocessor-monitor](/subprocessor-monitor).README.mdAdded+35
artifacts/wiki-vector-bench/MakefileAdded+10
artifacts/wiki-vector-bench/README.mdAdded+25
artifacts/wiki-vector-bench/bench.pyAdded+109
artifacts/wiki-vector-bench/hamming_rescore.cAdded+156
papers/01-eu-sovereign-6-7b-web-index-12-nvme-nodes.mdAdded+108
papers/02-non-autoregressive-web-search-15-benchmarks.mdAdded+103
papers/03-millisecond-semantic-retrieval-47m-wikipedia-6gb-ram.mdAdded+105
papers/04-google-custom-search-json-api-retirement-2027-migration-benchmark.mdAdded+144
papers/05-state-of-saas-ai-infrastructure-2026-subprocessor-report.mdAdded+134