Skip to the page

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

SpecStreamGoogle Custom Search Site Restricted JSON API
EndpointGET https://api.specstream.ai/customsearch/v1/siterestrict (and /customsearch/v1)GET https://www.googleapis.com/customsearch/v1/siterestrict (retired Jan 8, 2025)
AuthenticationSpecStream 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 scopingsiteSearch and siteSearchFilter (i or e) on this route; up to 20 domains, subdomains, or TLDs with include_domains or boost_domains on /v1/web-searchUp to 10 domains configured inside Programmable Search Engine control panel
Response shapeExact customsearch#search JSON: items[] (title, link, snippet, displayLink), searchInformation, queries.nextPageSame 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 pagesWas $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

More Google Custom Search migration resources

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=10

3. 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?
Yes. GET https://api.specstream.ai/customsearch/v1/siterestrict answers live in Google's customsearch#search JSON shape, alongside GET /customsearch/v1.
How do I replace a multi-site cx allowlist from Google Programmable Search Engine?
For one site, pass siteSearch=example.com on /customsearch/v1/siterestrict. For up to 20 sites, subdomains, or TLDs, pass include_domains (or boost_domains to rank them first) to GET or POST /v1/web-search on the same API key.
How much does /customsearch/v1/siterestrict cost on SpecStream?
$1 per 1,000 fast searches for up to 10 results (80% less than Google's $5 per 1,000), with no 10,000/day limit and $2 of free credit on sign-up with no card required.

Sources

Google retirement dates and pricing come from developers.google.com and cloud.google.com read Nov 10 to 11, 2026.

  1. Google Custom Search Site Restricted JSON APIdevelopers.google.com/custom-search/v1/site_restricted_api, read Nov 10, 2026
  2. Google Custom Search JSON API overviewdevelopers.google.com/custom-search/v1/overview, read Nov 11, 2026
  3. Google Cloud Agent Search pricingcloud.google.com/generative-ai-app-builder/pricing, read Nov 10, 2026
  4. SpecStream benchmarksspecstream.ai/benchmarks, read Dec 2, 2026
  5. SpecStream pricingspecstream.ai/pricing, read Dec 2, 2026