Skip to main content
Use Exa’s search API directly from Snowflake to enrich your data with live web intelligence — without leaving SQL. This integration uses Snowflake’s External Access feature to securely call the Exa API from stored procedures, enabling two main workflows:
  1. Cortex Agent tools — give a Snowflake Cortex Agent the ability to search the web and retrieve page contents
  2. Data enrichment — enrich tables with CEO/founder info, latest news, and other web data in batch

Prerequisites

  1. An Exa API key
  2. ACCOUNTADMIN role (required for creating External Access Integrations)
  3. A Snowflake account with External Access support (paid accounts)

Get your Exa API key

Create a key in the dashboard. New accounts start with free credits.

Setup

Run the following SQL in a Snowflake worksheet. Replace <<YOUR_EXA_API_KEY>> with your actual key.

Roles and database

Warehouse

Network rule, secret, and external access

This creates:
  • A network rule allowing egress only to api.exa.ai:443
  • A secret storing your API key (encrypted, not visible in SQL)
  • An external access integration binding the rule and secret together

Stored procedures

Searches the web using Exa’s search API. Returns results in relevance order, each with its rank, title, URL, and published date, and optionally text, highlights, and summaries.

Parameters

instant, fast, and deep-reasoning are legacy search types. lite works only when get_contents is FALSE and include_text is NULL. Otherwise the procedure sends summary or includeText, which lite rejects.

EXA_GET_CONTENTS

Retrieves page contents (text, highlights, summaries) for specific URLs.

Usage examples

Get contents for specific URLs

Company research

Data enrichment

Exa can enrich Snowflake tables with live web data — CEO/founder info, latest news, and more — all without leaving the platform.

Create a prospect table

Enrich with CEO/founder info

Enrich with latest news

Run enrichment

Parallelizing Exa requests

When enriching large tables, calling Exa sequentially per row is slow. You can parallelize requests using Python’s concurrent.futures inside a single stored procedure, sending multiple Exa API calls at once.

Concurrent enrichment procedure

Choosing parallelism

Snowflake task scheduling

For recurring enrichment jobs, wrap the procedure in a Snowflake Task:
This runs the parallel enrichment every day at 8 AM PT. Adjust the cron schedule and max_workers to fit your volume and rate limits.

Cortex Agent integration

You can also register the Exa stored procedures as tools for a Snowflake Cortex Agent, giving it the ability to search the web conversationally.
Once created, open Snowflake Intelligence and try asking your agent:
  • “Search the web for recent AI agent frameworks”
  • “Find research papers about retrieval augmented generation”
  • “What are the top AI companies to watch?”

Security

The integration uses Snowflake’s built-in security features: Grant access to additional users:

More resources