Skip to content
Talk to an Engineer Dashboard

Exa

Connect to Exa to perform AI-powered semantic web search, crawl websites for structured content, get natural language answers from the web, run in-depth research, and execute large-scale URL discovery with Websets.

Connect to Exa to perform AI-powered semantic web search, crawl websites for structured content, get natural language answers from the web, run in-depth research, and execute large-scale URL discovery with Websets.

Exa logo

Supports authentication: API Key

Register your Exa API key with Scalekit so it can authenticate and proxy requests on behalf of your users. Unlike OAuth connectors, Exa uses API key authentication — there is no redirect URI or OAuth flow.

  1. Generate an Exa API key

    • Sign in to dashboard.exa.ai/api-keys. Under Management, click API Keys.

    • Click + Create Key, enter a name (e.g., Agent Auth), and confirm.

    • In the Secret Key column, click the eye icon to reveal the key and copy it. Store it somewhere safe — you will not be able to view it again.

    Exa dashboard API Keys page showing existing keys and the + Create Key button

  2. Create a connection in Scalekit

    • In Scalekit dashboard, go to Agent AuthCreate Connection. Find Exa and click Create.

    • Note the Connection name — you will use this as connection_name in your code (e.g., exa).

    Scalekit connection configuration for Exa showing the connection name and API Key authentication type

  3. Add a connected account

    Connected accounts link a specific user identifier in your system to an Exa API key. Add accounts via the dashboard for testing, or via the Scalekit API in production.

    Via dashboard (for testing)

    • Open the connection you created and click the Connected Accounts tab → Add account.

    • Fill in:

      • Your User’s ID — a unique identifier for this user in your system (e.g., user_123)
      • API Key — the Exa API key you copied in step 1
    • Click Save.

    Add connected account form for Exa in Scalekit dashboard

    Via API (for production)

    await scalekit.actions.upsertConnectedAccount({
    connectionName: 'exa',
    identifier: 'user_123',
    credentials: { api_key: 'your-exa-api-key' },
    });

Once a connected account is set up, make API calls through the Scalekit proxy. Scalekit injects the Exa API key automatically — you never handle credentials in your application code.

You can interact with Exa in two ways — via direct proxy API calls or via Scalekit optimized tool calls. Scroll down to see the list of available Scalekit tools.

Proxy API Calls

import { ScalekitClient } from '@scalekit-sdk/node';
import 'dotenv/config';
const connectionName = 'exa'; // connection name from your Scalekit dashboard
const identifier = 'user_123'; // your user's unique identifier
// Get your credentials from app.scalekit.com → Developers → Settings → API Credentials
const scalekit = new ScalekitClient(
process.env.SCALEKIT_ENV_URL,
process.env.SCALEKIT_CLIENT_ID,
process.env.SCALEKIT_CLIENT_SECRET
);
const actions = scalekit.actions;
// Make a request via Scalekit proxy — no API key needed here
const result = await actions.request({
connectionName,
identifier,
path: '/search',
method: 'POST',
body: { query: 'LLM observability tools 2025', num_results: 5 },
});
console.log(result.data);

Scalekit tools

Use execute_tool to call Exa tools directly from your code. Scalekit resolves the connected account, injects the API key, and returns a structured response — no raw HTTP needed.

Search the web by meaning, not just keywords. This example searches for companies in the AI infrastructure space and returns AI-generated summaries for each result.

examples/exa_semantic_search.py
import scalekit.client, os
from dotenv import load_dotenv
load_dotenv()
scalekit_client = scalekit.client.ScalekitClient(
client_id=os.getenv("SCALEKIT_CLIENT_ID"),
client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
env_url=os.getenv("SCALEKIT_ENV_URL"),
)
actions = scalekit_client.actions
# Resolve connected account
response = actions.get_or_create_connected_account(
connection_name="exa",
identifier="user_123"
)
connected_account = response.connected_account
# Search for AI infrastructure companies with summaries
result = actions.execute_tool(
tool_name="exa_search",
connected_account_id=connected_account.id,
tool_input={
"query": "AI infrastructure companies building GPU cloud platforms",
"num_results": 10,
"type": "neural",
"category": "company",
"contents": {
"summary": {"query": "What does this company do and who are their customers?"}
}
}
)
for item in result.result.get("results", []):
print(f"{item['title']}: {item['url']}")
print(f" → {item.get('summary', 'No summary')}\n")

Search with full content enrichment

Retrieve the full page text and highlighted snippets alongside search results — useful when you want to pass source material directly into an LLM context window.

examples/exa_search_with_content.py
result = actions.execute_tool(
tool_name="exa_search",
connected_account_id=connected_account.id,
tool_input={
"query": "OpenAI API rate limits and pricing 2025",
"num_results": 5,
"type": "keyword", # keyword mode for precise terms
"include_domains": ["openai.com", "platform.openai.com"],
"contents": {
"text": {"max_characters": 2000}, # cap text to save tokens
"highlights": {
"num_sentences": 3,
"highlights_per_url": 2
}
}
}
)
for item in result.result.get("results", []):
print(f"## {item['title']}")
print(f"URL: {item['url']}")
if item.get("highlights"):
print("Highlights:")
for h in item["highlights"]:
print(f" - {h}")
print()

Find similar pages

Discover pages that are semantically similar to a known URL — useful for competitive research, finding alternative data sources, or discovering similar products.

examples/exa_find_similar.py
# Find companies similar to a known competitor
result = actions.execute_tool(
tool_name="exa_find_similar",
connected_account_id=connected_account.id,
tool_input={
"url": "https://www.linear.app",
"num_results": 10,
"exclude_domains": ["linear.app"], # exclude the source URL itself
"start_published_date": "2024-01-01", # only recently indexed pages
"contents": {
"summary": {"query": "What product does this company build?"}
}
}
)
print("Similar companies to Linear:")
for item in result.result.get("results", []):
print(f" {item['title']}{item['url']}")
if item.get("summary"):
print(f" {item['summary']}")

Get content for known URLs

Extract structured content from a list of URLs you already have — from a CRM export, a prior search, or a manually curated list. No search query required.

examples/exa_get_contents.py
# Enrich a list of company URLs from your CRM
company_urls = [
"https://www.anthropic.com",
"https://mistral.ai",
"https://cohere.com",
]
result = actions.execute_tool(
tool_name="exa_get_contents",
connected_account_id=connected_account.id,
tool_input={
"urls": company_urls,
"summary": {
"query": "What AI models or products does this company offer, and who are their target customers?"
},
"subpages": 1, # also fetch one subpage per URL (e.g. /about or /pricing)
"subpage_target": "pricing", # target the pricing subpage specifically
"max_age_hours": 48 # use content no older than 48 hours
}
)
for item in result.result.get("results", []):
print(f"{item['url']}: {item.get('summary', 'No summary')}")

Get a direct answer

Ask a question and get a synthesized natural language answer grounded in live web sources. Returns the answer and the source URLs used — ready to display or inject into a citation-aware LLM prompt.

examples/exa_answer.py
result = actions.execute_tool(
tool_name="exa_answer",
connected_account_id=connected_account.id,
tool_input={
"query": "What are the context window sizes and pricing for Claude Sonnet and GPT-4o as of 2025?",
"num_results": 8,
"text": True, # include source snippets
"include_domains": ["anthropic.com", "openai.com", "platform.openai.com"]
}
)
print("Answer:", result.result.get("answer"))
print("\nSources:")
for source in result.result.get("sources", []):
print(f" - {source['title']}: {source['url']}")

Deep research on a topic

Run multi-angle research that decomposes your topic into parallel sub-queries and synthesizes the results. Use output_schema to get structured JSON instead of free-form text — useful for generating reports your code can consume directly.

examples/exa_research.py
result = actions.execute_tool(
tool_name="exa_research",
connected_account_id=connected_account.id,
tool_input={
"topic": "Competitive landscape of AI coding assistants in 2025 — key players, pricing, and differentiators",
"num_subqueries": 5,
"output_schema": {
"type": "object",
"properties": {
"summary": {"type": "string"},
"competitors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"pricing": {"type": "string"},
"key_differentiator": {"type": "string"},
"target_customer": {"type": "string"}
}
}
},
"market_trends": {
"type": "array",
"items": {"type": "string"}
}
},
"required": ["summary", "competitors", "market_trends"]
}
}
)
import json
report = result.result
print("Summary:", report.get("summary"))
print("\nCompetitors:")
for c in report.get("competitors", []):
print(f" {c['name']}: {c.get('key_differentiator')}")
print("\nTrends:")
for t in report.get("market_trends", []):
print(f" - {t}")

LangChain integration

Let an LLM decide which Exa tool to call based on natural language. This example builds an agent that can search, retrieve content, and answer research questions on demand.

examples/exa_langchain.py
import scalekit.client, os
from dotenv import load_dotenv
from langchain_openai import ChatOpenAI
from langchain.agents import AgentExecutor, create_openai_tools_agent
from langchain_core.prompts import (
ChatPromptTemplate, SystemMessagePromptTemplate,
HumanMessagePromptTemplate, MessagesPlaceholder, PromptTemplate
)
load_dotenv()
scalekit_client = scalekit.client.ScalekitClient(
client_id=os.getenv("SCALEKIT_CLIENT_ID"),
client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
env_url=os.getenv("SCALEKIT_ENV_URL"),
)
actions = scalekit_client.actions
identifier = "user_123"
# Resolve connected account (API key auth — no OAuth redirect needed)
actions.get_or_create_connected_account(
connection_name="exa",
identifier=identifier
)
# Load all Exa tools in LangChain format
tools = actions.langchain.get_tools(
identifier=identifier,
providers=["EXA"],
page_size=100
)
prompt = ChatPromptTemplate.from_messages([
SystemMessagePromptTemplate(prompt=PromptTemplate(
input_variables=[],
template=(
"You are a research assistant with access to Exa web search tools. "
"Use exa_search for general queries, exa_answer for direct questions, "
"exa_find_similar for competitive analysis, and exa_research for deep multi-source topics. "
"Always cite your sources."
)
)),
MessagesPlaceholder(variable_name="chat_history", optional=True),
HumanMessagePromptTemplate(prompt=PromptTemplate(
input_variables=["input"], template="{input}"
)),
MessagesPlaceholder(variable_name="agent_scratchpad")
])
llm = ChatOpenAI(model="gpt-4o")
agent = create_openai_tools_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
result = agent_executor.invoke({
"input": "Who are the top 5 competitors to Notion for team knowledge management? Summarize each and compare their pricing."
})
print(result["output"])

Get a natural language answer to a question by searching the web with Exa and synthesizing results. Returns a direct answer with citations to the source pages. Ideal for factual questions, current events, and research queries. Rate limit: 60 requests/minute.

NameTypeRequiredDescription
exclude_domainsarray<string>NoJSON array of domains to exclude from answer sources.
include_domainsarray<string>NoJSON array of domains to restrict source search to. Example: [“reuters.com”,“bbc.com”]
include_textbooleanNoWhen true, also returns the source page text alongside the synthesized answer.
num_resultsintegerNoNumber of web sources to use when generating the answer (1–20). More sources improves accuracy but costs more credits.
querystringYesThe question or query to answer from web sources.

Crawl one or more web pages by URL and extract their content including full text, highlights, and AI-generated summaries. Useful for reading specific pages discovered via search. Rate limit: 60 requests/minute. Credit consumption depends on number of URLs.

NameTypeRequiredDescription
highlights_per_urlintegerNoNumber of highlight sentences to return per URL when include_highlights is true. Defaults to 3.
include_highlightsbooleanNoWhen true, returns the most relevant sentence-level highlights from each page.
include_html_tagsbooleanNoWhen true, retains HTML tags in the extracted text. Defaults to false (plain text only).
include_summarybooleanNoWhen true, returns an AI-generated summary for each crawled page.
max_charactersintegerNoMaximum characters of text to extract per page. Defaults to 5000.
summary_querystringNoOptional query to focus the AI summary on a specific aspect of the page.
urlsarray<string>YesJSON array of URLs to crawl and extract content from.

Delete an Exa Webset by its ID. This permanently removes the webset and all its collected items. This action cannot be undone.

NameTypeRequiredDescription
webset_idstringYesThe ID of the webset to delete.

Find web pages similar to a given URL using Exa’s neural similarity search. Useful for competitor research, finding related articles, or discovering similar companies. Optionally returns page text, highlights, or summaries. Rate limit: 60 requests/minute.

NameTypeRequiredDescription
end_published_datestringNoOnly return pages published before this date. ISO 8601 format: YYYY-MM-DDTHH:MM:SS.000Z
exclude_domainsarray<string>NoArray of domains to exclude from results.
include_domainsarray<string>NoArray of domains to restrict results to.
include_textbooleanNoWhen true, returns the full text content of each result page.
max_charactersintegerNoMaximum characters of page text to return per result when include_text is true. Defaults to 3000.
num_resultsintegerNoNumber of similar results to return (1–100). Defaults to 10.
start_published_datestringNoOnly return pages published after this date. ISO 8601 format: YYYY-MM-DDTHH:MM:SS.000Z
urlstringYesThe URL to find similar pages for.

Get the status and details of an existing Exa Webset by its ID. Use this to poll the status of an async webset created with Create Webset. Returns metadata including status (created, running, completed, cancelled), progress, and configuration.

NameTypeRequiredDescription
webset_idstringYesThe ID of the webset to retrieve.

List the collected URLs and items from a completed Exa Webset. Use this after polling Get Webset until its status is ‘completed’ to retrieve the discovered results.

NameTypeRequiredDescription
countintegerNoNumber of items to return per page. Defaults to 10.
cursorstringNoPagination cursor from a previous response to fetch the next page of items.
webset_idstringYesThe ID of the webset to retrieve items from.

List all Exa Websets in your account with optional pagination. Returns a list of websets with their IDs, statuses, and configurations.

NameTypeRequiredDescription
countintegerNoNumber of websets to return per page. Defaults to 10.
cursorstringNoPagination cursor from a previous response to fetch the next page.

Run in-depth research on a topic using Exa’s neural search. Performs a semantic search and returns results with full page text and AI-generated summaries, providing structured multi-source research output. Best for comprehensive topic analysis. Rate limit: 60 requests/minute.

NameTypeRequiredDescription
categorystringNoRestrict research to a specific content category for more targeted results.
exclude_domainsarray<string>NoJSON array of domains to exclude from research results.
include_domainsarray<string>NoJSON array of domains to restrict research sources to. Useful to focus on authoritative sources.
max_charactersintegerNoMaximum characters of text to extract per source page. Defaults to 5000.
num_resultsintegerNoNumber of sources to gather for the research (1–20). More sources provide broader coverage.
querystringYesThe research topic or question to investigate across the web.
start_published_datestringNoOnly include sources published after this date. ISO 8601 format.
summary_querystringNoOptional focused question to guide the AI page summaries. Defaults to the main research query.

Search the web using Exa’s AI-powered semantic or keyword search engine. Supports filtering by domain, date range, content category, and result type. Optionally returns page text, highlights, or summaries alongside search results. Rate limit: 60 requests/minute.

NameTypeRequiredDescription
categorystringNoRestrict results to a specific content category.
end_published_datestringNoOnly return pages published before this date. ISO 8601 format: YYYY-MM-DDTHH:MM:SS.000Z
exclude_domainsarray<string>NoJSON array of domains to exclude from results. Example: [“reddit.com”,“quora.com”]
include_domainsarray<string>NoJSON array of domains to restrict results to. Example: [“techcrunch.com”,“wired.com”]
include_textbooleanNoWhen true, returns the full text content of each result page (up to max_characters).
max_charactersintegerNoMaximum characters of page text to return per result when include_text is true. Defaults to 3000.
num_resultsintegerNoNumber of results to return (1–100). Defaults to 10.
querystringYesThe search query. For neural/auto type, natural language works best. For keyword type, use specific terms.
start_published_datestringNoOnly return pages published after this date. ISO 8601 format: YYYY-MM-DDTHH:MM:SS.000Z
typestringNoSearch type: ‘neural’ for semantic AI search (best for natural language), ‘keyword’ for exact-match keyword search, ‘auto’ to let Exa decide.
use_autopromptbooleanNoWhen true, Exa automatically rewrites the query to be more semantically effective.

Execute a complex web query designed to discover and return large sets of URLs (up to thousands) matching specific criteria. Websets are ideal for lead generation, market research, competitor analysis, and large-scale data collection. Returns a webset ID — poll status with GET /websets/v0/websets/&#123;id&#125;. High credit consumption.

NameTypeRequiredDescription
countintegerNoTarget number of URLs to collect. Can range from hundreds to thousands. Higher counts take longer and consume more credits.
entity_typestringNoThe type of entity to search for. Helps Exa understand what constitutes a valid result match.
exclude_domainsarray<string>NoJSON array of domains to exclude from webset results.
external_idstringNoOptional external identifier to tag this webset for reference in your system.
include_domainsarray<string>NoJSON array of domains to restrict webset sources to.
querystringYesThe search query describing what kinds of pages or entities to find. Be specific and descriptive for best results.