Getting Started#
Go from zero to your first API call in under five minutes. This guide walks you through installing Brandwave, authenticating, and querying creator performance data.
Prerequisites
You need a Brandwave account and an API key for server-side examples. Sign in at gobrandwave.com and create an API key from your organization settings. React browser apps can pass the signed-in user's access token to the provider.
1
Install the package
bash
npm install @brandwave/ts2
Configure authentication
typescript
import { createBrandwave } from '@brandwave/ts';
const bw = createBrandwave({
apiKey: process.env.BRANDWAVE_API_KEY,
});3
Make your first query
typescript
const { items, totalCount } = await bw.activities.list({
organizationId: 'org_123',
pageIndex: 0,
pageSize: 10,
});
console.log(`Found ${totalCount} activities`);
console.log(items);Example response#
json
{
"items": [
{
"id": "act_abc123",
"channel": "instagram",
"activity": "Sponsored Reel",
"startAt": "2025-01-15T00:00:00Z",
"metrics": {
"reach": 45200,
"engagement": 3150,
"impressions": 62800
}
}
],
"totalCount": 42
}