---
title: Grounded generation with web and image search — Nano Banana 2 | Runware Docs
url: https://runware.ai/docs/models/google-nano-banana-2/guides/grounded-generation
description: How to generate images from real-time information with Nano Banana 2 using web and image search grounding via providerSettings.google.
---
### [Introduction](https://runware.ai/docs/models/google-nano-banana-2/guides/grounded-generation#introduction)

Ask an ordinary image model for today's weather as an infographic and it will render numbers, **all of them invented**. The model has no access to anything after its training cutoff, so any prompt that depends on current facts produces confident fiction.

Nano Banana 2 can **ground a generation on a live web search**. Set `providerSettings.google.webSearch` to `true` and the model looks up real information before it renders, so the figures on the page reflect what's actually true at generation time.

![A clean weather infographic card showing current temperatures and icons for New York, London, Tokyo, and Sydney](https://runware.ai/docs/assets/hero-weather.-wnk-KQN_24crDi.jpg)

> **Prompt**: A clean modern weather infographic card titled "TODAY'S WEATHER", using the real current weather from a live web search for New York, London, Tokyo, and Sydney: each city shown with its name, the actual current temperature, and a matching weather icon, with today's real date at the bottom. Soft gradient background, crisp legible typography, flat design.

The temperatures on that card were fetched at generation time, not guessed. This guide covers the request shape, grounding on live data with web search, grounding on real visuals with image search, and when each is worth the lookup.

> [!NOTE]
> A grounded image reflects the data available the moment you generate it. Re-running the same prompt later pulls fresh information, so treat each grounded result as a **snapshot**, not a fixed asset.

### [Request shape](https://runware.ai/docs/models/google-nano-banana-2/guides/grounded-generation#request-shape)

Grounding is a single boolean under `providerSettings.google`. Everything else is an ordinary generation request.

TypeScriptPythoncURLCLIJSON

```typescript
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'google:4@3',
  positivePrompt: 'A clean weather infographic card showing today\'s weather for New York, London, Tokyo, and Sydney',
  width: 1200,
  height: 896,
  providerSettings: {
    google: {
      webSearch: true
    }
  }
})
```

```python
import asyncio
import os

from runware import Runware

async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "google:4@3",
            "positivePrompt": "A clean weather infographic card showing today's weather for New York, London, Tokyo, and Sydney",
            "width": 1200,
            "height": 896,
            "providerSettings": {
                "google": {
                    "webSearch": True
                }
            }
        })

asyncio.run(main())
```

```bash
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "imageInference",
      "taskUUID": "e5f6a7b8-c9d0-1234-ef01-567890123456",
      "model": "google:4@3",
      "positivePrompt": "A clean weather infographic card showing today's weather for New York, London, Tokyo, and Sydney",
      "width": 1200,
      "height": 896,
      "providerSettings": {
        "google": {
          "webSearch": true
        }
      }
    }
  ]'
```

```bash
runware run google:4@3 \
  positivePrompt="A clean weather infographic card showing today's weather for New York, London, Tokyo, and Sydney" \
  width=1200 \
  height=896 \
  providerSettings.google.webSearch=true
```

```json
{
  "taskType": "imageInference",
  "taskUUID": "e5f6a7b8-c9d0-1234-ef01-567890123456",
  "model": "google:4@3",
  "positivePrompt": "A clean weather infographic card showing today's weather for New York, London, Tokyo, and Sydney",
  "width": 1200,
  "height": 896,
  "providerSettings": {
    "google": {
      "webSearch": true
    }
  }
}
```

Response

```json
{
  "data": [
    {
      "taskType": "imageInference",
      "taskUUID": "e5f6a7b8-c9d0-1234-ef01-567890123456",
      "imageUUID": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e",
      "imageURL": "https://im.runware.ai/image/os/a14d18/ws/2/ii/2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e.jpg"
    }
  ]
}
```

Both grounding settings default to `false`. There are two: `webSearch` pulls in text-based information from the web, and `imageSearch` pulls in visual references. You can enable either or both.

### [Grounding on live data](https://runware.ai/docs/models/google-nano-banana-2/guides/grounded-generation#grounding-on-live-data)

The clearest test of grounding is a prompt the model can't possibly answer from training: today's date. Here's the same prompt with grounding off and on.

![A minimalist card showing a date and day of the week](https://runware.ai/docs/assets/compare-off.z3qbTDML_Z1wg6la.jpg)

*webSearch off (invented)*

> **Prompt**: A minimalist poster card displaying today's date and the day of the week in large clean typography, soft pastel background, centered layout.

![A minimalist card showing the correct current date and day of the week](https://runware.ai/docs/assets/compare-on.Ci6bruXc_1uzsps.jpg)

*webSearch on (real)*

> **Prompt**: A minimalist poster card displaying today's date and the day of the week in large clean typography, soft pastel background, centered layout.

With grounding off, the model invents a plausible date. With `webSearch` on, it looks up the **actual current date** and renders that. The same applies to anything time-sensitive: weather, exchange rates, sports results, headlines. The prompt describes the layout, and the search fills in the facts.

### [Grounding on web images](https://runware.ai/docs/models/google-nano-banana-2/guides/grounded-generation#grounding-on-web-images)

`providerSettings.google.imageSearch` pulls **visual references from the web** instead of text. It earns its place when a prompt names something with a **specific real appearance the model can't know from training**, where guessing produces the wrong look rather than a missing fact.

The official 2026 World Cup match ball is a clean test. Its design was revealed too recently for the model to have learned it. The same prompt, run with all grounding off and then with image search on:

![A studio product photo of a soccer ball on a plain light-gray background](https://runware.ai/docs/assets/imagesearch-worldcup-ball-off.Bk6UXZhi_1fvcgH.jpg)

*All search off*

> **Prompt**: A clean studio product photo of the official match ball of the 2026 FIFA World Cup, showing its exact real-world design, colours, and pattern, centered on a plain light-gray background, soft even lighting.

![A studio product photo of a soccer ball on a plain light-gray background](https://runware.ai/docs/assets/imagesearch-worldcup-ball.CamRj0Bm_Z1DSHpt.jpg)

*Image search on*

> **Prompt**: A clean studio product photo of the official match ball of the 2026 FIFA World Cup, showing its exact real-world design, colours, and pattern, centered on a plain light-gray background, soft even lighting.

With everything off, the model invents a generic ball. With `imageSearch` on, it pulls real photos of the actual ball and matches its design. What's being grounded here is a **look, not a fact**, which is the case web search can't cover.

> [!NOTE]
> Image search is available on **Nano Banana 2** (`google:4@3`), not on Nano Banana or Nano Banana Pro. The response returns only the generated image, not the web pages it pulled from, so a grounded result can't be traced back to its sources.

### [When to use grounding](https://runware.ai/docs/models/google-nano-banana-2/guides/grounded-generation#when-to-use-grounding)

Grounding adds a web lookup, so it adds latency, and it only earns that cost when the image depends on something the model couldn't otherwise know. For invented scenes, leave both settings off and generate normally.

Turn grounding on when the output has to match the real world: current data, or an accurate depiction of a specific real place or object. If your prompt would be wrong tomorrow, or wrong without a reference photo, that's the signal to ground it.

### [Tips](https://runware.ai/docs/models/google-nano-banana-2/guides/grounded-generation#tips)

1. **Enable grounding only when facts matter.** A web lookup costs latency. Most prompts don't need it, so keep `webSearch` and `imageSearch` off by default.
    
2. **Be specific about the data you want.** Name the city, the metric, the date range. A vague request gives the search little to anchor on and the layout little to display.
    
3. **Treat grounded outputs as snapshots.** The data is current as of generation. If you need a fixed asset, save the result rather than regenerating it later.
    
4. **Use image search for current or unfamiliar visuals.** When a prompt depends on something the model can't know from training, a recent event or a specific lesser-known subject, `imageSearch` gives it real web references to match. It adds little for subjects the model already renders well.
    
5. **Pair grounding with short quoted labels.** Wrap the headings you want rendered in quotation marks so the fetched figures land in clean, legible text instead of approximated lettering.