# com.suibari.nagi.searchTags

> 投稿欄の #タグ 入力候補。共有タイムラインに出る投稿のハッシュタグを前方一致で、投稿数の多い順に返す。集計は数分キャッシュされる。

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

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.searchTags)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.searchTags/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.searchTags/analytics)

## Query (`com.suibari.nagi.searchTags`)

Type: query · GET

### Parameters (query string)

- `limit` (integer)
  - Constraints: minimum: 1, maximum: 20, default: 10
- `q` (string, required): 入力中のタグ。先頭の # / ＃ と大文字小文字は無視する。
  - Constraints: maxLength: 640

### Output (application/json)

- `tags` (array, required)
  - Constraints: maxLength: 20
  - `items` (object)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "投稿欄の #タグ 入力候補。共有タイムラインに出る投稿のハッシュタグを前方一致で、投稿数の多い順に返す。集計は数分キャッシュされる。",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "tags": {
              "items": {
                "properties": {
                  "count": {
                    "description": "そのタグを持つ投稿数。",
                    "minimum": 1,
                    "type": "integer"
                  },
                  "tag": {
                    "description": "正規形（# を除いた小文字）。",
                    "type": "string"
                  }
                },
                "required": [
                  "tag",
                  "count"
                ],
                "type": "object"
              },
              "maxLength": 20,
              "type": "array"
            }
          },
          "required": [
            "tags"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "limit": {
            "default": 10,
            "maximum": 20,
            "minimum": 1,
            "type": "integer"
          },
          "q": {
            "description": "入力中のタグ。先頭の # / ＃ と大文字小文字は無視する。",
            "maxLength": 640,
            "type": "string"
          }
        },
        "required": [
          "q"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "com.suibari.nagi.searchTags",
  "lexicon": 1
}
```
