GET /account/competitor_sentiment

Returns sentiment counts for every site in your account and each site’s competitors, one row per brand per series, from each site’s latest refresh compared to the refresh before it.

Request

Endpoint

https://knowatoa.com/api/v2/account/competitor_sentiment

Query Parameters

Parameter Type Required Description
api_key string Yes Your API authentication key
flat string No Set to "true" for flat JSON format
format string No Set to "csv" for CSV export

Response

Nested JSON Format

{
  "account": {
    "id": "acc_abc123",
    "name": "Example Agency"
  },
  "competitor_sentiment": [
    {
      "account_id": "acc_abc123",
      "account_name": "Example Agency",
      "site_id": "tpc_abc123",
      "site_name": "Example Site",
      "external_id": "example.com",
      "period_start": "2025-01-15",
      "period_end": "2025-01-15",
      "compare_start": "2025-01-08",
      "compare_end": "2025-01-08",
      "competitor_id": "tpc_def456",
      "competitor_name": "Rival Co",
      "is_target": false,
      "series_id": "spx_xyz789",
      "series": "ChatGPT",
      "mentions_current": 11,
      "mentions_previous": 9,
      "mentions_change_points": 2,
      "mentions_change_percent": 22.2,
      "positive_count_current": 6,
      "...": "..."
    }
  ]
}

Flat JSON is the competitor_sentiment array on its own, without compare_start/compare_end. CSV has the same columns as flat JSON.

Notes

  • Columns, field definitions and sentiment buckets match the flat format of GET /sites/competitor_sentiment
  • Only includes target sites that have finished setup; sites without a refresh yet have no rows
  • Latest refresh only; for a date range, call GET /sites/competitor_sentiment per site with start_date/end_date
  • When loading repeated pulls, dedupe on site_id + period_start + period_end + competitor_id + series_id