google_search
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:
Create a Programmable Search Engine (CSE)
Open Programmable Search Engine: programmablesearchengine.google.com/about
Click Get started → create a new search engine.
Choose what to search:
Entire web (recommended for broad queries), or
Specific sites (restrict to one or more domains).
After creating, go to your CSE Control Panel → copy the Search engine ID (also shown as cx). You’ll pass this as
searchEngineIdto the tool.
Create an API Key (Google Cloud)
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.
Copy the generated API key and store it securely.
(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 textsearchEngineId— your CSE ID (cx)apiKey— your Google API keynum— number of results (1–10, default 10)
Tools
google_search
google_searchSearch the web with the Custom Search API.
Input
query
string
Yes
The search query to execute
searchEngineId
string
Yes
Your CSE ID (aka cx)
num
string
No
Number of results to return (default: 10, max: 10)
apiKey
string
Yes
Google API key
Output
items
json
Search result items
searchInformation
json
Search 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
cxorkeyVerify 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.
Notes
Category:
toolsType:
google_searchUses 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).
Was this helpful?
