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.
Supports authentication: API Key
Set up the agent connector
Section titled “Set up the agent connector”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.
-
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.

-
-
Create a connection in Scalekit
-
In Scalekit dashboard, go to Agent Auth → Create Connection. Find Exa and click Create.
-
Note the Connection name — you will use this as
connection_namein your code (e.g.,exa).

-
-
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
- Your User’s ID — a unique identifier for this user in your system (e.g.,
-
Click Save.

Via API (for production)
await scalekit.actions.upsertConnectedAccount({connectionName: 'exa',identifier: 'user_123',credentials: { api_key: 'your-exa-api-key' },});scalekit_client.actions.upsert_connected_account(connection_name="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 dashboardconst identifier = 'user_123'; // your user's unique identifier
// Get your credentials from app.scalekit.com → Developers → Settings → API Credentialsconst 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 hereconst result = await actions.request({ connectionName, identifier, path: '/search', method: 'POST', body: { query: 'LLM observability tools 2025', num_results: 5 },});console.log(result.data);import scalekit.client, osfrom dotenv import load_dotenvload_dotenv()
connection_name = "exa" # connection name from your Scalekit dashboardidentifier = "user_123" # your user's unique identifier
# Get your credentials from app.scalekit.com → Developers → Settings → API Credentialsscalekit_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
# Semantic search via Scalekit proxy — no API key needed hereresult = actions.request( connection_name=connection_name, identifier=identifier, path="/search", method="POST", json={"query": "LLM observability tools 2025", "num_results": 5})print(result)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.
Semantic search
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.
import scalekit.client, osfrom dotenv import load_dotenvload_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 accountresponse = actions.get_or_create_connected_account( connection_name="exa", identifier="user_123")connected_account = response.connected_account
# Search for AI infrastructure companies with summariesresult = 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.
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.
# Find companies similar to a known competitorresult = 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.
# Enrich a list of company URLs from your CRMcompany_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.
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.
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 jsonreport = result.resultprint("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.
import scalekit.client, osfrom dotenv import load_dotenvfrom langchain_openai import ChatOpenAIfrom langchain.agents import AgentExecutor, create_openai_tools_agentfrom 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 formattools = 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"])Tool list
Section titled “Tool list”exa_answer
Section titled “exa_answer”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.
| Name | Type | Required | Description |
|---|---|---|---|
exclude_domains | array<string> | No | JSON array of domains to exclude from answer sources. |
include_domains | array<string> | No | JSON array of domains to restrict source search to. Example: [“reuters.com”,“bbc.com”] |
include_text | boolean | No | When true, also returns the source page text alongside the synthesized answer. |
num_results | integer | No | Number of web sources to use when generating the answer (1–20). More sources improves accuracy but costs more credits. |
query | string | Yes | The question or query to answer from web sources. |
exa_crawl
Section titled “exa_crawl”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.
| Name | Type | Required | Description |
|---|---|---|---|
highlights_per_url | integer | No | Number of highlight sentences to return per URL when include_highlights is true. Defaults to 3. |
include_highlights | boolean | No | When true, returns the most relevant sentence-level highlights from each page. |
include_html_tags | boolean | No | When true, retains HTML tags in the extracted text. Defaults to false (plain text only). |
include_summary | boolean | No | When true, returns an AI-generated summary for each crawled page. |
max_characters | integer | No | Maximum characters of text to extract per page. Defaults to 5000. |
summary_query | string | No | Optional query to focus the AI summary on a specific aspect of the page. |
urls | array<string> | Yes | JSON array of URLs to crawl and extract content from. |
exa_delete_webset
Section titled “exa_delete_webset”Delete an Exa Webset by its ID. This permanently removes the webset and all its collected items. This action cannot be undone.
| Name | Type | Required | Description |
|---|---|---|---|
webset_id | string | Yes | The ID of the webset to delete. |
exa_find_similar
Section titled “exa_find_similar”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.
| Name | Type | Required | Description |
|---|---|---|---|
end_published_date | string | No | Only return pages published before this date. ISO 8601 format: YYYY-MM-DDTHH:MM:SS.000Z |
exclude_domains | array<string> | No | Array of domains to exclude from results. |
include_domains | array<string> | No | Array of domains to restrict results to. |
include_text | boolean | No | When true, returns the full text content of each result page. |
max_characters | integer | No | Maximum characters of page text to return per result when include_text is true. Defaults to 3000. |
num_results | integer | No | Number of similar results to return (1–100). Defaults to 10. |
start_published_date | string | No | Only return pages published after this date. ISO 8601 format: YYYY-MM-DDTHH:MM:SS.000Z |
url | string | Yes | The URL to find similar pages for. |
exa_get_webset
Section titled “exa_get_webset”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.
| Name | Type | Required | Description |
|---|---|---|---|
webset_id | string | Yes | The ID of the webset to retrieve. |
exa_list_webset_items
Section titled “exa_list_webset_items”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.
| Name | Type | Required | Description |
|---|---|---|---|
count | integer | No | Number of items to return per page. Defaults to 10. |
cursor | string | No | Pagination cursor from a previous response to fetch the next page of items. |
webset_id | string | Yes | The ID of the webset to retrieve items from. |
exa_list_websets
Section titled “exa_list_websets”List all Exa Websets in your account with optional pagination. Returns a list of websets with their IDs, statuses, and configurations.
| Name | Type | Required | Description |
|---|---|---|---|
count | integer | No | Number of websets to return per page. Defaults to 10. |
cursor | string | No | Pagination cursor from a previous response to fetch the next page. |
exa_research
Section titled “exa_research”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.
| Name | Type | Required | Description |
|---|---|---|---|
category | string | No | Restrict research to a specific content category for more targeted results. |
exclude_domains | array<string> | No | JSON array of domains to exclude from research results. |
include_domains | array<string> | No | JSON array of domains to restrict research sources to. Useful to focus on authoritative sources. |
max_characters | integer | No | Maximum characters of text to extract per source page. Defaults to 5000. |
num_results | integer | No | Number of sources to gather for the research (1–20). More sources provide broader coverage. |
query | string | Yes | The research topic or question to investigate across the web. |
start_published_date | string | No | Only include sources published after this date. ISO 8601 format. |
summary_query | string | No | Optional focused question to guide the AI page summaries. Defaults to the main research query. |
exa_search
Section titled “exa_search”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.
| Name | Type | Required | Description |
|---|---|---|---|
category | string | No | Restrict results to a specific content category. |
end_published_date | string | No | Only return pages published before this date. ISO 8601 format: YYYY-MM-DDTHH:MM:SS.000Z |
exclude_domains | array<string> | No | JSON array of domains to exclude from results. Example: [“reddit.com”,“quora.com”] |
include_domains | array<string> | No | JSON array of domains to restrict results to. Example: [“techcrunch.com”,“wired.com”] |
include_text | boolean | No | When true, returns the full text content of each result page (up to max_characters). |
max_characters | integer | No | Maximum characters of page text to return per result when include_text is true. Defaults to 3000. |
num_results | integer | No | Number of results to return (1–100). Defaults to 10. |
query | string | Yes | The search query. For neural/auto type, natural language works best. For keyword type, use specific terms. |
start_published_date | string | No | Only return pages published after this date. ISO 8601 format: YYYY-MM-DDTHH:MM:SS.000Z |
type | string | No | Search type: ‘neural’ for semantic AI search (best for natural language), ‘keyword’ for exact-match keyword search, ‘auto’ to let Exa decide. |
use_autoprompt | boolean | No | When true, Exa automatically rewrites the query to be more semantically effective. |
exa_websets
Section titled “exa_websets”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/{id}. High credit consumption.
| Name | Type | Required | Description |
|---|---|---|---|
count | integer | No | Target number of URLs to collect. Can range from hundreds to thousands. Higher counts take longer and consume more credits. |
entity_type | string | No | The type of entity to search for. Helps Exa understand what constitutes a valid result match. |
exclude_domains | array<string> | No | JSON array of domains to exclude from webset results. |
external_id | string | No | Optional external identifier to tag this webset for reference in your system. |
include_domains | array<string> | No | JSON array of domains to restrict webset sources to. |
query | string | Yes | The search query describing what kinds of pages or entities to find. Be specific and descriptive for best results. |