Skip to main content

Search the web with GPT for Excel

Search the web directly in GPT for Excel with the Perplexity Sonar model. Sonar uses 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 use Sonar in any bulk tool or GPT function.

info

For sonar model pricing information, see our model price list. If you're using your own Perplexity API key, you pay the Perplexity directly for the API cost.

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 as output.
    • You need to target specific domains or time ranges for your searches.
  • Use GPT functions if:

    • You're comfortable using spreadsheet formulas and functions.
    • 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 both general web searches and targeted searches that focus on specific domains or 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 a different source of information.

  1. Click GPT for Excel Word in the Home tab.

    Home Ribbon

    info

    You can also go to Home > Add-ins > My add-ins > GPT for Excel Word.

  2. Expand the model switcher and select sonar.

    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.
    Only in those domains: (Up to 3)
    stockanalysis.com, www.nasdaq.com

    No recency limit
    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.

Using the model switcher

  1. Click GPT for Excel Word in the Home tab.

    Home Ribbon

    info

    You can also go to Home > Add-ins > My add-ins > GPT for Excel Word.

  2. Select sonar from the model switcher.

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

    =GPT("your prompt")

    For example:

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

Specifying the model in the formula

  1. Click GPT for Excel Word in the Home tab.

    Home Ribbon

    info

    You can also go to Home > Add-ins > My add-ins > GPT for Excel Word.

  2. In the workbook, select a cell and write your formula, specifying the Perplexity Sonar model directly in the formula:

    =GPT("your prompt", , , "sonar")

    For example:

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

    The formula uses the Perplexity Sonar model regardless of what's currently selected in the model switcher.

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