Skip to content

Google Web Search

Runs a web search using the Google endpoint of the Agents service and returns the search results as a JSON-formatted string. Supports common Google search notations like exact phrases, exclusions, site/domain limits, file types, and related sites. Designed for fetching a limited set of top results with optional safe search and time range filtering.
Preview

Usage

Use this node to retrieve web documents relevant to a query from Google, then pass the returned JSON string into downstream parsing or RAG pipelines. Typical workflow: provide a precise query (optionally with Google operators), set max_results and safesearch, optionally constrain by recent time windows, then parse the 'documents' JSON for titles, URLs, and snippets.

Inputs

FieldRequiredTypeDescriptionExample
queryTrueSTRINGThe search query. Supports Google operators: "exact phrase", -exclude, site:domain.com, filetype:ext, related:domain.com. Must be a non-empty string.site:arxiv.org "diffusion models" filetype:pdf
max_resultsTrueINTMaximum number of results to return. Must be between 1 and 10.5
safesearchTrueBOOLEANEnable or disable safe search filtering of explicit content.true
timelimitTrueCHOICETime window for results. Choose one of: None, d (day), w (week), m (month), y (year).w
timelimit_numberTrueINTNumber of time units when timelimit is set. For example, timelimit=w and timelimit_number=2 restricts results to the last 2 weeks.2

Outputs

FieldTypeDescriptionExample
documentsSTRINGA JSON-formatted string representing the list of search result documents returned by the Agents service. Typically includes fields like title, url, and content/snippet depending on service response.[{"title": "Example Result", "url": "https://example.com", "snippet": "..."}]

Important Notes

  • Non-empty query required: The node will raise an error if 'query' is empty or only whitespace.
  • Output is a JSON string: Downstream nodes may need to parse this string to access individual document fields.
  • Result count bounds: 'max_results' must be between 1 and 10.
  • Time filter usage: 'timelimit_number' only applies when 'timelimit' is not 'None'.
  • Safe search behavior: 'safesearch' controls filtering at the service level; it may still return some borderline content depending on source behavior.
  • Network call and timeout: The node performs an HTTP POST to the Agents service and may raise errors on timeouts or non-200 responses.

Troubleshooting

  • Empty query error: Ensure 'query' is a non-empty string without only whitespace.
  • Service error or non-200 response: Check the Agents service availability and credentials/configuration; review the error message returned by the node.
  • JSON parsing downstream: If a downstream step fails, ensure you parse the 'documents' output from STRING into structured data first.
  • No results returned: Loosen the query, remove restrictive operators (like site: or filetype:), or increase 'max_results'.
  • Time window too narrow: If using 'timelimit', increase 'timelimit_number' or set 'timelimit' to 'None' to broaden results.
  • Unexpected content despite safesearch: Set 'safesearch' to true and refine the query terms; note that filtering depends on upstream sources and may not be absolute.

Example Pipelines

Example
Example