Skip to main content
GET
/
api
/
v1
/
brands
/
{brandId}
/
answers
/
{answerId}
Get Answer
curl --request GET \
  --url https://api.example.com/api/v1/brands/{brandId}/answers/{answerId}
{
  "success": true,
  "answer": {
    "id": "<string>",
    "prompt": {},
    "provider": "<string>",
    "model": "<string>",
    "text": "<string>",
    "competitors": [
      {}
    ],
    "sources": [
      {}
    ],
    "sentiment": 123,
    "createdAt": "<string>"
  }
}

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.

Retrieve the complete response with full text, detected competitor mentions, cited sources, and sentiment.

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://www.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
      },
      {
        "name": "Competitor A",
        "position": 1,
        "relationship": "DIRECT",
        "sentiment": 80
      }
    ],
    "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,
    "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