Skip to main content

Search the web with GPT for Sheets

Search the web directly in GPT for Sheets using models with web search capabilities (indicated by the 🌐 icon in the model switcher). 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-capable models in any bulk tool or GPT function.

info

For model-specific pricing information, see our model price list.

Prerequisites

Bulk 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.

note

Searching a specific domain only works if:

  • Perplexity's web crawler has already independently indexed the content of the domain. The crawler does not index new content on demand. In addition, the crawler respects robots.txt directives and does not index disallowed content.
  • You can specify up to 3 domains to focus your search.

If a specific domain does not produce valid results, use web scraping to retrieve the information from specific pages.

  1. Select Extensions > GPT for Sheets and Docs > Open.

    Open GPT for Sheets and Docs

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

    Select model
  3. In the sidebar, select Bulk 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
    1Prompt to run for each rowEnter the prompt you want to run for each row.Write an SEO-optimized description for a bike based on its specifications: {{Bike specifications}}. Include key features, benefits, and any recent reviews or updates.
    2Search options
    • Domains: Specify up to three domains to target. The model will attempt to generate responses based only on search results from these domains.
    • Recency limit: Select a time range for the search results. The model will generate responses using only results from this period.
    • Search effort (API key only): Control the balance between cost and result quality:
      • Low: Minimal search context, optimized for cost savings.
      • Medium: Balanced search for cost vs. depth.
      • High: Uses the most search context for richer results.

    • Domains: stockanalysis.com, www.nasdaq.com
    • No recency limit
    • Search effort: Low
    3Put results in columnSelect the column or columns to put the results in. Cells in these columns won't be overwritten with the results if they contain text.B: Description
    4Show sourcesEnable this option to write source references in the column to the right of the results column.Enabled
  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 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. Select Extensions > GPT for Sheets and Docs > Open.

    Open GPT for Sheets and Docs

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

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

    =GPT("What are the latest trends in AI technology?")
    Result web search functions using sidebar

    The formula uses the web-capable model selected in the model switcher.

Specifying the model in the formula

  1. Select Extensions > GPT for Sheets and Docs > Open.

    Open GPT for Sheets and Docs

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

    =GPT("What are the latest trends in AI technology?", , , "sonar")
    Result web search functions using parameter

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

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