Gen6

Google Search

Search the web

Google Search is the world’s most widely used search engine. This block lets your agents fetch live results via Google’s Custom Search JSON API (often called the Google Search API) and use them inside workflows for research, fact-checking, and data gathering.


Setup (one-time)

Follow these steps to get a Search Engine ID (searchEngineId / cx) and an API key:

1) Create a Programmable Search Engine (CSE)

  1. Open Programmable Search Engine: programmablesearchengine.google.com/about
  2. Click Get started → create a new search engine.
  3. Choose what to search:
    • Entire web (recommended for broad queries), or
    • Specific sites (restrict to one or more domains).
  4. After creating, go to your CSE Control Panel → copy the Search engine ID (also shown as cx).
    You’ll pass this as searchEngineId to the tool.

2) Enable the Google Search API

  1. In your Google Cloud project, enable Custom Search JSON API (sometimes listed as google_search_api or Custom Search API).
  2. Ensure Billing is enabled on the project (Google may require billing for sustained usage or higher quotas).

3) Create an API Key (Google Cloud)

  1. In the same Google Cloud project (you can reuse a project you already use for BigQuery):
    • Go to APIs & Services → Credentials.
    • Click Create credentials → API key.
  2. Copy the generated API key and store it securely.
  3. (Optional but recommended) Restrict the key:
    • API restrictions: limit to the Custom Search API.
    • Application restrictions: HTTP referrers or IPs as appropriate.

Usage Instructions

This tool queries Google via the Custom Search JSON API. You’ll provide:

  • query — the search text
  • searchEngineId — your CSE ID (cx)
  • apiKey — your Google API key
  • num — number of results (1–10, default 10)

Tools

Search the web with the Custom Search API.

Input

ParameterTypeRequiredDescription
querystringYesThe search query to execute
searchEngineIdstringYesYour CSE ID (aka cx)
numstringNoNumber of results to return (default: 10, max: 10)
apiKeystringYesGoogle API key

Output

ParameterTypeDescription
itemsjsonSearch result items
searchInformationjsonSearch metadata

Troubleshooting

  • 403 / Daily limit exceeded
    You’ve hit your free quota or billing isn’t enabled. Enable billing or raise quota in your Cloud project.
  • 400 / Invalid cx or key
    Verify your Search engine ID and API key; ensure the key is restricted to the correct API.
  • Empty results with broad queries
    Check your CSE settings: if restricted to specific sites, switch to Search the entire web or add more sites.
  • num > 10 ignored
    The API caps each call at 10 results; paginate if you need more.
  • Referrer/IP restrictions blocking calls
    If you restricted the key, confirm your requests match the allowed referrers or IP addresses.

Screenshot

Google search block screenshot

Notes

  • Category: tools
  • Type: google_search
  • Uses Google’s Custom Search JSON API behind the scenes.
  • Requires a Programmable Search Engine (CSE) and an API key created in your Google Cloud project (a project that also hosts BigQuery is fine).
Google Search