# pub.chive.claiming.autocomplete

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.claiming.autocomplete)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.claiming.autocomplete/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.claiming.autocomplete/examples)

## Definitions

### `pub.chive.claiming.autocomplete`

**Type**: `query`

Provides fast autocomplete suggestions for claiming search. Optimized for low latency with short timeouts.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `limit` | `integer` | No | Maximum number of suggestions to return |
| `query` | `string` | Yes | Search query prefix |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `suggestions` | `array` | Yes | List of autocomplete suggestions |

### `pub.chive.claiming.autocomplete#suggestion`

**Type**: `object`

An autocomplete suggestion for a claimable eprint

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `title` | `string` | Yes | Eprint title |
| `source` | `string` | Yes | External source identifier (e.g., arxiv, biorxiv) |
| `authors` | `string` | Yes | First 2 authors joined (e.g., 'Author1, Author2 et al.') |
| `externalId` | `string` | Yes | Source-specific identifier |
| `fieldMatchScore` | `integer` | No | User field relevance score (0-100), present if authenticated |
| `highlightedTitle` | `string` | No | Title with query portion highlighted using markdown bold |

## Raw Schema

```json
{
  "id": "pub.chive.claiming.autocomplete",
  "defs": {
    "main": {
      "type": "query",
      "errors": [],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "suggestions"
          ],
          "properties": {
            "suggestions": {
              "type": "array",
              "items": {
                "ref": "#suggestion",
                "type": "ref"
              },
              "description": "List of autocomplete suggestions"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "query"
        ],
        "properties": {
          "limit": {
            "type": "integer",
            "default": 8,
            "maximum": 10,
            "minimum": 1,
            "description": "Maximum number of suggestions to return"
          },
          "query": {
            "type": "string",
            "minLength": 2,
            "description": "Search query prefix"
          }
        }
      },
      "description": "Provides fast autocomplete suggestions for claiming search. Optimized for low latency with short timeouts."
    },
    "suggestion": {
      "type": "object",
      "required": [
        "title",
        "authors",
        "source",
        "externalId"
      ],
      "properties": {
        "title": {
          "type": "string",
          "description": "Eprint title"
        },
        "source": {
          "type": "string",
          "description": "External source identifier (e.g., arxiv, biorxiv)"
        },
        "authors": {
          "type": "string",
          "description": "First 2 authors joined (e.g., 'Author1, Author2 et al.')"
        },
        "externalId": {
          "type": "string",
          "description": "Source-specific identifier"
        },
        "fieldMatchScore": {
          "type": "integer",
          "maximum": 100,
          "minimum": 0,
          "description": "User field relevance score (0-100), present if authenticated"
        },
        "highlightedTitle": {
          "type": "string",
          "description": "Title with query portion highlighted using markdown bold"
        }
      },
      "description": "An autocomplete suggestion for a claimable eprint"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
