# app.didpic.feed.searchTags

> Published by [lexicons.didpic.app](https://lexicon.garden/identity/did:plc:an2jtp4jgkkbtmwfzhpbxawd)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:an2jtp4jgkkbtmwfzhpbxawd/app.didpic.feed.searchTags)
- [Documentation](https://lexicon.garden/lexicon/did:plc:an2jtp4jgkkbtmwfzhpbxawd/app.didpic.feed.searchTags/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:an2jtp4jgkkbtmwfzhpbxawd/app.didpic.feed.searchTags/examples)

## Definitions

### `app.didpic.feed.searchTags`

**Type**: `query`

Search hashtags by prefix, ordered by popularity (number of distinct records using the tag).

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `q` | `string` | Yes | Tag prefix (lowercased server-side). Empty result if blank. |
| `limit` | `integer` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tags` | `array` | Yes |  |

### `app.didpic.feed.searchTags#tagSuggestion`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tag` | `string` | Yes |  |
| `postCount` | `integer` | Yes | Number of distinct posts + comments using this tag. |

## Raw Schema

```json
{
  "id": "app.didpic.feed.searchTags",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "tags"
          ],
          "properties": {
            "tags": {
              "type": "array",
              "items": {
                "ref": "#tagSuggestion",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "q"
        ],
        "properties": {
          "q": {
            "type": "string",
            "description": "Tag prefix (lowercased server-side). Empty result if blank."
          },
          "limit": {
            "type": "integer",
            "default": 10,
            "maximum": 25,
            "minimum": 1
          }
        }
      },
      "description": "Search hashtags by prefix, ordered by popularity (number of distinct records using the tag)."
    },
    "tagSuggestion": {
      "type": "object",
      "required": [
        "tag",
        "postCount"
      ],
      "properties": {
        "tag": {
          "type": "string"
        },
        "postCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of distinct posts + comments using this tag."
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
