Skip to main content
The Andi CLI (@andiai/cli on npm) is a thin client for the hosted API: web search, page fetch, and a local MCP server, with no local index or ranking.

Install

Install it globally:
Or run it directly without installing:

Authentication

Get a key from the API Console. The CLI reads it from, in order of precedence: the --api-key flag, the ANDI_API_KEY environment variable, or ~/.andi/config.json ({"apiKey": "..."}).
andi --help and andi schema work without a key.
Pass up to 5 queries at once — they run as a single API call with fused, deduplicated ranking:
--mode accepts the same values as searchMode: auto (default), low-cost, fast, balanced, deep, exhaustive. Filters mirror the query parameters: --country, --language, --safe, --date-range, --include-domains, --exclude-domains. Add --content to return full page content for each result instead of extracts.

Fetch a page

--query focuses the extracts on what you want from the page. See content retrieval for the underlying endpoint.

Output

--format auto|json|markdown controls the shape. The default writes human-readable markdown on an interactive terminal and a JSON envelope ({"ok": true, "data": ..., "meta": {...}}) when piped or redirected. --json forces JSON. Exit codes distinguish auth failures, exhausted credits, and invalid arguments — run andi schema for a machine-readable description of every command, flag, and exit code.

Local MCP server

andi mcp runs a stdio MCP server exposing the same tools as the hosted MCP server — for MCP clients that only support stdio transport:
For HTTP-capable clients, prefer the hosted endpoint directly — no install needed. See build with AI agents.

Let your agent set it up

Your agent installs and configures the Andi Search API itself — paste one line:
Paste into Claude Code, Cursor, or Codex
Your agent fetches andiai.com, follows it to the install guide at api.andiai.com, then gets an API key from the API Console, connects the MCP server, and verifies the setup.
Are you an AI agent? Fetch https://api.andiai.com/install.md and follow it to configure Andi Search — MCP server, API key, and verification.

Next steps

Build with AI agents

Hosted MCP server, Agent Skill, and discovery files.

Search modes

Automatic effort by default, manual control when you want it.

Query parameters

Full parameter reference.

CLI reference

Full command and flag reference on GitHub.