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

> Retrieve AI-generated responses with filters for provider, brand mentions, and sources

Answers are the AI-generated responses to your monitored prompts. Each answer includes the full text, detected brand mentions with position and sentiment, and cited sources. Filter by provider, topic, or presence of brand mentions.

<Note>
  See [Entities](/developers/entities#answer) for the complete Answer object structure, including [CompetitorMention](/developers/entities#competitormention) and [SourceCitation](/developers/entities#sourcecitation) details.
</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 ID. Supports comma-separated multi-select (e.g., `id1,id2`).
</ParamField>

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

<ParamField query="type" type="string">
  Filter by prompt type: `TOFU`, `MOFU`, `BOFU`
</ParamField>

<ParamField query="hasSelfMention" type="boolean">
  Filter by presence of brand mention: `true` or `false`
</ParamField>

<ParamField query="hasSelfSource" type="boolean">
  Filter by presence of brand source citation: `true` or `false`
</ParamField>

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

<ParamField query="offset" type="number" default="0">
  Pagination offset
</ParamField>

<ParamField query="sort" type="string" default="createdAt">
  Field to sort by: `createdAt`
</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 answers matching filters</ResponseField>
    <ResponseField name="count" type="number">Number of answers 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="answers" type="array">
  <Expandable title="Answer summary">
    <ResponseField name="id" type="string">Answer ID</ResponseField>
    <ResponseField name="promptId" type="string">Associated prompt ID</ResponseField>
    <ResponseField name="promptText" type="string">Associated prompt text</ResponseField>
    <ResponseField name="provider" type="string">AI provider name</ResponseField>
    <ResponseField name="model" type="string">AI model name</ResponseField>
    <ResponseField name="textPreview" type="string">First 200 characters of the response</ResponseField>
    <ResponseField name="hasSelfMention" type="boolean">Whether brand is mentioned</ResponseField>
    <ResponseField name="selfMentionPosition" type="number">Position in mention list (if mentioned)</ResponseField>
    <ResponseField name="hasSelfSource" type="boolean">Whether brand domain is cited</ResponseField>
    <ResponseField name="competitorsCount" type="number">Number of competitors mentioned</ResponseField>
    <ResponseField name="sourcesCount" type="number">Number of sources cited</ResponseField>
    <ResponseField name="sentiment" type="number">Sentiment score (0-100)</ResponseField>
    <ResponseField name="createdAt" type="string">Generation timestamp (ISO 8601)</ResponseField>
  </Expandable>
</ResponseField>

### Example Request

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

### Example Response

```json theme={null}
{
  "success": true,
  "pagination": {
    "total": 312,
    "count": 1,
    "limit": 10,
    "offset": 0
  },
  "answers": [
    {
      "id": "ans1",
      "promptId": "q1",
      "promptText": "What are the best products in this category?",
      "provider": "ChatGPT",
      "model": "GPT-4o",
      "textPreview": "Based on recent reviews and comparisons, several products stand out in this category. My Brand offers one of the best solutions...",
      "hasSelfMention": true,
      "selfMentionPosition": 3,
      "hasSelfSource": false,
      "competitorsCount": 5,
      "sourcesCount": 3,
      "sentiment": 82,
      "createdAt": "2024-12-19T10:00:00.000Z"
    }
  ]
}
```

## Filtering Tips

### Find answers where you're mentioned

```bash theme={null}
GET /api/v1/brands/{brandId}/answers?hasSelfMention=true
```

### Find answers where your content is cited

```bash theme={null}
GET /api/v1/brands/{brandId}/answers?hasSelfSource=true
```

### Combine filters for specific insights

```bash theme={null}
# ChatGPT responses where brand is mentioned but not cited
GET /api/v1/brands/{brandId}/answers?provider=chatgpt&hasSelfMention=true&hasSelfSource=false
```
