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

# Query parameters

> Complete reference for all Andi AI Search API query parameters.

All parameters are passed as query string parameters on the `GET /api/v1/search` endpoint.

<Tip>
  Most integrations only need `q`, `limit`, and `depth`. The filtering and output parameters below are available when you need more control.
</Tip>

## Core parameters

| Parameter | Type    | Default      | Description                                                                                                            |
| --------- | ------- | ------------ | ---------------------------------------------------------------------------------------------------------------------- |
| `q`       | string  | **required** | Search query string. Also accepts a JSON array of up to 5 queries (e.g., `["query one", "query two"]`).                |
| `limit`   | integer | `10`         | Maximum results to return (1–100)                                                                                      |
| `offset`  | integer | `0`          | Results to skip for pagination                                                                                         |
| `depth`   | string  | `fast`       | Search mode: `fast` (single search, \~1s) or `deep` (searches from multiple angles for higher-quality results, \~2–3s) |
| `intent`  | string  | auto         | Force search intent. See [intent values](#intent-values) below.                                                        |

### Intent values

When not set, the API auto-detects intent from the query. You can force a specific intent using common aliases:

| Alias       | Description         | Alias       | Description         |
| ----------- | ------------------- | ----------- | ------------------- |
| `search`    | General web search  | `news`      | Latest news results |
| `video`     | Video search        | `images`    | Image search        |
| `weather`   | Weather data        | `calculate` | Math computation    |
| `wiki`      | Wikipedia/knowledge | `knowledge` | Academic knowledge  |
| `code`      | Programming results | `recipe`    | Recipe results      |
| `place`     | Business search     | `places`    | Location search     |
| `questions` | Q\&A results        | `time`      | Time queries        |

The API also accepts full intent names (e.g., `FallbackSearchIntent`, `VideoSearchIntent`) and resolves matches flexibly through exact match, case-insensitive match, and substring match.

```bash theme={null}
# Force news intent
curl "https://search-api.andisearch.com/api/v1/search?q=AI+startups&intent=news" \
  -H "x-api-key: YOUR_API_KEY"
```

## Output parameters

| Parameter  | Type    | Default | Description                                                                                                                           |
| ---------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `format`   | string  | `json`  | Response format: `json` or `context`. The `context` format returns results as markdown text, suitable for passing to language models. |
| `metadata` | string  | `basic` | Metadata level: `basic` or `full`. With `full`, results include `contentType` and `reader` data.                                      |
| `extracts` | boolean | `false` | Include longer text extracts from result pages                                                                                        |

```bash theme={null}
# Get results as markdown for LLM context
curl "https://search-api.andisearch.com/api/v1/search?q=machine+learning&format=context" \
  -H "x-api-key: YOUR_API_KEY"

# Get results with text extracts
curl "https://search-api.andisearch.com/api/v1/search?q=machine+learning&extracts=true" \
  -H "x-api-key: YOUR_API_KEY"
```

<Warning>
  `metadata=full` adds latency because it fetches additional data from each result page. Use it only when you need `contentType` or `reader` data.
</Warning>

## Filtering parameters

| Parameter  | Type   | Default | Description                                                                                                                             |
| ---------- | ------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `safe`     | string | `off`   | Safe search level: `off`, `moderate`, or `strict`                                                                                       |
| `country`  | string | `US`    | ISO 3166-1 country code (e.g., `US`, `GB`, `DE`)                                                                                        |
| `language` | string | `en`    | ISO 639-1 language code (e.g., `en`, `es`, `fr`)                                                                                        |
| `units`    | string | auto    | Unit system for weather/calculations: `metric`, `imperial`. Defaults based on `country` — `imperial` for `US`, `metric` for all others. |

## Date filtering

| Parameter   | Type   | Description                                                                     |
| ----------- | ------ | ------------------------------------------------------------------------------- |
| `dateRange` | string | Relative range: `day`, `week`, `month`, `year`, `24h`, `7d`, `30d`, `90d`, `1y` |
| `dateFrom`  | date   | Results published on or after this date (`YYYY-MM-DD`)                          |
| `dateTo`    | date   | Results published on or before this date (`YYYY-MM-DD`)                         |

Use either `dateRange` for relative filtering or `dateFrom`/`dateTo` for absolute date ranges. See [filtering](/features/filtering) for details.

```bash theme={null}
# Results from the past week
curl "https://search-api.andisearch.com/api/v1/search?q=AI+news&dateRange=week" \
  -H "x-api-key: YOUR_API_KEY"
```

## Domain filtering

| Parameter        | Type   | Description                                     |
| ---------------- | ------ | ----------------------------------------------- |
| `includeDomains` | string | Comma-separated domains to restrict results to  |
| `excludeDomains` | string | Comma-separated domains to exclude from results |

Both support wildcards: `*.example.com` matches all subdomains. See [filtering](/features/filtering) for details.

```bash theme={null}
# Search only on specific sites
curl "https://search-api.andisearch.com/api/v1/search?q=python+tutorials&includeDomains=docs.python.org,realpython.com" \
  -H "x-api-key: YOUR_API_KEY"
```

## Term filtering

| Parameter      | Type   | Description                                       |
| -------------- | ------ | ------------------------------------------------- |
| `includeTerms` | string | Comma-separated terms that must appear in results |
| `excludeTerms` | string | Comma-separated terms to exclude from results     |

## Content filtering

| Parameter  | Type   | Description                                      |
| ---------- | ------ | ------------------------------------------------ |
| `filetype` | string | File extension to filter by (e.g., `pdf`, `doc`) |
| `intitle`  | string | Term that must appear in the page title          |
| `inurl`    | string | Term that must appear in the page URL            |
| `intext`   | string | Term that must appear in the page body           |

## Behavior parameters

| Parameter        | Type    | Default | Description                                                              |
| ---------------- | ------- | ------- | ------------------------------------------------------------------------ |
| `noCache`        | boolean | `false` | Bypass cached results                                                    |
| `parseOperators` | boolean | `true`  | Parse [query operators](/features/query-operators) from the query string |
| `linkFormat`     | string  | `link`  | Field name for result URLs: `link` (default) or `url`                    |

## Examples

### Paginated search

```bash theme={null}
# First page
curl "https://search-api.andisearch.com/api/v1/search?q=machine+learning&limit=10" \
  -H "x-api-key: YOUR_API_KEY"

# Second page
curl "https://search-api.andisearch.com/api/v1/search?q=machine+learning&limit=10&offset=10" \
  -H "x-api-key: YOUR_API_KEY"
```

### Deep search with extracts

```bash theme={null}
curl "https://search-api.andisearch.com/api/v1/search?q=climate+change+effects&depth=deep&extracts=true" \
  -H "x-api-key: YOUR_API_KEY"
```

### Filtered by date and domain

```bash theme={null}
curl "https://search-api.andisearch.com/api/v1/search?q=product+launch&dateRange=month&includeDomains=techcrunch.com,theverge.com" \
  -H "x-api-key: YOUR_API_KEY"
```

### Multi-query search

```bash theme={null}
curl -G "https://search-api.andisearch.com/api/v1/search" \
  --data-urlencode 'q=["artificial intelligence", "machine learning"]' \
  -H "x-api-key: YOUR_API_KEY"
```

<Note>
  Multi-query search accepts a JSON array of up to 5 queries and returns combined results in a single response. URL-encode the JSON array when passing it as a query parameter.
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Filtering" icon="filter" href="/features/filtering">
    Domain, date, and content filtering in depth.
  </Card>

  <Card title="Query operators" icon="terminal" href="/features/query-operators">
    In-query operators like `site:` and `filetype:`.
  </Card>

  <Card title="Basic search example" icon="code" href="/examples/basic-search">
    Complete integration with error handling.
  </Card>

  <Card title="Response format" icon="brackets-curly" href="/features/response-format">
    Response structure and result types.
  </Card>
</CardGroup>
