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:
Provider | Model | Without API key | With API key |
---|---|---|---|
Perplexity | sonar | ✅ | ✅ |
sonar-reasoning | ✅ | ✅ | |
sonar-pro | ❌ | ✅ | |
sonar-reasoning-pro | ❌ | ✅ | |
gemini-2.5-flash | ✅ | ✅ | |
gemini-2.5-pro | ❌ | ✅ | |
OpenAI | gpt-4o-search-preview | ❌ | ✅ |
gpt-4o-mini-search-preview | ❌ | ✅ |
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.
Expand the model switcher and select a web search model (indicated by the 🌐 icon).
infoIf you select a Gemini model, make sure web search is enabled for Gemini models.
In the sidebar, select Bulk AI tools and click the tool you want to use.
Set up your bulk tool run. For example, to set up a Custom prompt run:
Field Description Example Prompt to run for each row
Enter the prompt you want to run for each row.
Find and summarize reviews for: {{Event}}.
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
Show sources
Enable this option to write source references in the column to the right of the results column. Enabled
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
Click Run rows.
Your search results appear in the output column. If you enabled source references, they appear in the adjacent column.

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
Expand the model switcher and select a web search model (indicated by the 🌐 icon).
infoIf you select a Gemini model, make sure web search is enabled for Gemini models.
In the spreadsheet, select a cell and write your formula:
=GPT("Find the Instagram handle for 'Berlin Salsa Festival 2025'.")
The formula uses the web search model selected in the model switcher.
Specifying the model in the formula
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")
The formula uses the web search model regardless of what's currently selected in the model switcher.
infoIf 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:
Expand the model switcher and select any Gemini model.
Select GPT functions, and click Model settings.
Click the Web search toggle to enable web search.
Web search is now enabled for all Gemini models in bulk AI tools and GPT functions in the current spreadsheet.
Web search increases a model's usage cost. Learn more.