@exalabs/ai-sdk has 57,987 recorded weekly downloads on npm, an increase of 18.7% over the past 30 days, ranking #746 of 3,247 tracked listings.
About @exalabs/ai-sdk
Exa AI SDK
Exa is a Websearch API. Add Exa websearch tool to your LLMs in just a few lines of code. Giving your AI apps websearch capabilites. Works with AI SDK by Vercel.
Table of Contents
Installation
npm install @exalabs/ai-sdk
Quick Start
import { generateText, stepCountIs } from "ai";
import { webSearch } from "@exalabs/ai-sdk";
import { openai } from "@ai-sdk/openai";
const { text } = await generateText({
model: openai('gpt-5-nano'),
prompt: 'Tell me the latest developments in AI',
system: "Only use web search once per turn. Answer based on the information you have.",
tools: {
webSearch: webSearch(),
},
stopWhen: stepCountIs(3),
});
console.log(text);
Get your API key from the Exa Dashboard.
Defaults when you use webSearch():
- Type:
auto(best search) - Results:
10 - Text:
3000 characters per result - Livecrawl:
fallback(fresh content when needed)
Setup
- Get your API key from the Exa Dashboard
- Add it to your
.envfile:
EXA_API_KEY=your-api-key-here
That's it! The package reads it automatically.
Example
Here's a full-featured example combining the most useful search settings:
const { text } = await generateText({
model: openai('gpt-5-nano'),
prompt: 'Find the top AI companies in Europe founded after 2018',
tools: {
webSearch: webSearch({
type: "auto", // intelligent hybrid search
numResults: 6, // return up to 6 results
category: "company", // focus on companies
contents: {
text: { maxCharacters: 1000 }, // get up to 1000 chars per result
livecrawl: "preferred", // always get fresh content if possible
summary: true, // return an AI-generated summary for each result
},
}),
},
stopWhen: stepCountIs(5),
});
console.log(text);
All Options
webSearch({
// Search settings
type: "auto", // "auto", "keyword", "neural", "fast", "deep"
category: "news", // "company", "research paper", "news", "pdf",
// "github", "personal site", "linkedin profile", "financial report"
numResults: 10,
// Filter by domain
includeDomains: ["linkedin.com", "github.com"],
excludeDomains: ["wikipedia.com"],
// Filter by date (ISO 8601)
startPublishedDate: "2025-01-01T00:00:00.000Z",
endPublishedDate: "2025-12-31T23:59:59.999Z",
startCrawlDate: "2025-01-01T00:00:00.000Z",
endCrawlDate: "2025-12-31T23:59:59.999Z",
// Filter by text
includeText: ["AI"], // Must contain
excludeText: ["spam"], // Must not contain
// Location
userLocation: "US", // Two-letter country code
// Content options
contents: {
text: {
maxCharacters: 1000,
includeHtmlTags: false,
},
summary: {
query: "Main points",
},
livecrawl: "fallback", // "never", "fallback", "always", "preferred"
livecrawlTimeout: 10000,
subpages: 5,
subpageTarget: "about",
extras: {
links: 5,
imageLinks: 3,
},
},
})
TypeScript Support
Full TypeScript types included:
import { webSearch, ExaSearchConfig, ExaSearchResult } from "@exalabs/ai-sdk";
const config: ExaSearchConfig = {
numResults: 10,
type: "auto",
};
const search = webSearch(config);
Links
- GitHub Repository - View source code of this npm package
- Try npm Package - View on npm
- Vercel AI SDK Cookbook - Web search agent example featuring Exa
- API Dashboard - Try Exa API on the dashboard
- Get your API Keys - Get your API keys
- Documentation - Exa API documentation
- Exa Website - Learn more about Exa
License
MIT
Description from the npm listing.
- exa
- search
- ai-sdk
- vercel
- web-search
- ai
- tools
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (592)Similar npm AI SDKs plugins
All 20 @exalabs/ai-sdk alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@exalabs/ai-sdk. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.