# com.livtet.searchEditionsTypeahead

> Prefix completion over the catalog for a search field. Every whitespace-separated term must prefix-match the edition title, subtitle, or a contributor name; results are ranked by the catalog index and hydrated to full edition views. Anonymous; no session or scope is required.

- Kind: query
- Authority: livtet.com
- Lexicon: 1
- Published by [biblio.livtet.com](https://lexicon.garden/identity/did:plc:e2x3ihw2ntxt7pcgzmtu3abi), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.searchEditionsTypeahead)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.searchEditionsTypeahead/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.searchEditionsTypeahead/analytics)

## Query (`com.livtet.searchEditionsTypeahead`)

Type: query · GET

### Parameters (query string)

- `limit` (integer): Maximum number of editions to return.
  - Constraints: minimum: 1, maximum: 25, default: 8
- `q` (string, required): Text typed so far. At least two characters; each whitespace-separated term is matched as a prefix.
  - Constraints: minLength: 2, maxLength: 200

### Output (application/json)

- `items` (array, required): Editions whose title, subtitle or contributors complete the typed terms, best match first.
  - `items` (ref)
    - Reference: `community.lexicon.media.book.defs#editionView`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Prefix completion over the catalog for a search field. Every whitespace-separated term must prefix-match the edition title, subtitle, or a contributor name; results are ranked by the catalog index and hydrated to full edition views. Anonymous; no session or scope is required.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "items": {
              "description": "Editions whose title, subtitle or contributors complete the typed terms, best match first.",
              "items": {
                "ref": "community.lexicon.media.book.defs#editionView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "items"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "limit": {
            "default": 8,
            "description": "Maximum number of editions to return.",
            "maximum": 25,
            "minimum": 1,
            "type": "integer"
          },
          "q": {
            "description": "Text typed so far. At least two characters; each whitespace-separated term is matched as a prefix.",
            "maxLength": 200,
            "minLength": 2,
            "type": "string"
          }
        },
        "required": [
          "q"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "com.livtet.searchEditionsTypeahead",
  "lexicon": 1
}
```
