> ## 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 Topics

> Analyze performance by topic (keyword)

Track how your brand performs across different topics. Topics (also called keywords) are the semantic themes that organize your monitoring prompts.

<Note>
  See [Entities](/developers/entities#keyword) for the complete Topic 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="tag" type="string">
  Filter by tag ID. Supports comma-separated multi-select (e.g., `id1,id2`).
</ParamField>

<ParamField query="limit" type="number" default="50">
  Maximum number of topics 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`, `keyword`
</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 topics matching filters</ResponseField>
    <ResponseField name="count" type="number">Number of topics 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="keywords" type="array">
  <Expandable title="Topic object">
    <ResponseField name="id" type="string">Topic ID</ResponseField>
    <ResponseField name="keyword" type="string">Topic text</ResponseField>
    <ResponseField name="totalPrompts" type="number">Number of prompts with this topic</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/keywords?limit=10" \
  -H "Authorization: Bearer qw-api-your-token-here"
```

### Example Response

```json theme={null}
{
  "success": true,
  "pagination": {
    "total": 25,
    "count": 2,
    "limit": 10,
    "offset": 0
  },
  "keywords": [
    {
      "id": "kw1",
      "keyword": "best CRM software",
      "totalPrompts": 15,
      "totalAnswers": 120,
      "brandMentionRate": 45.5,
      "shareOfVoice": 32.1,
      "avgSentiment": 78.3
    },
    {
      "id": "kw2",
      "keyword": "enterprise solutions",
      "totalPrompts": 8,
      "totalAnswers": 64,
      "brandMentionRate": 28.1,
      "shareOfVoice": 18.5,
      "avgSentiment": 72.0
    }
  ]
}
```

### Error Responses

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