Skip to content
Esc

Popular

  • QuickstartFrom an API key to your campaigns, a campaign's summary, its posts, its audience and its sentiment.Get started
  • Search posts by keywordGET /v1/search/keywordSearch
  • List a post's commentsGET /v1/posts/{id}/commentsPosts & Comments
  • Formats taking offGET /v1/trendsTrends
  • Get a campaign summaryGET /v1/campaigns/{id}Campaigns
  • MCP for Claude and ChatGPTConnect Claude, ChatGPT or any MCP client to your Sonder workspace at https://sonderlabs.co.uk/mcp. Live today.MCP
Get startedQuickstart

Quickstart

From an API key to your campaigns, a campaign's summary, its posts, its audience and its sentiment.

1. Create a key

  1. In Sonder, open Connect to AI & API (in the sidebar, or the ⋯ menu in Trend Lab).
  2. Under API, give the key a name you'll recognise, such as the tool it's for, and choose Create key.
  3. Copy the key. It is shown once: Sonder keeps only a fingerprint of it, so it can't show it again. Lost it? Revoke it and create another.

Workspace owners and admins can create and revoke keys. A key reads every campaign in its workspace and nothing else, and it can only read. Keep it server-side; the examples read it from SONDER_API_KEY.

Shell
export SONDER_API_KEY=sk_live_…

Every request goes to your workspace's own address, https://{workspace}.sonderlabs.co.uk: the address you open Sonder at. The examples use yourteam.

2. List your campaigns

GET /v1/campaigns
curl https://yourteam.sonderlabs.co.uk/v1/campaigns \
  -H "Authorization: Bearer $SONDER_API_KEY"
Response
{
  "campaigns": [
    {
      "id": "red-bull-rampage-2026",
      "name": "Red Bull Rampage 2026",
      "status": "active",
      "startDate": "2026-10-01",
      "lastRefreshedAt": "2026-11-03T00:06:37Z",
      "platforms": [
        "tiktok",
        "instagram",
        "youtube",
        "facebook",
        "x",
        "threads",
        "reddit",
        "snapchat"
      ],
      "totals": {
        "views": 170259629,
        "earnedViews": 115301871,
        "ownedViews": 54957758,
        "posts": 598,
        "creators": 324
      }
    }
  ]
}

3. Read a campaign's summary

Take a campaign's id: views, posts and creators, earned against owned, by platform and by group of accounts.

GET /v1/campaigns/{id}
curl https://yourteam.sonderlabs.co.uk/v1/campaigns/red-bull-rampage-2026 \
  -H "Authorization: Bearer $SONDER_API_KEY"
Response
{
  "campaign": {
    "id": "red-bull-rampage-2026",
    "name": "Red Bull Rampage 2026",
    "status": "active",
    "startDate": "2026-10-01",
    "lastRefreshedAt": "2026-11-03T00:06:37Z",
    "platforms": [
      "tiktok",
      "instagram",
      "youtube",
      "facebook",
      "x",
      "threads",
      "reddit",
      "snapchat"
    ],
    "totals": {
      "views": 170259629,
      "earnedViews": 115301871,
      "ownedViews": 54957758,
      "posts": 598,
      "creators": 324
    }
  },
  "labels": {
    "owned": "Owned",
    "earned": "Earned",
    "talent": "Talent & affiliates",
    "clipper": "Clip channels",
    "ugc": "Everyone else"
  },
  "totals": {
    "views": 170259629,
    "viewsEstimated": false,
    "posts": 598,
    "creators": 324,
    "likes": 9184220,
    "comments": 61342,
    "shares": 120554,
    "avgViews": 284715.1,
    "engagementRate": 0.055
  },
  "byOwnership": [
    {
      "key": "owned",
      "label": "Owned",
      "views": 54957758,
      "posts": 41
    },
    {
      "key": "earned",
      "label": "Earned",
      "views": 115301871,
      "posts": 557
    }
  ],
  "byPlatform": [
    {
      "platform": "youtube",
      "views": 98120455,
      "posts": 380
    },
    {
      "platform": "instagram",
      "views": 64019302,
      "posts": 132
    },
    {
      "platform": "tiktok",
      "views": 6210448,
      "posts": 25
    }
  ],
  "byGroup": []
}

4. Page through its posts

Newest first. Pass next back as cursor for the following page; it is null on the last. Filter by platform or group.

GET /v1/campaigns/{id}/posts
curl -G https://yourteam.sonderlabs.co.uk/v1/campaigns/red-bull-rampage-2026/posts \
  -H "Authorization: Bearer $SONDER_API_KEY" \
  -d platform=instagram \
  -d limit=1
Response
{
  "posts": [
    {
      "id": "47dd2af11e2fe0f075d88ad970eb737c",
      "url": "https://www.instagram.com/reel/DewxhTugF2T/",
      "platform": "instagram",
      "account": {
        "handle": "instagram",
        "name": "Instagram",
        "followers": 686358280
      },
      "postedAt": "2026-10-21T17:02:11Z",
      "caption": "Riding the line at Red Bull Rampage.",
      "views": 53652872,
      "viewsEstimated": false,
      "likes": 2140551,
      "comments": 9112,
      "shares": 48210,
      "group": "ugc",
      "ownership": "earned"
    }
  ],
  "next": "eyJ0IjoiMjAyNi0xMC0yMVQxNzowMjoxMVoiLCJpIjoiNDdkZDJhZjExZTJmZTBmMDc1ZDg4YWQ5NzBlYjczN2MifQ",
  "total": 132
}

5. Audience and sentiment

Who comments, as estimated totals, and how people feel, with the themes they talk about.

GET /v1/campaigns/{id}/audience
curl https://yourteam.sonderlabs.co.uk/v1/campaigns/red-bull-rampage-2026/audience \
  -H "Authorization: Bearer $SONDER_API_KEY"
GET /v1/campaigns/{id}/sentiment
curl https://yourteam.sonderlabs.co.uk/v1/campaigns/red-bull-rampage-2026/sentiment \
  -H "Authorization: Bearer $SONDER_API_KEY"
Response
{
  "campaign": {
    "id": "red-bull-rampage-2026",
    "name": "Red Bull Rampage 2026"
  },
  "enabled": true,
  "comments": {
    "positive": 3120,
    "neutral": 1460,
    "negative": 420,
    "total": 5000,
    "shares": {
      "positive": 0.624,
      "neutral": 0.292,
      "negative": 0.084
    }
  },
  "posts": {
    "positive": 402,
    "neutral": 171,
    "negative": 25,
    "total": 598,
    "shares": {
      "positive": 0.672,
      "neutral": 0.286,
      "negative": 0.042
    }
  },
  "summary": "People loved the riders' lines and the aerial shots; the complaints were about wind holds and judging.",
  "positiveDrivers": [
    "The riders' biggest drops and the aerial footage of them."
  ],
  "negativeDrivers": [
    "Long wind holds on finals day."
  ],
  "themes": [
    {
      "label": "The judging",
      "summary": "Viewers argue over whose run should have won.",
      "comments": 640,
      "mix": {
        "positive": 0.31,
        "neutral": 0.29,
        "negative": 0.4
      },
      "quotes": [
        {
          "text": "That last run deserved the top spot.",
          "postId": "47dd2af11e2fe0f075d88ad970eb737c"
        }
      ]
    }
  ],
  "keywords": [
    {
      "term": "aerial shot",
      "count": 212
    }
  ]
}

Next

  • Read Authentication: keys, rate limits, paging and errors.
  • Read Concepts: earned and owned, checked posts, as-of dates and why missing is not zero.
  • Want answers in Claude or ChatGPT rather than code? The MCP server is live today.
Quickstart · Sonder APIs