> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seltz.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Decrease search latency

> How to trade result quality for lower latency with the base and pro search tiers.

Search accepts a `tier` parameter that picks between **latency** and **result quality**. Omit it and you get `pro`, the quality-oriented tier, which puts the most relevant results at the top. Send `base`, the latency-oriented tier, when a faster response is worth less precise ordering.

See [Search tiers](/search/search-concepts#search-tiers) for what each tier does.

The examples below request the `base` tier.

<CodeGroup>
  ```python Python theme={null}
  from seltz import Seltz

  client = Seltz()

  # Latency-oriented: a faster response, less precise ordering
  response = client.search("Who is going to be Apple's next CEO?", tier="base")

  for doc in response.documents:
      print(f"- {doc.url}")
  ```

  ```typescript TypeScript theme={null}
  import { Seltz } from "seltz";

  const client = new Seltz();

  const result = await client.search({
    query: "Who is going to be Apple's next CEO?",
    tier: "base",
  });

  for (const doc of result.documents) {
    console.log(`- ${doc.url}`);
  }
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.seltz.ai/v1/search \
    -H "x-api-key: $SELTZ_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"query": "Who is going to be Apple'\''s next CEO?", "tier": "base"}'
  ```
</CodeGroup>

## When to choose `base`

`base` is the latency-oriented tier: responses come back faster, and ordering near the top of the list is less precise. Reach for it in the following cases:

* You apply your own ranking to the results, so the order Seltz returns is discarded anyway.
* You are pulling a large set of results to filter or aggregate over, rather than reading from the top down.
* Latency matters more to you than the quality of the first few results.

Otherwise leave `tier` unset. `pro` is the default because result quality is what most callers want, and every scope accepts it.

## Tier and scope are independent

`tier` decides the latency/quality trade-off; [`scope`](/data/data-concepts#scopes) decides which data is searched. Neither constrains the other, so any scope can be requested in either tier.

<CodeGroup>
  ```python Python theme={null}
  response = client.search("acme corp", scope="companies", tier="base")
  ```

  ```typescript TypeScript theme={null}
  const result = await client.search({
    query: "acme corp",
    scope: "companies",
    tier: "base",
  });
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.seltz.ai/v1/search \
    -H "x-api-key: $SELTZ_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"query": "acme corp", "scope": "companies", "tier": "base"}'
  ```
</CodeGroup>

## Handling an unknown tier

Tier names are matched case-insensitively with surrounding whitespace ignored, so `pro`, `PRO`, and `" Pro "` all name the same tier. A name the service does not recognize is rejected with a `400` rather than falling back to the default, and the error names the tiers it accepts:

```bash theme={null}
curl -X POST https://api.seltz.ai/v1/search \
  -H "x-api-key: $SELTZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "ai news", "tier": "turbo"}'
```

Rejecting rather than defaulting is deliberate: the tier you are served is always the tier you named. See [Errors](/api-reference/errors) for status codes and error handling.

## Next steps

* [Search tiers](/search/search-concepts#search-tiers) — What each tier does
* [Scope](/data/data-concepts#scopes) — The scopes available for Search
* [Search API Reference](/api-reference/search) — Full request and response specification
