Google Search (via Apify)
io.github.retracnv1.0.0Updated Oct 6, 2026
Google web search for AI agents: title, link and snippet in Custom Search JSON API format.
Overview
Lets an assistant run Google web and image searches through Apify and get results in Google Custom Search JSON API format.
- What it does
- Provides Google web search results as items with title, link, displayLink and snippet, plus image search, in the same JSON shape as Google's Custom Search JSON API. It is a hosted Apify Actor exposed over a remote MCP endpoint, and it also offers drop-in REST, Open WebUI and SearXNG-compatible routes. Searches use Google's plain Web results view, without AI Overview, ads or video and forum boxes.
- When to use it
- Use it when an assistant needs live Google search results, or when existing code or clients built against Google's Custom Search JSON API need a replacement endpoint. It suits agents that want search snippets rather than full page content.
- Requirements
- A remote MCP endpoint at mcp.apify.com; no local runtime is needed. A free Apify account and an Apify API token are required, sent as the Authorization header in the form Bearer . Network access to Apify is needed.
Installation
In SourceWeft
- Open Google Search (via Apify) in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Other MCP clients
Add this to your client's mcpServers config.
{
"mcpServers": {
"google-search": {
"type": "http",
"url": "https://mcp.apify.com/?tools=automationnation/google-custom-search-api"
}
}
}README
Google Custom Search JSON API alternative: same requests, same JSON
Google Custom Search API Alternative is an Apify Actor that replaces Google's Custom Search JSON API, which Google has closed to new customers and retires on 1 January 2027. It answers the same /customsearch/v1 requests with the same JSON (items with title, link, displayLink and snippet, plus image search), built from live Google results, at $5 per 1,000 searches with no daily cap.
Price: $5 per 1,000 searches of up to 10 results ($4 on Gold and above) · Run it: https://apify.com/automationnation/google-custom-search-api · Guide: https://retracn.github.io/automationnation-actors/google-custom-search-api/
Quick facts
- Drop-in endpoint: replace https://www.googleapis.com/customsearch/v1 with https://automationnation--google-custom-search-api.apify.actor/customsearch/v1 and send your Apify token (token=… or Authorization: Bearer) instead of key=.
- Same parameters: q, num, start, gl, hl, lr, cr, safe, dateRestrict, siteSearch, exactTerms, excludeTerms, orTerms, fileType and searchType=image with its image filters; cx is accepted and ignored.
- Open WebUI: pick the External web search engine with URL https://automationnation--google-custom-search-api.apify.actor/search and your Apify token as the key, to keep Google results now that Google PSE is closed to new customers.
- SearXNG-compatible route for AnythingLLM and other SearXNG clients: https://automationnation--google-custom-search-api.apify.actor/searxng?token=YOUR_APIFY_TOKEN returns Google results in SearXNG's JSON format.
- Same JSON: kind, queries.request and nextPage, searchInformation and items[] with title, htmlTitle, link, displayLink, snippet, htmlSnippet and formattedUrl (image items add mime and image.contextLink, width, height, byteSize, thumbnailLink).
- Web searches use Google's "Web" results view: ten plain results per page without the AI Overview, ads or video and forum boxes, close to what the API returned.
- Differences: it searches the whole web (pass site lists as siteSearch or site: operators), totalResults is a lower bound, there is no pagemap, and a request takes about 4–10 seconds.
- Price: $5 per 1,000 searches of up to 10 results, the price Google charged; searches with no results are free and there is no daily cap.
Use it as a drop-in Custom Search JSON API
Change the endpoint and the key; keep the rest of your code:
Python (examples/cse_requests.py) and JavaScript (examples/cse_fetch.mjs) versions are in examples/. The response is the API's JSON: items[].title, link, displayLink, snippet, queries.nextPage and searchInformation; searchType=image works too.
Example input
Run it from code
REST API
Python — see examples/python_example.py
JavaScript — see examples/node_example.mjs
Use it with AI agents (MCP)
Hosted MCP server URL (Claude, ChatGPT, Cursor and other clients with remote MCP support):
Local config for Claude Desktop / Cursor — mcp/claude_desktop_config.json:
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.
Do I have to rewrite my code? No. Change the endpoint to https://automationnation--google-custom-search-api.apify.actor/customsearch/v1 and send an Apify API token instead of the Google key; the parameters and the JSON response stay the same.
Can I keep my Programmable Search Engine's site list? Not through cx, which is ignored. Pass one site as siteSearch, or several in the query as site:a.com OR site:b.com.
What does it cost? $5 per 1,000 searches of up to 10 results ($4.50 on Silver, $4 on Gold and above), with no daily cap. Google charged $5 per 1,000 after 100 free queries a day; Apify's free plan includes $5 of monthly credit, about 1,000 searches.
More from AutomationNation
- AI Visibility Tracker — $0.05 per answer checked ($0.04 on Gold) + $0.50 per optional report · GitHub examples
- Google Jobs Scraper — $2 per 1,000 jobs ($1.50 on paid plans) + $0.03 per search · GitHub examples
- YouTube Transcript Scraper — $1.50 per 1,000 transcripts ($1.20 on Gold and above) · GitHub examples
- Google Shopping Scraper — $1 per 1,000 products ($0.80 on Gold and above) · GitHub examples
- Google Flights Scraper — $0.20 per 1,000 flights ($0.16 on Gold and above) · GitHub examples
- Google Hotels Scraper — $1 per 1,000 hotels ($0.80 on Gold and above) · GitHub examples
- Google Ads Transparency Scraper — $1 per 1,000 ads ($0.80 on Gold and above) · GitHub examples
- Google News Scraper — $1 per 1,000 articles ($0.80 on Gold and above) · GitHub examples
- Google Images Scraper — $0.25 per 1,000 images ($0.20 on Gold and above) · GitHub examples
- Google Videos Scraper — $1 per 1,000 videos ($0.80 on Gold and above) · GitHub examples
- Google Trends Scraper — $1 per 1,000 keyword reports ($0.27–$0.90 on paid plans) · $0.50 per 1,000 trending searches · GitHub examples
- App Store Reviews Scraper — $0.08 per 1,000 reviews ($0.05–$0.07 on paid plans) · GitHub examples
- Google Play Reviews Scraper — $0.08 per 1,000 reviews ($0.05–$0.07 on paid plans) · GitHub examples
- AEO & GEO Tracker — Google AI Overview Citation Checker — $0.04 per keyword ($0.032 on Gold), plus $2 per run from 17 Nov 2026; $0.01 per keyword until 16 Oct 2026 · GitHub examples
- Google Maps Leads Scraper — $0.03 per lead ($0.024 on Gold); $0.08 per business found with the no-website or unclaimed filters · GitHub examples
- Google Maps Leads Scraper UK — $0.05 per lead ($0.04 on Gold) · GitHub examples
- App Store & Google Play Reviews Scraper + AI — $0.05 per app report ($0.04 on Gold) · GitHub examples
- UK Companies House Leads — Filing Signals & AI Outreach — $0.008 per lead
- Contact Waterfall Enrichment — Emails & Directors — $0.015 per company
- All Actors and guides · AI visibility trackers compared · Google Jobs scrapers compared · Google Trends scrapers compared · App Store review scrapers compared · Google Play review scrapers compared · YouTube transcript scrapers compared · Google Flights scrapers compared · Google Hotels scrapers compared · Google Ads Transparency scrapers compared · Google Shopping scrapers compared · Google News scrapers compared
This repository holds usage examples. The scraper itself runs on the Apify platform; you need a free Apify account and API token. Examples are MIT licensed.
Source: README.md at commit ba93a3c
Tools
0Version history
1- v1.0.0LatestOct 6, 2026

