Pricing
Pay per usage
Google Search MCP Server
Expose Google Search to your AI Agents (Claude Desktop, Cursor) as a standardized Model Context Protocol (MCP) Server via SSE HTTP, with Pay-Per-Event billing.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
12 days ago
Last modified
Categories
Share
🔎 Google Search MCP Server — Live Organic Results for AI Agents (SSE) + One-Shot Search
🔗 View on Apify Store | 🇺🇸 English | 🇧🇷 Português
A dual-purpose Google Search Actor. Run it as a persistent MCP (Model Context Protocol) server in Apify Standby mode so AI agents (Claude, GPT, LangChain) can call a google_search tool over SSE/HTTP for real-time organic results — titles, links, snippets. Or run it normally for a one-shot direct search that returns results and exits. When Google blocks the request, it automatically falls back to DuckDuckGo.
✨ Features
- 🤖 MCP server over SSE — Exposes the
google_searchtool to any MCP-compatible AI agent; starts automatically in Apify Standby as a keep-alive service. - ⚡ One-shot direct mode — Run normally for a single search that returns results and exits (also used by Apify's automated quality test).
- 🌐 Real-time organic results — Live Google SERP scraping: title, URL, description/snippet, position.
- 🦆 DuckDuckGo fallback — Retries the query on DuckDuckGo HTML when Google returns a CAPTCHA / bot-block / unusual-traffic page.
- 🛡️ Robust parsing — Multiple Google selector strategies (
.g,.MjjYud, generich3fallback) plus consent/redirect handling. - 🌍 Proxy built-in — Apify Residential US proxy by default (configurable) to reduce anti-bot blocks.
- 🧰 Diagnostic guard (UAG-SG) — If both engines return nothing, writes a structured diagnostic record (and is not charged) instead of silently succeeding with 0 results.
- 💸 Pay-Per-Event — You only pay per successful
search-query. No fixed monthly fee.
⚙️ How It Works — Two Effective Modes
The effective behavior is decided at startup, based on whether the Actor runs in Apify Standby mode (APIFY_META_ORIGIN === STANDBY):
- Standby (MCP server): launches a long-lived Express server with an MCP transport and keeps the container alive to serve agent requests.
- Normal run (one-shot direct): any non-Standby invocation — or
mode: "direct"— performs a single search and exits. This avoids hanging the container on normal/manual runs and the Apify automated quality test (which expects the run to finish). A normal run always does a one-shot search regardless of themodevalue; the persistent MCP server only runs in Standby.
As an MCP server (Standby + SSE): Enable Standby in the Apify Console (its Standby URL becomes your MCP endpoint), then point your MCP client at GET {standby-url}/sse (event stream) and POST {standby-url}/messages (messages). The server exposes one tool, google_search — params query (string, required) and maxResults (number, default 10, 1–20 recommended). Results come back as a formatted text block: [Pos N] Title / Link / Description.
As a one-shot scraper (Direct): Run the Actor normally (or set mode: "direct") with a query. It scrapes Google (DuckDuckGo fallback), pushes results to the dataset, charges one search-query event, and exits.
📥 Input
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
mode | string | ✅ | "direct" | "direct" = one-shot search that returns results and exits. "mcp" = MCP Server (SSE) intent. The persistent server only starts in Standby; a normal run is always one-shot regardless of this value. |
query | string | ❌ | "Apify platform" | Search query to execute immediately in direct mode. Also used by automated autotests. |
maxResults | integer | ❌ | 10 | Maximum number of search results to return per query (min 1, max 50). |
proxyConfiguration | object | ❌ | { "useApifyProxy": true } | Proxy settings. Google requires reliable proxies; residential is recommended. Defaults to Apify Residential, country US. |
Input Example (one-shot direct)
{"mode":"direct","query":"best open source LLM 2026","maxResults":10,"proxyConfiguration":{"useApifyProxy":true,"apifyProxyGroups":["RESIDENTIAL"]}}
📤 Output
Each result pushed to the dataset has these fields:
| Field | Type | Description |
|---|---|---|
title | string | Result title (the SERP h3) |
url | string | Destination URL of the organic result |
description | string | Snippet / meta description ("No description available." if none) |
position | number | 1-based rank within the returned results |
scrapedAt | string | ISO 8601 timestamp of extraction |
source | string | Present only on fallback results — "duckduckgo" |
When the MCP google_search tool is called, the same data is returned to the agent as a formatted text block: [Pos N] Title / Link: url / Description: ....
Output Example
[{"title":"Apify: Full-stack web scraping and data extraction platform","url":"https://apify.com/","description":"Apify is the platform where developers build and run web scrapers and AI agents.","position":1,"scrapedAt":"2026-06-06T12:00:00.000Z"}]
Diagnostic output (no results): if both Google and DuckDuckGo return 0 results, the Actor pushes a single diagnostic record (setup_status: "DIAGNOSTIC_GUIDE" with causes and remediations such as enabling premium residential proxies) and does not charge the search-query event.
📋 Use Cases
- AI agent web search — Live Google access for Claude/GPT/LangChain agents via a standard MCP tool over SSE.
- RAG grounding — Fresh, real-time links and snippets to ground LLM answers in current information.
- Research automation — One-shot searches as a step in larger data pipelines.
- SERP monitoring — Track organic positions for a keyword over time via the
positionfield. - Lead / source discovery — Find pages, articles, and references for a topic at scale.
- Resilient search — Keep getting results even when Google rate-limits, via the DuckDuckGo fallback.
❓ FAQ
Q: What's the difference between MCP mode and direct mode?
A: MCP mode runs a persistent SSE server so AI agents can call the google_search tool repeatedly — it only starts when the Actor is launched in Apify Standby. Direct mode does a single search and exits, and is what runs for any normal/manual run (and the automated quality test).
Q: How do I connect my AI agent to the MCP server?
A: Enable Standby for the Actor, then point your MCP client at the Standby URL — connect to /sse for the event stream and send messages to /messages. The server exposes one tool: google_search (params: query required, maxResults default 10).
Q: Why did I get DuckDuckGo results instead of Google?
A: Google aggressively blocks automated traffic. When it returns a CAPTCHA/unusual-traffic page or fails, the Actor falls back to DuckDuckGo so your run still returns data. Fallback results are tagged with source: "duckduckgo".
Q: Why did a run return zero results, and do I need an API key?
A: Zero results usually means IP blocking on a datacenter proxy or a too-narrow query — enable premium residential proxies and broaden the query. When both engines fail, the Actor writes a diagnostic record and does not charge you. No Google API key or account is required; results are scraped via Apify Proxy. You can request up to 50 results via maxResults (default 10; 1–20 recommended for the MCP tool).
💰 Pricing
This Actor uses Pay-Per-Event (PPE) pricing. You are charged per successful search-query (one charge per completed search that returns results). Searches that return zero results (diagnostic output) are not charged.
➡️ See the current per-event price on the Actor page: apify.com/viralanalyzer/mcp-google-search
🔗 Related Actors
- RSS News Intelligence — Real-time news aggregation
- arXiv Paper Intelligence — Academic paper search
- GitHub Trending Scraper — Trending repositories
- Influencer Discovery Agent — Creator discovery across platforms
📝 Changelog
v1.0 (Current)
- ✅ MCP server over SSE/HTTP exposing the
google_searchtool to AI agents - ✅ Automatic Standby detection (
APIFY_META_ORIGIN) — server in Standby, one-shot otherwise - ✅ Live Google organic results (
title,url,description,position,scrapedAt) with automatic DuckDuckGo fallback (source: "duckduckgo") - ✅ Robust multi-selector parsing + consent/redirect handling; Apify Residential US proxy by default
- ✅ UAG-SG diagnostic guard (no charge when zero results) + Pay-Per-Event billing (
search-query) with owner-skip
🔎 Google Search MCP Server — Resultados Orgânicos ao Vivo para Agentes de IA (SSE) + Busca One-Shot
🇺🇸 English | 🇧🇷 Português
Um Actor de Busca Google com duplo propósito. Execute-o como um servidor MCP (Model Context Protocol) persistente no modo Standby da Apify para que agentes de IA (Claude, GPT, LangChain, agentes próprios) chamem uma ferramenta google_search via SSE/HTTP e recebam resultados orgânicos em tempo real — títulos, links e snippets. Ou execute-o normalmente para uma busca direta one-shot que retorna resultados e encerra. Quando o Google bloqueia a requisição, ele faz fallback automático para o DuckDuckGo, mantendo o fluxo de dados.
✨ Funcionalidades
- 🤖 Servidor MCP via SSE — Expõe a ferramenta
google_searcha qualquer agente de IA compatível com MCP; inicia automaticamente no Standby da Apify como serviço keep-alive. - ⚡ Modo direto one-shot — Execução normal faz uma única busca, retorna resultados e encerra (também usado pelo teste de qualidade automático da Apify).
- 🌐 Resultados orgânicos em tempo real — Scraping ao vivo da SERP do Google: título, URL, descrição/snippet, posição.
- 🦆 Fallback DuckDuckGo — Refaz a busca no DuckDuckGo HTML quando o Google retorna CAPTCHA / bloqueio de bot / tráfego incomum.
- 🛡️ Parsing robusto — Múltiplas estratégias de seletores (
.g,.MjjYud, fallback genérico porh3) + tratamento de consentimento/redirecionamento. - 🌍 Proxy embutido — Proxy Residencial US da Apify por padrão (configurável) para reduzir bloqueios anti-bot.
- 🧰 Guarda de diagnóstico (UAG-SG) — Se ambos os buscadores não retornam nada, grava um registro de diagnóstico (e não cobra) em vez de "suceder" com 0 resultados.
- 💸 Pay-Per-Event — Você paga apenas por
search-querybem-sucedido. Sem mensalidade fixa.
⚙️ Como Funciona — Dois Modos Efetivos
O comportamento efetivo é decidido na inicialização, conforme o Actor rode no modo Standby da Apify (APIFY_META_ORIGIN === STANDBY):
- Standby (servidor MCP): sobe um servidor Express de longa duração com transporte MCP e mantém o container vivo para atender requisições do agente.
- Execução normal (one-shot direto): qualquer invocação fora do Standby — ou
mode: "direct"— faz uma única busca e encerra. Isso evita travar o container em execuções normais/manuais e no teste de qualidade automático da Apify (que espera o run terminar). Uma execução normal sempre faz uma busca one-shot independentemente do valor demode; o servidor MCP persistente só roda em Standby.
Como servidor MCP (Standby + SSE): Ative o Standby no Console da Apify (a URL de Standby vira seu endpoint MCP), depois aponte seu cliente MCP para GET {standby-url}/sse (stream de eventos) e POST {standby-url}/messages (mensagens). O servidor expõe uma ferramenta, google_search — params query (string, obrigatório) e maxResults (number, padrão 10, 1–20 recomendado). Os resultados voltam como bloco de texto formatado: [Pos N] Título / Link / Descrição.
Como scraper one-shot (Direto): Execute o Actor normalmente (ou defina mode: "direct") com uma query. Ele faz scraping do Google (fallback DuckDuckGo), envia os resultados ao dataset, cobra um evento search-query e encerra.
📥 Entrada
| Parâmetro | Tipo | Obrigatório | Padrão | Descrição |
|---|---|---|---|---|
mode | string | ✅ | "direct" | "direct" = busca one-shot que retorna resultados e encerra. "mcp" = intenção de Servidor MCP (SSE). O servidor persistente só inicia em Standby; execução normal é sempre one-shot independente deste valor. |
query | string | ❌ | "Apify platform" | Consulta a executar imediatamente no modo direto. Também usada por autotests automatizados. |
maxResults | integer | ❌ | 10 | Número máximo de resultados por consulta (mín 1, máx 50). |
proxyConfiguration | objeto | ❌ | { "useApifyProxy": true } | Configuração de proxy. O Google exige proxies confiáveis; residencial é recomendado. Padrão: Residencial Apify, país US. |
Veja o exemplo de entrada JSON na seção em inglês acima.
📤 Saída
Cada resultado enviado ao dataset tem os campos: title (título / h3 da SERP), url (URL de destino), description (snippet; "No description available." se não houver), position (posição 1-based), scrapedAt (timestamp ISO 8601) e source (presente apenas em resultados de fallback — "duckduckgo"). Veja a tabela detalhada e o exemplo JSON na seção em inglês acima.
Quando a ferramenta MCP google_search é chamada, os mesmos dados são devolvidos ao agente como um bloco de texto formatado ([Pos N] Título / Link: url / Description: ...).
Saída de diagnóstico (sem resultados): se Google e DuckDuckGo retornarem 0 resultados, o Actor envia um único registro de diagnóstico (setup_status: "DIAGNOSTIC_GUIDE" com causas e soluções como ativar proxies residenciais premium) e não cobra o evento search-query.
📋 Casos de Uso
- Busca web para agentes de IA — Acesso ao Google ao vivo para agentes Claude/GPT/LangChain via ferramenta MCP padrão sobre SSE.
- Grounding para RAG — Links e snippets frescos em tempo real para fundamentar respostas de LLM.
- Automação de pesquisa — Buscas one-shot como etapa de pipelines de dados maiores.
- Monitoramento de SERP — Acompanhe posições orgânicas de uma palavra-chave ao longo do tempo via campo
position. - Descoberta de fontes / leads — Encontre páginas, artigos e referências sobre um tema em escala.
- Busca resiliente — Continue obtendo resultados mesmo quando o Google limita o tráfego, via fallback DuckDuckGo.
❓ Perguntas Frequentes
P: Qual a diferença entre modo MCP e modo direto?
R: O modo MCP roda um servidor SSE persistente para agentes de IA chamarem a ferramenta google_search repetidamente — ele só inicia quando o Actor é lançado em Standby na Apify. O modo direto faz uma única busca e encerra, e é o que roda em qualquer execução normal/manual (e no teste de qualidade automático).
P: Como conecto meu agente de IA ao servidor MCP?
R: Ative o Standby do Actor e aponte seu cliente MCP para a URL de Standby — conecte em /sse para o stream de eventos e envie mensagens para /messages. O servidor expõe uma ferramenta: google_search (params: query obrigatório, maxResults padrão 10).
P: Por que recebi resultados do DuckDuckGo em vez do Google?
R: O Google bloqueia tráfego automatizado de forma agressiva. Quando ele retorna uma página de CAPTCHA/tráfego incomum ou falha, o Actor faz fallback para o DuckDuckGo para que o run ainda retorne dados. Resultados de fallback têm source: "duckduckgo".
P: Por que uma execução retornou zero resultados e preciso de chave de API?
R: Zero resultados normalmente significa bloqueio de IP em proxy datacenter ou consulta estreita demais — ative proxies residenciais premium e amplie a consulta. Quando ambos os buscadores falham, o Actor grava um registro de diagnóstico e não cobra. Nenhuma chave de API ou conta Google é necessária; os resultados são extraídos via Apify Proxy. Você pode pedir até 50 resultados via maxResults (padrão 10; 1–20 recomendado para a ferramenta MCP).
💰 Preços
Este Actor usa precificação Pay-Per-Event (PPE). Você é cobrado por search-query bem-sucedido (uma cobrança por busca concluída que retorna resultados). Buscas que retornam zero resultados (saída de diagnóstico) não são cobradas.
➡️ Veja o preço por evento atual na página do Actor: apify.com/viralanalyzer/mcp-google-search
🔗 Actors Relacionados
- RSS News Intelligence — Agregação de notícias em tempo real
- arXiv Paper Intelligence — Busca de artigos acadêmicos
- GitHub Trending Scraper — Repositórios em alta
- Influencer Discovery Agent — Descoberta de criadores em várias plataformas
📝 Changelog
v1.0 (Atual)
- ✅ Servidor MCP sobre SSE/HTTP expondo a ferramenta
google_searcha agentes de IA - ✅ Detecção automática de Standby (
APIFY_META_ORIGIN) — servidor em Standby, one-shot caso contrário - ✅ Resultados orgânicos ao vivo do Google (
title,url,description,position,scrapedAt) com fallback automático para DuckDuckGo (source: "duckduckgo") - ✅ Parsing robusto com múltiplos seletores + tratamento de consentimento/redirecionamento; Proxy Residencial US da Apify por padrão
- ✅ Guarda de diagnóstico UAG-SG (sem cobrança quando zero resultados) + cobrança Pay-Per-Event (
search-query) com owner-skip
