Google Site Restricted JSON API replacement
Change one host, keep your code.
Google stopped serving the Custom Search Site Restricted JSON API (/customsearch/v1/siterestrict) on January 8, 2025 and retires the standard Custom Search JSON API on January 1, 2027. SpecStream answers GET https://api.specstream.ai/customsearch/v1/siterestrict in Google's exact customsearch#search JSON shape at $1 per 1,000 fast searches (937 ms median over 6,548 live calls), 80% less than Google's $5 per 1,000 and with no daily limit, alongside $5 per 1,000 default Search API and $0.80 per 1,000 Extract API pages.
SpecStream is state of the art on the live web, setting a new bar in research, extraction, and search. It ranks first on WideSearch (60.93 low-cost, ahead of every search API; 64.0 single-trial item F1 and 57.32% Avg@4 item F1 across all 200 official tasks) and scores 99 on SimpleQA Verified, alongside AA-Omniscience 82.67%, SurfBench v2 84.6, Seal-0 66.7%, Seal-Hard 71.26%, FinSearchComp Global T3 60.7%, FRAMES 90.78%, TRACE Extract v6 88.51%, WCXB 0.914, Scrapinghub 0.971, and scrapingbench 40 of 40 (benchmarks).
Change only the host (https://www.googleapis.com to https://api.specstream.ai) and put your SpecStream key in key= (or X-Goog-Api-Key). siteSearch, siteSearchFilter, exactTerms, orTerms, dateRestrict, num, and start work directly, and cx is accepted without errors.
Want to generate the exact 1-line diff and compare monthly costs? Open the Drop-in API converter or read the Web Search API reference for native parameters including boost_domains, include_domains, and exclude_domains.
New accounts get $2 of free credit, no card required: 2,000 fast searches or 2,500 extracted pages.
Monthly credit plans with higher RPM and invoice receipts: Starter ($49/mo), Growth ($199/mo), or Scale ($499/mo). Try the 1-line converter and savings calculator.
SpecStream vs Google Site Restricted JSON API and Vertex Agent Search
| SpecStream | Google Custom Search Site Restricted JSON API | |
|---|---|---|
| Endpoint | GET https://api.specstream.ai/customsearch/v1/siterestrict (and /customsearch/v1) | GET https://www.googleapis.com/customsearch/v1/siterestrict (retired Jan 8, 2025) |
| Authentication | SpecStream API key in key=, X-Goog-Api-Key, or Authorization: Bearer (cx accepted and ignored) | Google API key plus a Programmable Search Engine cx restricted to 10 or fewer sites |
| Site scoping | siteSearch and siteSearchFilter (i or e) on this route; up to 20 domains, subdomains, or TLDs with include_domains or boost_domains on /v1/web-search | Up to 10 domains configured inside Programmable Search Engine control panel |
| Response shape | Exact customsearch#search JSON: items[] (title, link, snippet, displayLink), searchInformation, queries.nextPage | Same customsearch#search JSON shape |
| Price per 1,000 searches | $1 per 1,000 fast searches (up to 10 results, 937 ms median), no daily cap; $5 per 1,000 default Search API; $0.80 per 1,000 Extract API pages | Was $5 per 1,000; Google Cloud Agent Search replacement is $1.50 to $4.00 per 1,000 plus storage and requires a full POST rewrite |
| Free start | $2 of credit on sign-up, no card required (2,000 fast searches) | Requires Google Cloud billing and Discovery Engine setup |
Why swap to SpecStream instead of rewriting for Vertex Agent Search
Keep GET /customsearch/v1/siterestrict with zero SDK rewrite
Moving to Google Cloud's Discovery Engine (servingConfigs:search) requires creating a GCP project, indexing sites, switching to POST with OAuth/IAM auth, and rewriting every parser. On SpecStream, changing one host keeps your existing GET /customsearch/v1/siterestrict requests and items[] parsing live immediately.
Need multi-site allowlists or domain boosting?
When you previously configured up to 10 sites inside a Google cx engine, you can pass siteSearch for a single site on /customsearch/v1/siterestrict or move to POST /v1/web-search with include_domains (up to 20 domains, subdomains, or TLDs) or boost_domains (prioritize your sites first, then the rest of the web) on the exact same API key (Web Search API reference).
More Google Custom Search migration resources
Google Custom Search 15-stack migration hub
Full before-and-after code for Python, TypeScript, Go, Java, PHP, Ruby, C#, LangChain, n8n, and Cloudflare Workers: Google CSE migration hub and Google CSE migrator tool.
Google Custom Search JSON API guide
Parameter-by-parameter guide for /customsearch/v1: Google Custom Search migration guide.
How SpecStream scores
The same numbers as the benchmarks page, from the official tasks and scorers.
1-line swap from Google Site Restricted JSON API to SpecStream
1. Create an API key in the workspace. New accounts start with $2 of free credit, no card required (2,000 fast searches).
2. Swap the host in cURL (https://www.googleapis.com to https://api.specstream.ai):
# Before (Google Custom Search Site Restricted JSON API)
curl -G https://www.googleapis.com/customsearch/v1/siterestrict \
-d "key=$GOOGLE_API_KEY" -d "cx=$GOOGLE_CX" \
-d "siteSearch=docs.python.org" --data-urlencode "q=asyncio TaskGroup" -d num=10
# After (SpecStream: $1 per 1,000 fast searches, no daily cap)
curl -G https://api.specstream.ai/customsearch/v1/siterestrict \
-d "key=$SPECSTREAM_API_KEY" -d "cx=$GOOGLE_CX" \
-d "siteSearch=docs.python.org" --data-urlencode "q=asyncio TaskGroup" -d num=103. Swap one line in Python:
import os, requests
# Before: URL = "https://www.googleapis.com/customsearch/v1/siterestrict"
URL = "https://api.specstream.ai/customsearch/v1/siterestrict"
res = requests.get(
URL,
params={
"key": os.environ["SPECSTREAM_API_KEY"],
"q": "asyncio TaskGroup",
"siteSearch": "docs.python.org",
"num": 10,
},
timeout=30,
).json()
for item in res.get("items", []):
print(item["title"], item["link"])4. Swap one line in Node.js / TypeScript:
// Before: const URL = "https://www.googleapis.com/customsearch/v1/siterestrict"
const URL = "https://api.specstream.ai/customsearch/v1/siterestrict"
const qs = new URLSearchParams({
key: process.env.SPECSTREAM_API_KEY!,
q: "asyncio TaskGroup",
siteSearch: "docs.python.org",
num: "10",
})
const data = await fetch(`${URL}?${qs}`).then((r) => r.json())
console.log(data.items)5. Test live parity JSON in the Google CSE migrator or compare costs in the Drop-in API converter.
Frequently asked questions
Something we didn't answer? Talk to a human
Does SpecStream answer the exact /customsearch/v1/siterestrict path?
How do I replace a multi-site cx allowlist from Google Programmable Search Engine?
How much does /customsearch/v1/siterestrict cost on SpecStream?
Sources
Google retirement dates and pricing come from developers.google.com and cloud.google.com read Nov 10 to 11, 2026.
- Google Custom Search Site Restricted JSON APIdevelopers.google.com/custom-search/v1/site_restricted_api, read Nov 10, 2026
- Google Custom Search JSON API overviewdevelopers.google.com/custom-search/v1/overview, read Nov 11, 2026
- Google Cloud Agent Search pricingcloud.google.com/generative-ai-app-builder/pricing, read Nov 10, 2026
- SpecStream benchmarksspecstream.ai/benchmarks, read Dec 2, 2026
- SpecStream pricingspecstream.ai/pricing, read Dec 2, 2026




