EX

Quick-start examples for integrating Exa search patterns into your Node.js application.

Install

mkdir -p .claude/skills/exa-hello-world && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3510" && unzip -o skill.zip -d .claude/skills/exa-hello-world && rm skill.zip

Installs to .claude/skills/exa-hello-world

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Create a minimal working Exa search example with real results.
62 charsno explicit “when” trigger
Beginner

Key capabilities

  • Perform basic Exa searches for metadata
  • Search and retrieve page content with results
  • Find semantically similar pages based on a URL
  • Get content for specific known URLs
  • Demonstrate Exa client initialization
  • Print search results with titles, URLs, and scores

How it works

The skill provides runnable TypeScript examples that demonstrate core Exa search operations, including basic search, search with contents, find similar, and get contents.

Inputs & outputs

You give it
A search query, a URL for similarity search, or a list of URLs for content retrieval
You get back
Search results with titles, URLs, scores, content, highlights, or summaries

When to use exa-hello-world

  • Testing Exa API credentials
  • Implementing basic keyword search
  • Fetching website content for RAG

About this skill

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);

// Basic search returns URLs, titles, and scores — no page content
const results = await exa.search("best practices for building RAG pipelines", {
  type: "auto",       // auto | neural | keyword | fast | instant
  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

// searchAndContents returns text, highlights, and/or summary with each result
const results = await exa.searchAndContents(
  "how transformers work in large language models",
  {
    type: "neural",
    numResults: 3,
    text: { maxCharacters: 1000 },
    highlights: { maxCharacters: 500, query: "attention mechanism" },
    summary: { query: "explain transformers simply" },
  }
);

for (const r of results.results) {
  console.log(`## ${r.title}`);
  console.log(`URL: ${r.url}`);
  console.log(`Summary: ${r.summary}`);
  console.log(`Text preview: ${r.text?.substring(0, 200)}...`);
  console.log(`Highlights: ${r.highlights?.join(" | ")}`);
  console.log();
}

Step 3: Find Similar Pages

// findSimilar takes a URL and returns semantically similar pages
const similar = await exa.findSimilarAndContents(
  "https://arxiv.org/abs/2301.00234",
  {
    numResults: 5,
    text: { maxCharacters: 500 },
    excludeSourceDomain: true,
  }
);

console.log("Pages similar to the seed URL:");
for (const r of similar.results) {
  console.log(`  ${r.title} — ${r.url}`);
}

Step 4: Get Contents for Known URLs

// getContents retrieves page content for specific URLs
const contents = await exa.getContents(
  ["https://example.com/article-1", "https://example.com/article-2"],
  {
    text: { maxCharacters: 2000 },
    highlights: { maxCharacters: 500 },
    livecrawl: "preferred",
    livecrawlTimeout: 10000,
  }
);

for (const r of contents.results) {
  console.log(`${r.title}: ${r.text?.length} chars retrieved`);
}

Output

  • Working TypeScript file with Exa client initialization
  • Search results printed to console with titles, URLs, and scores
  • Content extraction (text, highlights, summary) demonstrated
  • Similarity search results from a seed URL

Error Handling

ErrorHTTP CodeCauseSolution
INVALID_API_KEY401API key missing or invalidCheck EXA_API_KEY env var
INVALID_REQUEST_BODY400Malformed parametersVerify parameter types match SDK docs
NO_MORE_CREDITS402Account credits depletedTop up at dashboard.exa.ai
429 Too Many Requests429Rate limit exceededWait and retry; default is 10 QPS
Empty results array200Query too narrow or filters too strictBroaden query or relax date/domain filters

Examples

Complete Runnable Script

import Exa from "exa-js";

const exa = new Exa(process.env.EXA_API_KEY);

async function main() {
  // 1. Search
  const search = await exa.search("AI safety research", { numResults: 3 });
  console.log(`Found ${search.results.length} results\n`);

  // 2. Search with contents
  const detailed = await exa.searchAndContents("AI safety research", {
    numResults: 2,
    text: true,
    highlights: { maxCharacters: 300 },
  });
  console.log("First result text length:", detailed.results[0]?.text?.length);

  // 3. Find similar
  if (search.results[0]) {
    const similar = await exa.findSimilar(search.results[0].url, {
      numResults: 3,
    });
    console.log("\nSimilar pages:", similar.results.map(r => r.title));
  }
}

main().catch(console.error);

Resources

Next Steps

Proceed to exa-core-workflow-a for neural search patterns or exa-sdk-patterns for production-ready code.

When not to use it

  • When the API key is missing or invalid
  • When account credits are depleted
  • When the query is too narrow or filters are too strict

Prerequisites

`exa-js` SDK installed (`npm install exa-js`)`EXA_API_KEY` environment variable setNode.js 18+ with ES module support

Limitations

  • API key must be configured correctly
  • Account must have sufficient credits for operations
  • Rate limits apply to API requests

How it compares

This skill offers minimal, runnable examples for Exa API operations, providing immediate testing and learning, unlike reading API documentation alone.

Compared to similar skills

exa-hello-world side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
exa-hello-world (this skill)124dReviewBeginner
data01moReviewIntermediate
mcp-builder1363moReviewAdvanced
telegram-mini-app626moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

data

salazarsebas

Querying Stellar chain data via Stellar RPC (preferred) and Horizon (legacy). Covers RPC JSON-RPC methods, Horizon REST endpoints, streaming, pagination, historical queries, Hubble/Galexie for deep history, and the RPC/Horizon migration story. Use when reading balances, transactions, operations, led

00

mcp-builder

anthropics

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

136215

telegram-mini-app

davila7

Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.

62163

stripe-integration

wshobson

Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.

48165

copilot-sdk

github

Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.

763

nodejs-backend-patterns

wshobson

Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.

1246

Search skills

Search the agent skills registry