Skip to main content
Piloterr
Back to blog
November 12, 2026

Google Custom Search JSON API shuts down in 2027: migrate to Google Search

TL;DR: Google's Custom Search JSON API is closed to new customers and shuts down for existing users on January 1, 2027. If your app or pipeline sends a query and reads Google results as JSON from the whole web, Google Search on Piloterr keeps that pattern: query in, structured SERP out. Most gl / hl / lr filters map 1:1. For SERP-only workloads at volume, the same team ships Autom.dev, a dedicated SERP API with the same parameter style.

Migrating is a few lines of code, not a rewrite.

What is shutting down

Google states on the Custom Search JSON API overview:

  • The API is not available for new customers.
  • Existing customers can keep using it until January 1, 2027.
  • Until then, pricing stays the same: 100 free queries per day, then $5 per 1,000 queries, capped at 10k queries per day.

For searching up to about 50 domains, Google points to Vertex AI Search (also framed as Agent Search in some docs). For results from the entire web, there is no self-serve Google product. Google only offers an interest form.

Source: Google for Developers: Custom Search JSON API.

Custom Search covered several jobs. They do not share one successor.

What you use Custom Search forWhat to use instead
A search box on your own siteGoogle's Programmable Search Element, or a site search product (Algolia, Typesense, Meilisearch)
A known set of domains or your own corpus inside Google CloudGoogle Agent Search / Vertex AI Search (Google's "up to ~50 domains" path)
Whole-web results as JSON for an app, agent, or pipelineGoogle Search on Piloterr, or Autom.dev if you only need SERP
AI-generated answers with citations (Google AI Mode)Google AI Mode, optionally paired with organic search
Deep SEO SERP work (ads, AI Overviews, many pages)Google Search with page pagination, plus Images / Autocomplete endpoints as needed
Same query pattern on Bing, Brave, Yahoo, DuckDuckGo (or multi-engine failover)Autom.dev: Google plus Bing, Brave, Yahoo, DuckDuckGo, Baidu on one SERP stack

The rest of this guide is for the whole-web JSON case: you currently call customsearch/v1 with "Search the entire web" enabled. Code samples use Piloterr; Autom.dev is the same idea with a different host when SERP is all you need.

Piloterr or Autom.dev?

Autom.dev is our SERP-focused sub-product. Same family as Piloterr, built for teams whose job is search results: SEO rank tracking, agents that only need SERP JSON, multi-engine lookup at volume. Endpoint shape is familiar: https://api.autom.dev/v1/google/search, x-api-key, query / gl / hl / tbs / page. See the Autom Google Search docs. Pricing is SERP-specialized (pay-per-use credits, no CSE-style 10k/day wall).

Pick Piloterr when you stay in the Google family: Google Search, Images, Autocomplete, AI Mode.

Pick Autom.dev when you want Google and other engines (Bing, Brave, Yahoo, DuckDuckGo, Baidu) on one account, or SERP-only volume pricing.

Same team. Same migration pattern from Custom Search. Different surface depending on whether you need Google-only or multi-engine SERP.

Same contract you already built around: send a query, get ranked results back as JSON. Compared to Custom Search:

Custom Search JSON APIPiloterr Google Search
AvailabilityClosed to new customers; ends Jan 1, 2027Open
SetupAPI key + Programmable Search Engine (cx)One x-api-key
Cost model100 free/day, then $5 / 1k, hard 10k/day cap1 credit per request
Daily hard cap10k queriesCredit-based plans, no CSE-style 10k/day ceiling
Country / languagegl, lr, hlSame names: gl, hl, lr, plus cr
Local resultsCountry-levelCountry + optional city location / uule
Site filtersiteSearch / siteSearchFilterGoogle operators in query (site:, -site:, …)
Date filterdateRestrict (d7, w1, …)tbs (qdr:d, qdr:w, qdr:m, qdr:y)
PaginationLimitedpage for next result pages
Extra payloadOrganic items + search metaOrganic results, knowledge graph, related searches, pagination
Authkey query paramx-api-key header

Docs: Google Search API · API reference. GET and POST are both supported.

How to switch from Custom Search to Piloterr

You still send a query and read JSON. After you remap a handful of fields, the code that consumes titles and links keeps working.

  1. Create an account at app.piloterr.com and copy your API key.
  2. Map request parameters and response fields with the tables below.
  3. Point the HTTP call at https://api.piloterr.com/v2/google/search.

Request parameter mapping

Piloterr parameterWhat it doesCustom Search equivalent
querySearch string (required). Supports Google operatorsq
glCountry bias (us, fr, uk, …)gl
hlUI / result languagehl
lrRestrict to language(s), e.g. lang_frlr
crRestrict to country(ies), e.g. countryFRClosest: country filters / engine config
tbsRecency: qdr:h, qdr:d, qdr:w, qdr:m, qdr:ydateRestrict
location / uuleCity-level SERPNo direct CSE equivalent
google_domaingoogle.com, google.fr, …Engine locale / domain settings
pageResult page numberPartial / limited in CSE
safeSafeSearch active / offsafe
x-api-key headerAuthkey
Not requiredcx (search engine ID)

Site include/exclude that lived in siteSearch becomes part of the query: site:example.com coffee or -site:pinterest.com coffee.

Response field mapping

Custom SearchPiloterr Google Search
items[].titleorganic_results[].title
items[].linkorganic_results[].link
items[].snippetorganic_results[].snippet
items[].displayLinkorganic_results[].domain
items[].formattedUrlorganic_results[].displayed_link
searchInformation.totalResultssearch_information.total_results
organic_results[].position, knowledge_graph, related_searches, pagination

Python: before and after

Before: Custom Search JSON API:

Python
import os
import requests

resp = requests.get(
    "https://www.googleapis.com/customsearch/v1",
    params={
        "key": os.environ["GOOGLE_API_KEY"],
        "cx": os.environ["SEARCH_ENGINE_ID"],
        "q": "best coffee shops",
        "gl": "fr",
        "hl": "fr",
        "lr": "lang_fr",
        "num": 10,
    },
    timeout=30,
)
for item in resp.json().get("items", []):
    print(item["title"], item["link"])

After: Piloterr Google Search:

Python
import os
import requests

resp = requests.post(
    "https://api.piloterr.com/v2/google/search",
    headers={"x-api-key": os.environ["PILOTERR_API_KEY"]},
    json={
        "query": "best coffee shops",
        "gl": "fr",
        "hl": "fr",
        "lr": "lang_fr",
    },
    timeout=30,
)
for result in resp.json().get("organic_results", []):
    print(result["position"], result["title"], result["link"])

What actually changed:

  • Endpoint URL
  • Auth moved from key (+ cx) to the x-api-key header
  • q → query
  • items → organic_results (field names like title and link stay familiar)
  • gl / hl / lr keep the same values

GET works the same way if you prefer query strings over a JSON body.

On Autom.dev the swap is the same idea: drop cx, send query + gl / hl, authenticate with x-api-key, and point at https://api.autom.dev/v1/google/search (library). Response fields stay in the organic_results style.

Beyond Google: Bing, Brave, Yahoo, DuckDuckGo

Custom Search was Google-only. Plenty of pipelines now want a second index for redundancy, geo coverage, or cross-engine SEO. On Autom.dev the same query-in / JSON-out pattern works across engines:

On Piloterr, stay Google-side with AI Mode, Images, and Autocomplete on the same API key as Google Search.

Migrate before January 1, 2027

The Custom Search JSON API stops at the start of 2027. Google does not offer a self-serve whole-web JSON replacement. If your code already does "query → JSON results," you can move to Google Search (or Autom.dev for SERP-only / multi-engine) by changing the endpoint, dropping cx, and renaming a few fields.

Need help sizing credits or checking a production query mix? Start from the Google Search docs, compare with Autom.dev pricing, or open a conversation from the site.

FAQ

When does the Google Custom Search JSON API shut down?

Google discontinues it on January 1, 2027. It is already closed to new customers; existing customers can use it until that date.

Is there an official Google search API for the whole web?

Not a self-serve one. Google's documented options cover site / limited-domain search (Agent Search / Vertex AI Search) and enterprise grounding. For whole-web programmatic results, Google points to an interest form.

What is the best Custom Search JSON API alternative?

It depends on the job. Site search → a site search product. Up to ~50 domains in Google Cloud → Agent Search / Vertex AI Search. Whole-web JSON for apps and pipelines → a SERP API such as Piloterr Google Search. High-volume SERP-only (including engines beyond Google) → Autom.dev.

Piloterr or Autom.dev: which one?

Same company. Piloterr covers the Google SERP family (Search, Images, Autocomplete, AI Mode). Autom.dev is the SERP sub-product for Google plus Bing, Brave, Yahoo, DuckDuckGo, and Baidu, with volume pricing. If you only need Google JSON results, either works. If you need other engines or multi-engine failover, use Autom.dev.

Do I still need a Programmable Search Engine (cx)?

No. Piloterr Google Search and Autom.dev only need your API key and a query.

Does Piloterr Google Search support pagination?

Yes. Pass page (1, 2, …). Custom Search was much more constrained here; multi-page SERP jobs are a common reason teams leave CSE early.

How do I filter by date after migration?

Replace dateRestrict with tbs: last day qdr:d, week qdr:w, month qdr:m, year qdr:y. Exact calendar ranges from CSE do not map 1:1; relative windows cover most monitoring use cases.

More to read

Guides and news about web scraping, proxies, and data extraction.

Scraping

Web scraping for automotive: tracking car prices and parts across AutoScout24, Mobile.de, Leboncoin, and Autodoc

How automotive pricing platforms use scraping APIs to monitor used-car listings on AutoScout24, Mobile.de, and Leboncoin, and parts prices across Autodoc's 30+ national shops. Pipeline design, API examples, and a Python script.

Josselin Liebe
Josselin Liebe
Read
Scraping

Web scraping for brand protection: hunting counterfeits on AliExpress, Alibaba, and Amazon

How brand protection platforms use scraping APIs to detect counterfeit listings, capture seller evidence, and monitor re-listings across AliExpress, Alibaba, Amazon, and other marketplaces. Pipeline design, API examples, and a Python script.

Josselin Liebe
Josselin Liebe
Read
Scraping

Migrating from NetNut: what to do after the network takedown

Google took action against the NetNut/Popa proxy network alongside the FBI and Lumen. How to rethink your scraping stack without managing proxies yourself.

Josselin Liebe
Josselin Liebe
Read

Ready to get started?

Your web scraping API is one click away. Start with +500 credits, no infrastructure to set up, no proxies to manage, and no credit card required.

  • +500 credits
  • No credit card required
  • All endpoints included