---
title: "Seltz Search API with LiteLLM: Python and Gateway"
url: "/docs/search/seltz"
canonical_url: "https://docs.litellm.ai/docs/search/seltz"
type: "docs"
last_updated: "2026-12-04"
summary: "Add Seltz web search to LiteLLM: call search() in the Python SDK or /v1/search on the AI Gateway, with scope, tier and domain filters."
related:
  - "/docs/search/webiq"
  - "/docs/skills"
---
# Seltz Search API with LiteLLM: Python and Gateway

> Index of all LiteLLM docs: https://docs.litellm.ai/llms.txt


Available in LiteLLM v1.114.0 and later.

[Seltz](https://seltz.ai?utm_source=litellm&utm_medium=integration&utm_campaign=marketplace) is a web search API for AI agents. It's exposed via a single `search()` call in the Python SDK and via the `/v1/search` endpoint on the AI Gateway.

**Get API Key:** [https://console.seltz.ai/api-keys?utm_source=litellm&utm_medium=integration&utm_campaign=marketplace](https://console.seltz.ai/api-keys?utm_source=litellm&utm_medium=integration&utm_campaign=marketplace)

LiteLLM sends `POST https://api.seltz.ai/v1/search`. Set `SELTZ_API_KEY` or pass `api_key`. The key goes in the `x-api-key` header. See the [Seltz Search API](https://docs.seltz.ai/api-reference/search?utm_source=litellm&utm_medium=integration&utm_campaign=marketplace).

The default host is `https://api.seltz.ai`. `api_base` is set on the SDK call or the proxy search tool, or `SELTZ_API_BASE` is set to use a different host. `/v1/search` is appended once. A base which already terminates in `/v1` or `/v1/search` goes down the same route. Pass `api_key` with a caller selected `api_base`. The key in `SELTZ_API_KEY` is not sent to that host. `SELTZ_API_KEY` with `SELTZ_API_BASE` is used when the call omits `api_base`.

## LiteLLM Python SDK

```python showLineNumbers title="Seltz Search"
import os
from litellm import search

os.environ["SELTZ_API_KEY"] = "..."

response = search(
    query="latest AI developments",
    search_provider="seltz",
    max_results=5
)
```

## LiteLLM AI Gateway

### 1. Setup config.yaml

```yaml showLineNumbers title="config.yaml"
model_list:
  - model_name: gpt-6.1-sol
    litellm_params:
      model: gpt-6.1-sol
      api_key: os.environ/OPENAI_API_KEY

search_tools:
  - search_tool_name: seltz-search
    litellm_params:
      search_provider: seltz
      api_key: os.environ/SELTZ_API_KEY
```

### 2. Start the proxy

```bash
litellm --config /path/to/config.yaml

# RUNNING on http://0.0.0.0:4000
```

### 3. Test the search endpoint

```bash showLineNumbers title="Test Request"
curl http://0.0.0.0:4000/v1/search/seltz-search \
  -H "Authorization: Bearer $LITELLM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "latest AI developments",
    "max_results": 5
  }'
```

## Parameters

| LiteLLM parameter | Seltz request |
| --- | --- |
| `query` | `query`. A list of queries is joined with spaces |
| `max_results` | `max_results` |
| `search_domain_filter` | `include_domains`. A native `include_domains` on the same call is sent in its place |
| `country` | Seltz has no country filter so the call returns 400. [`drop_params`](/docs/completion/drop_params) on, `country` is dropped |
| `max_tokens_per_page` | `fields.content.max_characters_per_result` at 4 chars a token, held within Seltz's 100 to 1,000,000. Unset it's 1,024 tokens. An integer written as text (e.g. a value from `os.environ/`) is read as that integer. Any other value that isn't an integer (e.g. `true` or `512.5`) returns 400. A native `fields` which returns page text will stay within the cap unless its `content` has set its own `max_characters_per_result`. |

`scope`, `tier`, `exclude_domains`, `from_date`, `to_date`, `fields` and `include_domains` all pass through. `tier` is passed through as-is. Seltz matches that name (case and surrounding whitespace ignored) and the name selects the price. See [Seltz pricing](https://docs.seltz.ai/pricing?utm_source=litellm&utm_medium=integration&utm_campaign=marketplace).

`scope` restricts the corpus. The values are `web` (beta), `news`, `wikipedia`, `people`, `companies` and `financial-reports`. Omitting `scope` searches the Seltz default scope. A scope that doesn't exist or that the key can't reach returns 404. `tier` is `base` or `pro`. Omitting `tier` selects `pro`. `base` returns first stage ranking and `pro` adds a ranking stage. Seltz will reject any tier name other than those two. `exclude_domains` drops results from those domains. `from_date` and `to_date` keep documents published on or after and on or before that point (a date, a UTC datetime or an offset such as `now-7d`). `fields` selects `content`, `snippets` and `properties`. `content` and `snippets` take `true`, `false` or an options object and `null` is unset. `properties` is returned unless it is `false` or an empty array.

```python showLineNumbers title="Seltz Search with Provider-specific Parameters"
import os
from litellm import search

os.environ["SELTZ_API_KEY"] = "..."

response = search(
    query=["latest", "AI developments"],
    search_provider="seltz",
    max_results=5,
    search_domain_filter=["example.com"],
    scope="news",
    tier="base",
    exclude_domains=["spam.example"],
    from_date="now-7d",
    to_date="2025-10-28",
    fields={"snippets": True}
)
```

That call takes `query` to `"latest AI developments"` and `search_domain_filter` to `include_domains`. `tier` remains `"base"`.

## Response

Seltz docs have no title so `title` is the page URL. When Seltz returns passages `snippet` is the passage text with newlines and `content` remains on the result. Otherwise `content` becomes the `snippet`. The page text and the passages are not sent twice. `published_date` is copied to `date` and `date` is null if Seltz has no date for the page. `properties` remains on the result if Seltz returns it and `request_id` remains on the response. The other document and response fields are all kept. `title`, `url`, `snippet`, `date`, `object` and `results` retain these mapped values if the payload also contains those keys. `last_updated` is null.

```json title="Seltz search response"
{
  "object": "search",
  "request_id": "req-1",
  "results": [
    {
      "title": "https://example.com/filing",
      "url": "https://example.com/filing",
      "snippet": "Revenue grew.",
      "date": "2025-10-28T00:00:00Z",
      "last_updated": null,
      "content": "Revenue grew 12% on strong demand for the new line.",
      "properties": {"company": {"name": "Example"}}
    }
  ]
}
```

### Result size

No `max_tokens_per_page`, LiteLLM will ask Seltz for at most 4,096 chars of page text per result (the 1,024 tokens that [search API](/docs/search) documents as its default) and that text becomes the `snippet`. Ten results can still add up to around 41,000 chars to the model's context via [web search interception](/docs/integrations/websearch_interception). You can still set `max_tokens_per_page` on the search tool to have it send less or more (up to Seltz's 1,000,000 char limit). A native `fields` that returns page text will respect that cap unless its `content` has set its own `max_characters_per_result`.

```yaml showLineNumbers title="config.yaml"
search_tools:
  - search_tool_name: seltz-search
    litellm_params:
      search_provider: seltz
      api_key: os.environ/SELTZ_API_KEY
      max_tokens_per_page: 512
```

With `max_tokens_per_page: 512` each result has at most 2,048 characters of page text. `fields: {"snippets": true}` returns just the best passages from each page.

## Cost

LiteLLM prices each Seltz search from the [model cost map](/docs/proxy/model_cost_map). [Seltz lists](https://docs.seltz.ai/pricing?utm_source=litellm&utm_medium=integration&utm_campaign=marketplace) Pro at $5 per 1k searches and Base at $3 per 1k. Omit `tier` (it's Pro) so that search is $0.005. `tier` `base` is $0.003.

| `tier` | Cost map entry | Price per search |
| --- | --- | --- |
| omitted | `seltz/search` | $0.005 |
| `pro` | `seltz/search-pro` | $0.005 |
| `base` | `seltz/search-base` | $0.003 |

`BASE` and ` Base ` use `seltz/search-base`. The request still transmits the tier string as it is. A tier name other than `base` or `pro` is priced at `seltz/search`. Seltz will reject that tier name. The same pricing applies to the SDK, every `/search` route on the proxy and the web searches that the proxy does for [web search interception](/docs/integrations/websearch_interception).

To bill your own rate you set `input_cost_per_query` on the search tool as per [Custom Per-Query Pricing](/docs/search#custom-per-query-pricing). A price that you register for `seltz/search` with `litellm.register_model` will continue to apply to a tiered search until you also register that tier's entry (e.g. `seltz/search-base`).

## Related pages

- [Microsoft Web IQ Search](https://docs.litellm.ai/docs/search/webiq.md)
- [/skills - Anthropic Skills API](https://docs.litellm.ai/docs/skills.md)
