Ends on 1 January 2027

A Google Custom Search API alternative before it closes

Google's Custom Search JSON API is closed to new customers, and existing customers have until January 1, 2027 to move. Here is what changes if you move a search integration to Pipefetch, field by field, and what it does not replace.

Side by side

Custom Search JSON APIPipefetch
AvailabilityClosed to new customers; existing customers until January 1, 2027Open: sign in with GitHub and create a key
SetupAn API key and a Programmable Search Engine, whose ID goes in cxOne API key from the dashboard
What it searchesA Programmable Search Engine, which Google describes as one "for your website, your blog, or a collection of websites"Google's results for a search, as a visitor who is not signed in sees them in the country you choose
Limiting to sitesSet in the search engineGoogle's own operators in q, such as site:example.com
Results per requestUp to 10, and never beyond the first 100 results of a searchAbout 10 organic results: the first page, with no further pages
Fields per resulttitle, link and snippet, among othersposition, title, url, displayedUrl, domain, description and date, plus the related searches
Price100 queries a day free, then $5 per 1,000 queries, up to 10,000 a day (existing customers)1 credit a search, $1.59 to $3.00 per 1,000 credits; searches with no results are free
OfficialYes, Google's own APINo: an independent service, not affiliated with Google

Google's side as its Custom Search JSON API overview and reference state it, read in November 2026. Other API changes like this one are on the API changes page.

The code, before and after

A Custom Search request sends the key, the search engine ID and the search, and reads items:

Python
import os
import requests

res = requests.get(
    "https://www.googleapis.com/customsearch/v1",
    params={
        "key": os.environ["GOOGLE_API_KEY"],
        "cx": os.environ["GOOGLE_SEARCH_ENGINE_ID"],
        "q": "best crm software",
    },
    timeout=30,
)
res.raise_for_status()
for item in res.json().get("items", []):
    print(item["title"], item["link"], item["snippet"])

The same search through Pipefetch sends the search, and optionally a country and a language, and reads data.results: link becomes url and snippet becomes description.

Python
import os
import requests

res = requests.get(
    "https://pipefetch.com/v1/google/search",
    params={"q": "best crm software", "country": "US", "lang": "en"},
    headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
    timeout=90,
)
if res.status_code in (404, 502):
    print("No results, or Google refused the search: not charged")
else:
    res.raise_for_status()
    for r in res.json()["data"]["results"]:
        print(r["title"], r["url"], r["description"])

If your search engine was limited to a few sites, put them in the search with Google's operators: site:example.com, or site:a.com OR site:b.com. The reference lists every field, and the guide on getting Google search results in Python covers the other routes, Google's own suggestions among them.

What it does not replace

  • Results past the first page

    Custom Search pages through up to the first 100 results. Pipefetch returns the first page, about 10 organic results, and no more.

  • A search engine you configure

    Refinements, promotions and the sites list of a Programmable Search Engine have no counterpart. You get what Google shows for the search you send.

  • Images and the rest of the page

    Image search, ads, AI Overviews, People also ask and the knowledge panel are not included. The organic results and the related searches are.

  • An official agreement

    Custom Search is Google's own API under Google's terms. Pipefetch is independent, and Google sometimes refuses a search, which then costs nothing and can be sent again.

Questions and answers

When does the Custom Search JSON API stop working?

Google's overview page says it is closed to new customers and that existing customers have until January 1, 2027 to transition to an alternative solution. Its pricing applies until the service is discontinued on that date.

What does Google suggest instead?

The same page names Vertex AI Search for searching up to 50 domains, and a contact form for a full web search solution. For an AI application there is also Grounding with Google Search in the Gemini API, which answers from current web content with sources.

Can Pipefetch search only my own site, like a Programmable Search Engine?

Only through Google's site: operator in the search, for example "site:example.com pricing". It returns what Google shows for that search, not a search engine you configure: there are no refinements, promotions or custom ranking.

Does it return more than 10 results?

No. One request returns the first page of organic results, about 10, and there are no further pages. If you paged through up to 100 results, that is a real difference.

What if Google refuses a search?

It happens now and then. The request answers 502 upstream_error, costs nothing and can be sent again. A search with no results answers 404 and costs nothing too.

Is this allowed by Google's terms?

Pipefetch reads Google's results page for you, which is automated access that Google's terms and spam policies address. The guide on getting Google search results in Python quotes them, so you can judge for your own project.

Run your own searches through it

Sign in, copy your key and call an endpoint. Your account starts with 100 free credits.