# pub.chive.tag.getSuggestions

> 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.tag.getSuggestions)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.tag.getSuggestions/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.tag.getSuggestions/examples)

## Definitions

### `pub.chive.tag.getSuggestions`

**Type**: `query`

Get tag suggestions based on a query using the TaxoFolk system

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `q` | `string` | Yes | Query string to get suggestions for |
| `limit` | `integer` | No | Maximum number of suggestions to return |

#### Output

**Encoding**: `application/json`

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

### `pub.chive.tag.getSuggestions#tagSuggestion`

**Type**: `object`

A tag suggestion from the TaxoFolk system

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `source` | `string` | Yes | Source of the suggestion |
| `confidence` | `integer` | Yes | Suggestion confidence (0-100, scaled from 0-1) |
| `displayForm` | `string` | Yes | Suggested display form |
| `matchedTerm` | `string` | No | Term that triggered this suggestion |
| `normalizedForm` | `string` | Yes | Normalized form of the suggestion |

## Raw Schema

```json
{
  "id": "pub.chive.tag.getSuggestions",
  "defs": {
    "main": {
      "type": "query",
      "errors": [],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "suggestions"
          ],
          "properties": {
            "suggestions": {
              "type": "array",
              "items": {
                "ref": "#tagSuggestion",
                "type": "ref"
              },
              "description": "List of tag suggestions"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "q"
        ],
        "properties": {
          "q": {
            "type": "string",
            "maxLength": 100,
            "minLength": 2,
            "description": "Query string to get suggestions for"
          },
          "limit": {
            "type": "integer",
            "default": 10,
            "maximum": 20,
            "minimum": 1,
            "description": "Maximum number of suggestions to return"
          }
        }
      },
      "description": "Get tag suggestions based on a query using the TaxoFolk system"
    },
    "tagSuggestion": {
      "type": "object",
      "required": [
        "displayForm",
        "normalizedForm",
        "confidence",
        "source"
      ],
      "properties": {
        "source": {
          "type": "string",
          "description": "Source of the suggestion",
          "knownValues": [
            "cooccurrence",
            "authority",
            "facet"
          ]
        },
        "confidence": {
          "type": "integer",
          "maximum": 100,
          "minimum": 0,
          "description": "Suggestion confidence (0-100, scaled from 0-1)"
        },
        "displayForm": {
          "type": "string",
          "description": "Suggested display form"
        },
        "matchedTerm": {
          "type": "string",
          "description": "Term that triggered this suggestion"
        },
        "normalizedForm": {
          "type": "string",
          "description": "Normalized form of the suggestion"
        }
      },
      "description": "A tag suggestion from the TaxoFolk system"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
