---
name: api.exa.ai
description: api.exa.ai provides two complementary web retrieval capabilities: a neural and keyword search engine that returns ranked web results, and a content fetcher that retrieves full text from specific URLs. Together they cover the discover-then-read pattern common in research and information extraction workflows.
host: api.exa.ai
---

# api.exa.ai

Exa is a web search and content retrieval API serving agents that need to find and read web content programmatically. It distinguishes itself by supporting both neural (semantic) and keyword search modes alongside direct URL content extraction. It is not a general-purpose database, vector store, or real-time data feed — it is specifically oriented toward web document discovery and retrieval.

## When to use this host

Use api.exa.ai when an agent needs to discover web pages via semantic or keyword search, retrieve full article or document text from known URLs, or chain both steps together for a research workflow. Do not use it for real-time or streaming data (use a dedicated market or event data API instead), private document search (use a vector database or RAG pipeline over your own corpus), structured database queries, or JavaScript-rendered single-page applications that require a headless browser. If the agent already has the target URLs, skip search-web-exa and call fetch-web-contents directly.

## Capabilities

### Web Search

Discovers relevant web pages and documents by running neural or keyword queries against the web, returning ranked results with titles, URLs, dates, relevance scores, and optional snippets.

- **`search-web-exa`** — Performs a neural or keyword web search via Exa and returns ranked results with titles, URLs, published dates, relevance scores, and optional text/highlight snippets.

### Web Content Retrieval

Fetches the full text and metadata of known URLs, enabling agents to read and process the body of specific web pages or documents after discovery.

- **`fetch-web-contents`** — Fetches the full text and metadata of web pages or documents by URL using the Exa content retrieval API.

## Workflows

### Search and Read

*Use when an agent needs to find web content on a topic and then read the full text of the most relevant results, rather than relying on snippets alone.*

1. **`search-web-exa`** — Run a neural or keyword query to discover candidate URLs ranked by relevance.
2. **`fetch-web-contents`** — Fetch the full text of the top-ranked URLs returned by the search for deeper reading or extraction.

## Skill reference

### `search-web-exa`

**Exa Web Search** — Performs a neural or keyword web search via Exa and returns ranked results with titles, URLs, published dates, relevance scores, and optional text/highlight snippets.

*Use when:* Use when an agent needs to retrieve current or historical web content matching a natural-language or keyword query, especially for research, fact-checking, or surfacing recent publications and articles.

*Not for:* Do not use for real-time streaming data feeds, structured database lookups, or queries requiring sub-second latency; use a dedicated data API instead. Not suitable as a replacement for a vector similarity search over private document stores.

**Inputs:**

- `query` (string, required) — Natural-language or keyword search query to send to Exa.
- `type` (string) — Search mode: 'neural' for semantic/embedding-based search or 'keyword' for traditional keyword matching.
- `numResults` (integer) — Number of results to return. Controls how many ranked results are included in the response.
- `contents` (object) — Object controlling what content fields are returned per result. Supports 'text' (boolean) to include article body text and 'highlights' (boolean) to include relevant excerpt snippets.

**Returns:** Returns a requestId, resolvedSearchType, and a results array where each entry includes id, title, url, publishedDate, author, relevance score, and optional full text or highlight snippets.

**Example:** `{"type": "neural", "query": "recent advancements in transformer-based medical imaging segmentation (2024 OR 2025)", "contents": {"text": true, "highlights": true}, "numResults": 10}`

---

### `fetch-web-contents`

**Exa Contents Fetch** — Fetches the full text and metadata of web pages or documents by URL using the Exa content retrieval API.

*Use when:* Use when an agent needs to retrieve the actual text content of one or more specific URLs — for example, to read an article, extract document text, or process a web page's body after a search has already returned candidate URLs.

*Not for:* Do not use for discovering new URLs or running keyword/semantic searches; use the Exa search endpoint instead. Not suitable for real-time streaming content or JavaScript-heavy SPAs that require browser rendering.

**Inputs:**

- `ids` (array, required) — List of URLs or Exa document IDs whose content should be fetched.

**Returns:** Returns a results array where each element contains the fetched text content and associated metadata for each requested URL or document ID.

**Example:** `{"ids": ["https://example.com/article", "https://another.com/page"]}`

---
