> ## Documentation Index
> Fetch the complete documentation index at: https://docs.andiai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Andi AI Search API

> Web search API for AI agents, RAG pipelines, and search applications. Structured, accurate results from a web index of tens of billions of pages.

The Andi AI Search API gives your applications access to web search results scored for accuracy and relevance, drawn from an index of tens of billions of pages. Responses are structured for direct use in AI agents, RAG pipelines, and search interfaces — ranked #1 for accuracy in independent search benchmarks.

## Add Andi to your agent

Your agent installs and configures the Andi Search API itself — paste one line:

```text title="Paste into Claude Code, Cursor, or Codex" theme={null}
Set up Andi search for this project: andiai.com
```

Your agent fetches `andiai.com`, follows it to the [install guide](https://api.andiai.com/install.md) at `api.andiai.com`, then gets an API key from the [API Console](https://console.andiai.com/signup), connects the MCP server, and verifies the setup.

<Note>
  **Are you an AI agent?** Fetch [https://api.andiai.com/install.md](https://api.andiai.com/install.md) and follow it to configure Andi Search — MCP server, API key, and verification.
</Note>

<CardGroup cols={4}>
  <Card title="Quickstart" icon="rocket" href="/getting-started/quickstart">
    Make your first API call in minutes.
  </Card>

  <Card title="CLI" icon="terminal" href="/getting-started/cli">
    Search and fetch from the command line.
  </Card>

  <Card title="For AI agents" icon="robot" href="/resources/ai-agents">
    MCP server, install.md, and agent tools.
  </Card>

  <Card title="Examples" icon="code" href="/examples/basic-search">
    Working code for common use cases.
  </Card>
</CardGroup>

## Base URL

```text theme={null}
https://api.andiai.com
```

## Authentication

All requests require an API key passed in the `x-api-key` header. Get your key from the [API Console](https://console.andiai.com/signup). The same key works across the REST API, the CLI, and the MCP server — see [authentication](/getting-started/authentication) for key management and security practices.

## Core endpoints

`/api/v1/search` searches the web. [`/api/v1/fetch`](/search/content-retrieval) reads a page as clean extracted content:

```bash theme={null}
curl "https://api.andiai.com/api/v1/search?q=hello+world" \
  -H "x-api-key: YOUR_API_KEY"
```

```bash theme={null}
curl "https://api.andiai.com/api/v1/fetch?url=https://example.com/article" \
  -H "x-api-key: YOUR_API_KEY"
```

## CLI

The [Andi CLI](/getting-started/cli) wraps search, fetch, and a local MCP server — search from your terminal without writing any code. It reads your key from the `ANDI_API_KEY` environment variable:

```bash theme={null}
export ANDI_API_KEY=YOUR_API_KEY
npm install -g @andiai/cli
andi search "hello world"
```

Or run it without installing: `npx -y @andiai/cli search "hello world"`

## MCP server

AI agents connect to the hosted [MCP server](/resources/ai-agents) to use Andi web search and page fetch as tools, authenticated with the same `x-api-key` header:

```text theme={null}
https://api.andiai.com/mcp
```

See [build with AI agents](/resources/ai-agents) for setup in Claude Code, Cursor, VS Code, Codex, and other MCP clients.

## What you can build

* **AI agents** that retrieve current information from the web
* **RAG applications** with real-time search grounding
* **Research tools** that gather and synthesize web sources
* **Search features** embedded in your own products

## Popular examples

<CardGroup cols={3}>
  <Card title="RAG pipeline" icon="brain" href="/examples/rag-pipeline">
    Search results as context for LLM generation.
  </Card>

  <Card title="AI agent tool" icon="robot" href="/examples/ai-agent-tool">
    Define search as a tool for AI agents.
  </Card>

  <Card title="News monitoring" icon="newspaper" href="/examples/news-monitoring">
    Automated news search with date filtering.
  </Card>
</CardGroup>
