Skip to main content

Search the web with GPT functions in Excel

Search the web directly in GPT for Excel using GPT functions with 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 workbook. You can also fetch content from specific URLs to extract information from web pages.

Choose the right web search model

Choose a web search model that best fits your use case.

Get information that is not in the model's built-in knowledge:

  • Example: Finding the current CEO of a company.

  • How it works:

    All web search models can go beyond their built-in knowledge by accessing information from search engines, like Google or Bing. This allows models, which have compressed historical knowledge, to explore topics in greater depth, with more current data or with a specific focus.

  • Recommended models:

Content fetching

Focus on specific URLs and extract content from them:

  • Example: Extracting the product name and price from the URL of a product page.

  • How it works: Some web search models can access the full content from specific URLs. The full content is added to the context of the models, so they can use it to answer questions about the content or extract information from it.

  • Recommended models:

Supported web search models

Click here for a list of all web search models supported by GPT for Excel.
ProviderModelWithout API keyWith API key

Perplexity

sonar

sonar-pro

sonar-reasoning-pro

Google

gemini-2.0-flash

gemini-2.0-flash-lite

gemini-2.5-flash

gemini-2.5-flash-lite

gemini-2.5-pro

gemini-3-flash-preview

gemini-3-pro-preview

OpenAI

gpt-4o-mini-search-preview

gpt-4o-search-preview

gpt-5-search-api

For detailed pricing information, see AI providers and models.

Use web search models

Use GPT functions to perform web searches with any model that has web search capabilities (🌐).

Using the model switcher

  1. Open GPT for Excel.

  2. In the sidebar, select GPT functions.

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

    Select model
  4. (Optional) Configure the model-specific settings in the sidebar. For Gemini models, make sure web search is enabled.

  5. In the , 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 Excel.

  2. In the sidebar, select GPT functions.

  3. (Optional) Configure the model-specific settings in the sidebar. For Gemini models, make sure web search is enabled.

  4. In the , 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.

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

Model-specific settings

Use the model-specific settings to configure the web search model for your use case.

SettingDescriptionExample

Web search

Let Gemini decide when a Google search can improve the answer. This allows Gemini to provide more accurate answers and cite verifiable sources beyond its built-in knowledge. Enabling Web search incurs an additional search cost.

Configure Google Gemini web search option

URL context

Gemini 2.5 only

Provide up to 20 URLs (pages, images, PDFs) in your prompt to focus your search. No search cost is incurred, but the content retrieved from URLs counts as input tokens.

Configure Google Gemini URL context option