> ## 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.

# API reference

> Technical reference for the Andi AI Search API endpoints.

The Andi AI Search API has three endpoints: search, fetch, and news.

## Base URL

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

## Authentication

Pass your API key in the `x-api-key` header with every request:

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

Get an API key from the [API Console](https://console.andiai.com).

## Endpoints

| Method | Path                  | Description                                                                                                                   |
| ------ | --------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `GET`  | `/api/v1/search`      | Search the web. Returns JSON, or LLM-ready markdown with `format=context`.                                                    |
| `POST` | `/api/v1/search`      | Search the web with parameters in a JSON body. Preferred for location-bearing requests. Same output formats as GET.           |
| `GET`  | `/api/v1/fetch`       | Fetch a web page as clean extracted content (JSON or LLM-ready markdown). See [content retrieval](/search/content-retrieval). |
| `GET`  | `/api/v1/news/:topic` | Curated, ranked news feed for one of 23 fixed topics — no query required. See [news feeds](/search/news-feeds).               |

The search endpoint sets the right search effort per query automatically (`searchMode=auto`, the default), with fixed [search modes](/search/search-modes) (`low-cost`, `fast`, `balanced`, `deep`, `exhaustive`) for manual control, or an `effort` parameter (`low`, `medium`, `high`, `max`) that pins the same tiers by generic name. It supports multiple output formats and filtering by domain, date, content type, and more.

Browse the **Endpoints** section in the sidebar to try the endpoints in the interactive playground.

## Pricing

Every JSON response includes `metrics.cost_dollars` — the amount charged to your account for that request in USD, after any discounts.

**Search:** Priced on outcome — the charge reflects the actual work each search performed, so simpler queries cost less. With the default `auto` mode, the price follows the effort Andi chose for the query; a pinned mode makes cost more uniform call to call.

**Fetch:** Flat $0.001 base per request, plus $0.05 per 1M tokens of extracted content. Failed fetches (422 and 503 responses) are free.

**News:** Billed like a search request — a per-token rate on the returned feed, no flat per-call fee. Cache hits bill the token rate only.

## Next steps

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

  <Card title="Search modes" icon="gauge-high" href="/search/search-modes">
    Automatic effort by default, manual control when you want it.
  </Card>

  <Card title="Query parameters" icon="sliders" href="/features/query-parameters">
    Full parameter reference.
  </Card>

  <Card title="Content retrieval" icon="file-lines" href="/search/content-retrieval">
    Fetch endpoint reference.
  </Card>

  <Card title="News feeds" icon="rss" href="/search/news-feeds">
    News endpoint reference.
  </Card>
</CardGroup>
