| name | exa-hello-world |
| description | Create a minimal working Exa search example with real results.
Use when starting a new Exa integration, testing your setup,
or learning basic search, searchAndContents, and findSimilar patterns.
Trigger with phrases like "exa hello world", "exa example",
"exa quick start", "simple exa search", "first exa query".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(node:*), Bash(npx:*) |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","exa","api","quickstart","neural-search"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Exa Hello World
Overview
Minimal working examples demonstrating all core Exa search operations: basic search, search with contents, find similar, and get contents. Each example is runnable standalone.
Prerequisites
exa-js SDK installed (npm install exa-js)
EXA_API_KEY environment variable set
- Node.js 18+ with ES module support
Instructions
Step 1: Basic Search (Metadata Only)
import Exa from "exa-js";
const exa = new Exa(process.env.EXA_API_KEY);
const results = await exa.search("best practices for building RAG pipelines", {
type: "auto",
numResults: 5,
});
for (const r of results.results) {
console.log(`[${r.score.toFixed(2)}] ${r.title}`);
console.log(` ${r.url}`);
}
Step 2: Search with Contents
const results = await exa.searchAndContents(
,
{
: ,
: ,
: { : },
: { : , : },
: { : },
}
);
( r results.) {
.();
.();
.();
.();
.();
.();
}