---
title: Andi AI Search API
description: Search API over an index of tens of billions of pages. Auto picks the right search mode for each query. Structured JSON, LLM-optimized output. Built for AI agents, RAG pipelines, and developers.
url: "https://andiai.com/api"
---

# Andi AI Search API

Search API with access to an AI-powered index of tens of billions of pages. Auto picks the right search mode for each query — from quick lookups to exhaustive research — with structured JSON and LLM-optimized output for RAG pipelines and agentic workflows.

## Agent quick start

Using Claude Code, Cursor, or Codex? Paste this line:

```
Set up Andi search for this project: andiai.com
```

Your agent reads [install.md](https://andiai.com/install.md) and configures everything: API key, MCP server, verification.

## Search Modes

**Hands-free by default.** `searchMode=auto` (the default) determines what each search needs — how much compute, which models, how deep to read — and adjusts automatically. Simple lookups come back quickly; hard questions get deeper treatment. Agents: add `preset=agent` (markdown, focused page text, extracts, auto mode, 16,000-token budget; `maxTokens` sizes it). Apps: the default returns JSON.

**Manual control when you want it:** pin an effort level with `searchMode` when you want the same behavior on every call — `instant` (~1.5s, at most 10 results, no page content), `low-cost`, `fast` (~2s), `balanced`, `deep` (~6.5s, thorough), or `exhaustive` (maximum coverage).

Full mode reference: [docs.andiai.com](https://docs.andiai.com).

## Built for AI Agents & Developers

- **Fetch Endpoint** — `GET /api/v1/fetch?url=...` reads any web page as clean extracted content (JSON or LLM-ready markdown). Failed fetches are free.
- **Outcome-Based Pricing** — priced by what it took to find and get the results: easy lookups cost less, hard-to-find content costs more. Every JSON response reports the exact charge in `metrics.cost_dollars`.
- **MCP Server** — Connect Claude Code, Cursor, or VS Code to `api.andiai.com/mcp`: a remote MCP server with web search and URL fetch tools. Streamable HTTP, authenticated with your API key. Claude Code plugin: https://github.com/andisearch/andi-agent-skills
- **LLM-Optimized Output** — `preset=agent` returns results as markdown built for LLM context windows, within a token budget you set with `maxTokens`.
- **One-Call Content** — Searches with `preset=agent` return ranked results with query-related extracts and focused page text — the passages from each page that answer the query, attributed to their sources. One request replaces the search-then-fetch-then-summarize loop.
- **Multi-Query Search** — Pass a JSON array of up to 5 queries in `q` for merged, deduplicated results in one response.
- **Accurate Results** — Built on Andi's own index of tens of billions of pages, with every page scored for meaning and credibility at ingestion. 87% accuracy in independent search benchmarks.
- **Standards Compatible** — Google Custom Search and OpenSearch-compatible `/api/v1/opensearch` endpoint alongside the main `/api/v1/search`.

## Quick Start

Apps (JSON, the default):

```
curl "https://api.andiai.com/api/v1/search?q=your+query" \
  -H "x-api-key: YOUR_API_KEY"
```

Agents (LLM-ready markdown with a token budget):

```
curl -s "https://api.andiai.com/api/v1/search?q=QUERY&preset=agent" -H "x-api-key: $ANDI_API_KEY"
```

## Key Stats

- Tens of billions of pages indexed
- #1 accuracy on independent search benchmarks
- Outcome-based pricing from under 1¢: you pay for what each search does, and every response reports its cost
- Results from 2–3 seconds

## Links

- [Agent setup instructions](https://andiai.com/install.md)
- [Get API access](https://console.andiai.com/signup)
- [API Documentation](https://docs.andiai.com)
- [API Console](https://console.andiai.com)
- Email: hello@andiai.com
