Skip to main content
Monitor how your brand and competitors are mentioned in AI responses. Competitors are categorized as SELF (your brand) or DIRECT (competitors). Track mention counts, average position, sentiment, and share of voice over time.
See Entities for the complete Competitor object structure.

List Competitors

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

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
limit
number
default:"50"
Maximum number of results to return (max: 100)
offset
number
default:"0"
Number of results to skip for pagination
sort
string
default:"mentions"
Field to sort by: mentions, position, sentiment, relevance, shareOfVoice, name
order
string
default:"desc"
Sort order: asc or desc

Response

Returns all competitors with relationship SELF (your brand) and DIRECT (competitors).
success
boolean
Indicates if the request was successful
pagination
object
competitors
array

Example Request

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

Example Response

{
  "success": true,
  "pagination": {
    "total": 10,
    "count": 2,
    "limit": 10,
    "offset": 0
  },
  "competitors": [
    {
      "id": "cmp1",
      "name": "My Brand",
      "domain": "mybrand.com",
      "relationship": "SELF",
      "totalMentions": 104,
      "shareOfVoice": 8.13,
      "avgPosition": 2.1,
      "avgSentiment": 78.1,
      "avgRelevance": 72.5
    },
    {
      "id": "cmp2",
      "name": "Competitor A",
      "domain": "competitor-a.com",
      "relationship": "DIRECT",
      "totalMentions": 111,
      "shareOfVoice": 8.73,
      "avgPosition": 1.8,
      "avgSentiment": 75.2,
      "avgRelevance": 68.3
    }
  ]
}

Get Competitor Details

GET /api/v1/brands/{brandId}/competitors/{competitorId}

Path Parameters

brandId
string
required
The unique identifier of the brand
competitorId
string
required
The unique identifier of the competitor

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)

Response

Returns detailed competitor information with breakdowns by provider and topic.

Example Response

{
  "success": true,
  "competitor": {
    "id": "cmp1",
    "name": "My Brand",
    "domain": "mybrand.com",
    "relationship": "SELF",
    "totalMentions": 104,
    "shareOfVoice": 8.13,
    "avgPosition": 2.1,
    "avgSentiment": 78.1,
    "avgRelevance": 72.5,
    "byProvider": [
      { "provider": "ChatGPT", "mentions": 62, "avgPosition": 2.0 },
      { "provider": "Perplexity", "mentions": 42, "avgPosition": 2.3 }
    ],
    "byTopic": [
      { "topic": "Product Reviews", "mentions": 45, "shareOfVoice": 9.44 },
      { "topic": "Comparisons", "mentions": 38, "shareOfVoice": 12.06 }
    ]
  }
}

Get Competitor Evolution

Track how a competitor’s metrics change over time.
GET /api/v1/brands/{brandId}/competitors/{competitorId}/evolution

Path Parameters

brandId
string
required
The unique identifier of the brand
competitorId
string
required
The unique identifier of the competitor

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

Example Request

curl -X GET "https://qwairy.co/api/v1/brands/cm1234567890abcdef/competitors/cmp1/evolution?period=7" \
  -H "Authorization: Bearer qw-api-your-token-here"

Example Response

{
  "success": true,
  "competitor": {
    "id": "cmp1",
    "name": "My Brand",
    "relationship": "SELF"
  },
  "evolution": [
    {
      "date": "2024-12-01",
      "mentions": 5,
      "shareOfVoice": 7.2,
      "avgPosition": 2.3,
      "avgSentiment": 76.5,
      "avgRelevance": 71.0
    },
    {
      "date": "2024-12-02",
      "mentions": 8,
      "shareOfVoice": 8.5,
      "avgPosition": 2.1,
      "avgSentiment": 78.2,
      "avgRelevance": 73.1
    }
  ]
}

Error Responses

StatusCodeDescription
401INVALID_TOKENAuthentication failed
404BRAND_NOT_FOUNDBrand doesn’t exist or not accessible
404COMPETITOR_NOT_FOUNDCompetitor doesn’t exist