> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qwairy.co/llms.txt
> Use this file to discover all available pages before exploring further.

# List Tags

> Analyze performance by tag

Track how your brand performs across different tags. Tags are custom labels you can apply to prompts for grouping and filtering.

<Note>
  See [Entities](/developers/entities#tag) for the complete Tag object structure.
</Note>

<ParamField header="Authorization" type="string" required>
  Bearer token. Example: `Bearer qw-api-xxx`
</ParamField>

### Path Parameters

<ParamField path="brandId" type="string" required>
  The unique identifier of the brand
</ParamField>

### Query Parameters

<ParamField query="period" type="number">
  Number of days to include. If not specified, returns all data.
</ParamField>

<ParamField query="startDate" type="string">
  Start date (ISO 8601 format)
</ParamField>

<ParamField query="endDate" type="string">
  End date (ISO 8601 format)
</ParamField>

<ParamField query="provider" type="string">
  Filter by AI provider. Supports comma-separated multi-select (e.g., `chatgpt,claude`).
</ParamField>

<ParamField query="topic" type="string">
  Filter by topic (keyword) ID. Supports comma-separated multi-select (e.g., `id1,id2`).
</ParamField>

<ParamField query="limit" type="number" default="50">
  Maximum number of tags to return (max: 100)
</ParamField>

<ParamField query="offset" type="number" default="0">
  Number of results to skip for pagination
</ParamField>

<ParamField query="sort" type="string" default="prompts">
  Field to sort by: `prompts`, `answers`, `mentionRate`, `shareOfVoice`, `sentiment`, `name`
</ParamField>

<ParamField query="order" type="string" default="desc">
  Sort order: `asc` or `desc`
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="pagination" type="object">
  <Expandable title="Pagination info">
    <ResponseField name="total" type="number">Total number of tags matching filters</ResponseField>
    <ResponseField name="count" type="number">Number of tags in this response</ResponseField>
    <ResponseField name="limit" type="number">Maximum items per page</ResponseField>
    <ResponseField name="offset" type="number">Number of items skipped</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="tags" type="array">
  <Expandable title="Tag object">
    <ResponseField name="id" type="string">Tag ID</ResponseField>
    <ResponseField name="name" type="string">Tag name</ResponseField>
    <ResponseField name="totalPrompts" type="number">Number of prompts with this tag</ResponseField>
    <ResponseField name="totalAnswers" type="number">Total AI responses analyzed</ResponseField>
    <ResponseField name="brandMentionRate" type="number">Percentage of responses mentioning brand (0-100)</ResponseField>
    <ResponseField name="shareOfVoice" type="number">Brand mentions vs competitors (0-100)</ResponseField>
    <ResponseField name="avgSentiment" type="number">Average sentiment score (0-100)</ResponseField>
  </Expandable>
</ResponseField>

### Example Request

```bash theme={null}
curl -X GET "https://www.qwairy.co/api/v1/brands/cm1234567890abcdef/tags?limit=10" \
  -H "Authorization: Bearer qw-api-your-token-here"
```

### Example Response

```json theme={null}
{
  "success": true,
  "pagination": {
    "total": 12,
    "count": 2,
    "limit": 10,
    "offset": 0
  },
  "tags": [
    {
      "id": "tag1",
      "name": "Product Comparisons",
      "totalPrompts": 25,
      "totalAnswers": 200,
      "brandMentionRate": 52.0,
      "shareOfVoice": 38.5,
      "avgSentiment": 81.2
    },
    {
      "id": "tag2",
      "name": "Pricing Questions",
      "totalPrompts": 18,
      "totalAnswers": 144,
      "brandMentionRate": 35.4,
      "shareOfVoice": 22.1,
      "avgSentiment": 68.5
    }
  ]
}
```

### Error Responses

| Status | Code              | Description                           |
| ------ | ----------------- | ------------------------------------- |
| 401    | `INVALID_TOKEN`   | Authentication failed                 |
| 404    | `BRAND_NOT_FOUND` | Brand doesn't exist or not accessible |
