Font Size:
Ask Joget AI

Google Web Search

Introduction

The Google Web Search tool lets an agent run a live web search and include up-to-date results in its response, so the agent is not limited to information it was trained on or data stored in the app.

Note
You need two credentials from Google before this tool works: an API key from the Google Cloud Console with the Custom Search JSON API enabled, and a Search Engine ID from the Google Programmable Search Engine control panel. Both are required. The tool will not return results without them.

What it does

The Google Web Search tool connects your agent to Google's Programmable Search Engine (also known as Custom Search). When the LLM determines that a real-time search would help answer the user's question, it calls the tool with a search query. The tool sends that query to the Google Custom Search JSON API and returns up to ten results, each containing a title, a short description, and a URL. The LLM uses those results to compose an informed, current response.

You configure the API key and Search Engine ID at design time. At runtime, the LLM formulates the search query based on what the user is asking. The agent handles everything else automatically.

When to use it

Use the Google Web Search tool when both of the following are true:

  • The answer depends on information that changes over time or that lives on the public web, rather than in the app's own database or forms.
  • You want the agent to find and synthesise current information rather than relying on fixed knowledge.

Typical scenarios include the following:

  • Supplier Research: A procurement agent searches the web for a supplier's current contact details, product catalogue updates, or news before drafting an outreach message.
  • Competitor Monitoring: A CRM agent looks up recent news about a prospect's company so the sales team has fresh context before a meeting.
  • Policy Look-Up: An HR agent searches for the latest published government guidance on leave entitlements or tax regulations to supplement the app's own policy documents.

When not to use it
If the data you need is already in your Joget app's database or forms, use the Database Query Tool instead. If you need to call a specific external API or internal service with known endpoints, use the JSON API Tool. Use the Google Web Search tool only when you genuinely need open-ended web search results.

Get started

How to use it

To use the Google Web Search Tool:

  1. Locate the Google Web Search element under the Tools section of the palette.
  2. Drag and drop the File element into the Drop a tool to here section.

Configure Tool Properties

To properly integrate and configure the Google Web Search, set the following fields:

  • API Key: Authenticates your requests to the Google Custom Search JSON API. Stored encrypted. A server API key from the Google Cloud Console. Enable the Custom Search JSON API for the project first, then generate the key at the Google Cloud Console. This is a required field.
  • Search Engine ID: Identifies which Programmable Search Engine to use for queries. The CX identifier of your search engine. Create and manage search engines at programmablesearchengine.google.com. This is a required field.
Both fields are required

If either the API Key or the Search Engine ID is missing or incorrect, the tool will not return results. A missing key causes a silent failure: the tool returns "No result available" without an error in the agent chat. Verify both credentials are correct before testing with users.

Best Practices

  • Configure your search engine scope carefully. The Programmable Search Engine can be scoped to specific domains or set to search the entire web. For general research scenarios, configure it to search the entire web. For internal knowledge bases or specific documentation sites, scope it to those domains only.
  • Results reflect what Google indexes. The tool returns what is publicly indexed and discoverable. It cannot reach pages behind logins, paywalls, or robots.txt exclusions.
  • Up to ten results are returned per query. The LLM receives the title, snippet, and URL of each result. It synthesises those into a response; it does not visit the URLs or read the full page content.
  • Test with a real API key and a real query. A wrong or missing Search Engine ID returns a Google API error, not "No results". Only a fully missing API key returns the silent "No result available" fallback. Use a real query to confirm the integration is working end-to-end.
Created by Debanraj Ravindran Last modified by Debanraj Ravindran on Jul 27, 2026