Skip to main content

Search the web with GPT for Sheets

Search the web directly in GPT for Sheets using web search models. These models use fresh web search data, which allows you to generate up-to-date responses about companies, current events, facts, and more, directly in your spreadsheet. You can use web search models in any bulk AI tool or GPT function.

Supported web search models

You can use the following web search models in GPT for Sheets:

ProviderModelWithout API keyWith API key

Perplexity

sonar

sonar-reasoning

sonar-pro

sonar-reasoning-pro

Google

gemini-2.5-flash

gemini-2.5-pro

OpenAI

gpt-4o-search-preview

gpt-4o-mini-search-preview

tip

For more information about web search models, see AI providers & models.

Bulk AI tools vs. GPT functions

Choose the method that best fits your needs:

  • Use bulk tools if:

    • You want to perform bulk searches on entire columns (row-by-row).

    • You are working with thousands of rows.

    • You want to include source references in your output.

    • You need to target specific domains or time ranges for your searches.

  • Use GPT functions if:

    • You're comfortable using spreadsheet formulas.

    • You're working with up to a few hundred cells or you want to run searches for individual cells.

    • You need the flexibility of nested formulas or of combining GPT functions with native functions.

Web search with bulk tools

Use bulk tools to perform web searches with any model that has web search capabilities (🌐). When using the Perplexity Sonar models, you can also target specific domains and time periods.

  1. Open GPT for Sheets.

  2. Expand the model switcher and select a web search model (indicated by the 🌐 icon).

    Select model
    info

    If you select a Gemini model, make sure web search is enabled for Gemini models.

  3. In the sidebar, select Bulk AI tools and click the tool you want to use.

    Select Custom
  4. Set up your bulk tool run. For example, to set up a Custom prompt run:

    Setup Custom
    FieldDescriptionExample

    1

    Prompt to run for each row

    Enter the prompt you want to run for each row.

    Find and summarize reviews for: {{Event}}.

    3

    Put results in column

    Select the column to put the results in. Cells in these columns won't be overwritten with the results if they contain text.

    B: Information

    4

    Show sources

    Enable this option to write source references in the column to the right of the results column.

    Enabled

    2

    Web search options

    Web search options vary by model. For Perplexity Sonar models:

    • Search context size: Select a larger size for deeper searches but with a higher cost.

    • Domains: Specify up to three domains to generate responses based only on search results from these domains.

    • Recency: Select a time range to generate responses using only search results from this period.

    • Medium

    • instagram.com, eventbrite.com, goandance.com

    • No recency limit

  5. Click Run rows.

Your search results appear in the output column. If you enabled source references, they appear in the adjacent column.

Run Custom

For instructions on how to use the tools, see Bulk AI tools.

Web search with GPT functions

Use GPT functions to perform general web searches. Note that domain and time period targeting are only available through bulk tools when using the Perplexity Sonar models.

Using the model switcher

  1. Open GPT for Sheets.

  2. Expand the model switcher and select a web search model (indicated by the 🌐 icon).

    Select model
    info

    If you select a Gemini model, make sure web search is enabled for Gemini models.

  3. In the spreadsheet, select a cell and write your formula:

    =GPT("Find the Instagram handle for 'Berlin Salsa Festival 2025'.")
    Result web search functions using sidebar

    The formula uses the web search model selected in the model switcher.

Specifying the model in the formula

  1. Open GPT for Sheets.

  2. In the spreadsheet, select a cell and write your formula, specifying a web search model directly in the formula, for example the Perplexity Sonar model:

    =GPT("Find the Instagram handle for 'Berlin Salsa Festival 2025'.", , , "sonar")
    Result web search functions using parameter

    The formula uses the web search model regardless of what's currently selected in the model switcher.

    info

    If you specify a Gemini model, make sure web search is enabled for Gemini models.

For instructions on how to write formulas with GPT functions, see GPT functions.

Tips for domain-specific web search (Perplexity)

When using the Domains option, keep in mind that Perplexity can only search domains that its crawler has already indexed.

Perplexity does not crawl new content on demand. In addition, the crawler respects robots.txt directives, so Perplexity will not return private or restricted content from sites its crawler has otherwise indexed.

For example:

  • ✅ Works well: wikipedia.org, bbc.com, stockanalysis.com

  • ❌ May not work: yourcompany-internal.com, paywalledsite.com, newly-launched-blog.com

If you don't get results from a specific domain:

  • Try a different source of information or a more widely indexed site.

  • Consider using the web scraping tool for specific pages.

Enable web search for Gemini models

Web search is an optional feature for Google Gemini models. By default, the feature is disabled.

To enable web search for Gemini models:

  1. Expand the model switcher and select any Gemini model.

    Select a Gemini model

  2. Select GPT functions, and click Model settings.

  3. Click the Web search toggle to enable web search.

    Enable web search for Gemini models

Web search is now enabled for all Gemini models in bulk AI tools and GPT functions in the current spreadsheet.

info

Web search increases a model's usage cost. Learn more.