TASK_SEARCH allows you to perform web searches directly from Google Sheets using the Tavily API. Results are automatically formatted into a table with titles, URLs, and content snippets, making it easy to bring external search results into your spreadsheets.
=TASK_SEARCH(header, query, [max_results], [include_headings], [advanced_search_depth], [include_images], [include_domains], [exclude_domains])
Parameter | Data Type | Required | Description |
---|---|---|---|
header | string | Yes | Column header for the task template |
query | string | Yes | The search query to execute |
max_results | number | No | Maximum number of results to return (default: 5) |
include_headings | boolean | No | Whether to include column headings in the output (default: true) |
advanced_search_depth | boolean | No | Whether to use advanced search depth for more thorough results (default: false) |
include_images | boolean | No | Whether to include images in the results (default: false) |
include_domains | string | No | Comma-delimited list of domains to include in the search |
exclude_domains | string | No | Comma-delimited list of domains to exclude from the search |
You can narrow your search results to specific websites by using the include_domains
parameter. For example, to only get results from Wikipedia, use "wikipedia.org"
. For multiple domains, separate them with commas: "wikipedia.org,nasa.gov"
.
Similarly, you can exclude unwanted domains using the exclude_domains
parameter.
The advanced_search_depth
parameter controls how thorough the search is:
false
(default): Basic search, faster but less comprehensivetrue
: Advanced search, more comprehensive but may take longer to completeWhen include_images
is set to true
, your search results will include image URLs related to your query. These appear as additional rows in the results table with "Image" in the content column.
=TASK_SEARCH("Search Results", "latest AI models", 5, true)
=TASK_SEARCH("Academic Sources", "quantum computing research", 10, true, true, false, "edu,ac.uk")
=TASK_SEARCH("Travel Destinations", "best beaches in Greece", 5, true, false, true)
=TASK_SEARCH("Product Reviews", "best wireless headphones", 8, true, false, false, "", "amazon.com,ebay.com")
advanced_search_depth=true
for research that requires more thorough resultsmax_results
reasonable (5-10) to avoid cluttering your spreadsheetinclude_images=true
to get relevant visual contentCause: The Tavily API key has not been added to your Sheet Workflows configuration.
Solution: Go to the Sheet Workflows sidebar, click on "Configure", and add your Tavily API key in the API configuration section.
Cause: There may be a syntax error in your formula parameters.
Solution: Check your formula syntax, especially quotes and commas, and ensure all parameters have the correct data type.
Cause: The query may be too specific or the search service might be experiencing issues.
Solution: Try a more general query or check your internet connection. Verify that your Tavily API key is valid.
Cause: There may be data in the cells where the results should appear.
Solution: Make sure there are empty cells to the right of your TASK_SEARCH formula cell.
Cause: The include_images
parameter is set to false or no relevant images were found.
Solution: Set include_images
to true and ensure your query is likely to have image results.
Cause: The domain format might be incorrect.
Solution: Use just the domain name (e.g., "example.com") without "http://" or "www." prefixes.
To use TASK_SEARCH, you need to sign up for a Tavily API key and add it to Sheet Workflows. Go to the Sheet Workflows sidebar, select "Configure", then add Tavily as a provider with your API key.
The number of searches is limited by your Tavily API plan. Check your Tavily account for usage limits and pricing.
Yes, since results are written directly to your spreadsheet, you can use standard Google Sheets features to save, export, or further process the data.
The results reflect what's available on the web at the time of your search. For time-sensitive information, you might want to re-run the search periodically.
Yes, once the results are in your spreadsheet, you can format them like any other cells, add conditional formatting, or create charts based on them.
You'll need to click "Run" again to execute the search with the new parameters. The previous results will be overwritten when the new search is executed.
Yes, you can have multiple TASK_SEARCH formulas in different cells. However, be aware of your API usage limits.
Advanced search depth performs a more thorough search across multiple sources, which requires more processing time but provides more comprehensive results.
No, search results are static after they're retrieved. To get fresh results, you'll need to click "Run" again.
Yes, you can enter queries in other languages to find content in those languages. The Tavily search API supports multiple languages.
1 week ago