SerpBase
Back to Blog

Google Custom Search JSON API Alternative: It Closes to Everyone in 2027

Google's Custom Search JSON API is closed to new customers and ends for existing ones on January 1, 2027. A drop-in replacement, field mapping and code.

December 3, 2026
By SerpBase Team3 min read

Short answer: yes — Google's Custom Search JSON API is closed to new customers, and Google says existing customers have until January 1, 2027 to move to something else. If you used it to get Google results in your code, a SERP API such as SerpBase's /google/search returns the same kind of data (title, link, snippet) plus the rest of the results page (People Also Ask, AI Overview, news and local results).

What Google says

From Google's Custom Search JSON API overview, read on 2 December 2026:

  • The API "is closed to new customers".
  • Existing customers have until January 1, 2027 to transition.
  • Per its reference, a query returns at most 10 results (num 1–10) and never more than 100 in total (start + num ≤ 100).

The replacement request

curl -X POST 'https://api.serpbase.dev/google/search' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{"q":"python asyncio tutorial","gl":"us","hl":"en","device":"desktop"}'

No search engine ID (cx) is needed. To limit results to certain sites, put site: in the query instead — see searching several sites at once.

What came back

On 2 December 2026 page 1 returned 8 organic results plus an ai_overview and 3 inline_videos; page 2 ("page": 2) returned 10 more organic results.

{
  "status": 0,
  "credits_charged": 1,
  "organic": [
    {
      "rank": 1,
      "title": "Exploring Python's asyncio for Asynchronous Programming ...",
      "link": "https://dev.to/emmanuelj/exploring-pythons-asyncio-for-async...",
      "display_link": "https://dev.to › emmanuelj › e...",
      "snippet": "..."
    }
  ],
  "ai_overview": {"summary": "Python’s asyncio is a built-in library for writing single-threaded concurrent code ..."}
}

Field mapping

Custom Search JSON APISerpBase /google/search
items[].titleorganic[].title
items[].linkorganic[].link
items[].snippetorganic[].snippet
items[].displayLinkorganic[].display_link
start=11"page": 2
cx (site list)site: operators in q
gl, hlgl, hl
—people_also_ask, ai_overview, top_stories, local_results, related_searches …

Python: a drop-in helper

import requests

def google_items(q, page=1, gl="us", hl="en"):
    """Returns a list shaped like Custom Search 'items'."""
    r = requests.post(
        "https://api.serpbase.dev/google/search",
        headers={"X-API-Key": "YOUR_API_KEY"},
        json={"q": q, "page": page, "gl": gl, "hl": hl, "device": "desktop"},
        timeout=60,
    ).json()
    if r["status"] != 0:
        raise RuntimeError(r.get("error"))
    return [{"title": o["title"], "link": o["link"], "snippet": o.get("snippet", ""),
             "displayLink": o.get("display_link", "")} for o in r.get("organic", [])]

for page in (1, 2):
    for item in google_items("python asyncio tutorial", page):
        print(page, item["title"][:70])

Things that trip people up

  • Results are Google's public page, not your custom engine. Custom Search let you configure sites and ranking in a control panel; here you express that in the query (site:, -site:).
  • The organic count per page varies. Google's page held 8 organic results on page 1 and 10 on page 2 in our test; other modules take the remaining space.
  • rank restarts on every page. Number results yourself if you need an overall position.
  • Device matters. Leave out device to get the phone layout, or send "desktop"; the two can rank differently.

Cost and docs

A Google search is 1 credit, $0.25–$0.50 per 1,000 depending on the pack. Failed requests are not charged, and new accounts get 500 free credits — see what you get for free.