Google Custom Search JSON API shutting down in 2027? A drop-in replacement
Google has closed its Custom Search JSON API to new customers, and existing customers have until 1 January 2027 to move. Google Custom Search API Alternative on Apify answers the same /customsearch/v1 requests with the same JSON (items with title, link, displayLink and snippet, plus searchType=image), built from live Google results, for $5 per 1,000 searches, the price Google charged, with no daily cap. Existing code changes two things: the endpoint (https://automationnation--google-custom-search-api.apify.actor/customsearch/v1) and the key (an Apify token instead).
Open Google Custom Search API Alternative on Apify $5 per 1,000 searches of up to 10 results ($4 on Gold and above)
Step by step
- Create a free Apify account. Sign up at apify.com. The free plan includes $5 of monthly credit, about 1,000 searches, and needs no credit card.
- Copy your API token. In Apify Console, open Settings → API & Integrations and copy the personal API token.
- Change the endpoint. Replace https://www.googleapis.com/customsearch/v1 with https://automationnation--google-custom-search-api.apify.actor/customsearch/v1. The parameters stay the same: q, num, start, gl, hl, lr, cr, safe, dateRestrict, siteSearch, exactTerms, excludeTerms, orTerms, fileType and searchType=image.
- Swap the key for the token. Send token=YOUR_APIFY_TOKEN, or the header Authorization: Bearer YOUR_APIFY_TOKEN, instead of key=. cx can stay; it's accepted and ignored.
- Keep your parsing code. The response has the API's shape: items[].title, htmlTitle, link, displayLink, snippet, htmlSnippet, formattedUrl, queries.request and nextPage, and searchInformation. Image items add mime and image.contextLink, width, height, byteSize and thumbnailLink.
- Check the differences. It searches the whole web, so pass a Programmable Search Engine's site list as siteSearch or site: operators. totalResults is a lower bound because Google no longer shows counts, there is no pagemap, and a request takes about 5–15 seconds instead of under one.
Do it from code
Python
# pip install apify-client
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("automationnation/google-custom-search-api").call(run_input={
"queries": [
"best project management software"
],
"maxResultsPerQuery": 10
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item.get("title"), item.get("link"), item.get("displayLink"), item.get("snippet"))
REST API (cURL)
curl -X POST "https://api.apify.com/v2/acts/automationnation~google-custom-search-api/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"queries": ["best project management software"], "maxResultsPerQuery": 10}'
From an AI assistant (MCP)
Add this MCP server URL to Claude, ChatGPT or Cursor and ask in plain English:
https://mcp.apify.com?tools=automationnation/google-custom-search-api
Alternatives
Other options: Vertex AI Search, which Google suggests for searching up to 50 domains (a different API); SERP APIs such as SerpApi, with their own JSON formats and usually monthly plans; or Google search Actors on Apify that return their own formats. Microsoft retired the Bing Search APIs in August 2025.
FAQ
When does the Custom Search JSON API stop working?
Google closed it to new customers and says existing customers have until 1 January 2027 to move to an alternative.
Is the JSON really the same?
Yes for what most code reads: kind, items[] with title, link, displayLink, snippet, htmlSnippet and formattedUrl, queries.nextPage and searchInformation. pagemap isn't included, and totalResults is a lower bound.
What does it cost?
$5 per 1,000 searches of up to 10 results ($4.50 on Silver, $4 on Gold and above). Searches that return nothing are free, and there is no daily cap.
Does it work with my Programmable Search Engine (cx)?
cx is accepted so existing code doesn't break, but it isn't read: the search covers the whole web. Restrict it with siteSearch or site: operators in q.
How fast is it?
Usually 5–15 seconds per request, because each request fetches live Google results. Send requests in parallel for throughput.
Written by AutomationNation, the developer of Google Custom Search API Alternative. Prices checked October 2026.