Skip to main content
Answers are the AI-generated responses to your monitored prompts. Each answer includes the full text, detected brand mentions with position and sentiment, cited sources, and relevance scores. Filter by provider, topic, or presence of brand mentions.
See Entities for the complete Answer object structure, including CompetitorMention and SourceCitation details.

List Answers

Authorization
string
required
Bearer token. Example: Bearer qw-api-xxx
GET /api/v1/brands/{brandId}/answers

Path Parameters

brandId
string
required
The unique identifier of the brand

Query Parameters

period
number
default:"30"
Number of days to include
startDate
string
Start date (ISO 8601 format)
endDate
string
End date (ISO 8601 format)
provider
string
Filter by AI provider: chatgpt, perplexity, claude, gemini, etc.
topic
string
Filter by topic ID
tag
string
Filter by tag ID
type
string
Filter by prompt type: TOFU, MOFU, BOFU
hasSelfMention
boolean
Filter by presence of brand mention: true or false
hasSelfSource
boolean
Filter by presence of brand source citation: true or false
limit
number
default:"50"
Maximum number of answers to return (max: 100)
offset
number
default:"0"
Pagination offset
sort
string
default:"createdAt"
Field to sort by: createdAt
order
string
default:"desc"
Sort order: asc or desc

Response

success
boolean
Indicates if the request was successful
pagination
object
answers
array

Example Request

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

Example Response

{
  "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,
      "relevance": 75,
      "createdAt": "2024-12-19T10:00:00.000Z"
    }
  ]
}

Get Answer Details

Retrieve the complete response with full text and detailed analysis.
GET /api/v1/brands/{brandId}/answers/{answerId}

Path Parameters

brandId
string
required
The unique identifier of the brand
answerId
string
required
The unique identifier of the answer

Response

success
boolean
Indicates if the request was successful
answer
object

Example Request

curl -X GET "https://qwairy.co/api/v1/brands/cm1234567890abcdef/answers/ans1" \
  -H "Authorization: Bearer qw-api-your-token-here"

Example Response

{
  "success": true,
  "answer": {
    "id": "ans1",
    "prompt": {
      "id": "q1",
      "text": "What are the best products in this category?",
      "topic": "Product Reviews",
      "type": "TOFU"
    },
    "provider": "ChatGPT",
    "model": "GPT-4o",
    "text": "Based on recent reviews and comparisons, several products stand out in this category. My Brand offers one of the best solutions with excellent performance and user ratings. Competitor A also provides a strong alternative...",
    "competitors": [
      {
        "name": "My Brand",
        "position": 3,
        "relationship": "SELF",
        "sentiment": 85,
        "relevance": 78
      },
      {
        "name": "Competitor A",
        "position": 1,
        "relationship": "DIRECT",
        "sentiment": 80,
        "relevance": 82
      }
    ],
    "sources": [
      {
        "url": "https://industry-news.com/product-comparison",
        "domain": "industry-news.com",
        "position": 1,
        "isSelf": false
      },
      {
        "url": "https://mybrand.com/products",
        "domain": "mybrand.com",
        "position": 2,
        "isSelf": true
      }
    ],
    "sentiment": 82,
    "relevance": 75,
    "createdAt": "2024-12-19T10:00:00.000Z"
  }
}

Error Responses

StatusCodeDescription
400INVALID_PARAMETERInvalid query parameter
401INVALID_TOKENAuthentication failed
404BRAND_NOT_FOUNDBrand doesn’t exist or not accessible
404ANSWER_NOT_FOUNDAnswer doesn’t exist

Filtering Tips

Find answers where you’re mentioned

GET /api/v1/brands/{brandId}/answers?hasSelfMention=true

Find answers where your content is cited

GET /api/v1/brands/{brandId}/answers?hasSelfSource=true

Combine filters for specific insights

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