---
title: "Building a creator-analytics dashboard"
description: "Followers, median views, engagement and posting cadence for any creator on TikTok, YouTube and Instagram, from public data, in one script that writes a static HTML dashboard. Six credits per creator per refresh."
canonical_url: https://groundsocial.dev/blog/creator-analytics-dashboard
---
# Building a creator-analytics dashboard

> Followers, median views, engagement and posting cadence for any creator on TikTok, YouTube and Instagram, from public data, in one script that writes a static HTML dashboard. Six credits per creator per refresh.

_Published 2026-11-26, updated 2026-11-26._

Every agency, brand team and creator tool ends up building the same table: who is this creator, how big are they really, and are they still posting. Follower counts alone lie. Median views on recent posts and how often they post tell you much more. This post builds that table for TikTok, YouTube and Instagram from public profile data.

## The metrics

| Metric | How | Why |
| --- | --- | --- |
| Followers | Profile endpoint | Reach ceiling |
| Median views | Median of view counts on the latest videos | What a typical post actually gets; the median ignores one viral outlier |
| Engagement | TikTok: (likes + comments + shares) / views. Instagram: (likes + comments) / followers | Whether the audience reacts; each platform exposes different counts |
| Posts per week | Recent posts over the time span they cover | Whether the account is alive |

## Six calls per creator

- `GET /v1/tiktok/users/{handle}` and `/videos`: profile stats and the latest videos with `playCount`, `diggCount`, `commentCount`, `shareCount`.
- `GET /v1/youtube/channels/{handle}` and `/videos`: `subscriberCount` and the latest uploads with `viewCount`.
- `GET /v1/instagram/users/{username}` and `/posts`: `follower_count` and the latest feed posts with `like_count` and `comment_count`.

Each response is in the platform’s own shape (TikTok’s `userInfo` and `itemList`, YouTube Data API `channel` and `video` resources, Instagram’s `user` and `items`), so the three small functions in the script are the only mapping you maintain.

## The script

Node 18 or later, no dependencies. [Get a key](https://groundsocial.dev/app/sign-in?new=1): 100 free credits, no card.

dashboard.mjs:

```ts
// node dashboard.mjs   (Node 18+, GROUNDSOCIAL_API_KEY in the environment)
import { writeFileSync } from 'node:fs'

const CREATORS = [
  { name: 'Marques Brownlee', tiktok: 'mkbhd', youtube: '@mkbhd', instagram: 'mkbhd' },
  { name: 'Mrwhosetheboss', tiktok: 'mrwhosetheboss', youtube: '@Mrwhosetheboss', instagram: 'mrwhosetheboss' },
]
const headers = { Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}` }
let spent = 0

async function get(path) {
  const res = await fetch(`https://api.groundsocial.dev/v1${path}`, { headers })
  spent += Number(res.headers.get('x-credits-charged') ?? 0)
  const body = await res.json()
  if (!res.ok) throw new Error(`${path}: ${body.error.code}`)
  return body
}

const median = (xs) => {
  const s = [...xs].sort((a, b) => a - b)
  return s.length ? s[Math.floor(s.length / 2)] : 0
}
const perWeek = (times) => // posts per week across the span of the recent posts
  times.length > 1 ? (times.length - 1) / ((Math.max(...times) - Math.min(...times)) / 604800) : 0

// Each platform returns its own shape; these three functions are the only mapping.
const platforms = {
  async tiktok(handle) {
    const [{ userInfo }, { itemList }] = await Promise.all([get(`/tiktok/users/${handle}`), get(`/tiktok/users/${handle}/videos`)])
    const views = itemList.map((v) => v.stats.playCount)
    const eng = itemList.map((v) => (v.stats.diggCount + v.stats.commentCount + v.stats.shareCount) / (v.stats.playCount || 1))
    return { followers: userInfo.stats.followerCount, medianViews: median(views),
      engagement: median(eng), postsPerWeek: perWeek(itemList.map((v) => v.createTime)) }
  },
  async youtube(handle) {
    const [channel, { items }] = await Promise.all([get(`/youtube/channels/${handle}`), get(`/youtube/channels/${handle}/videos`)])
    return { followers: Number(channel.statistics.subscriberCount),
      medianViews: median(items.map((v) => Number(v.statistics?.viewCount ?? 0))),
      engagement: null, postsPerWeek: perWeek(items.map((v) => Date.parse(v.snippet.publishedAt) / 1000)) }
  },
  async instagram(handle) {
    const [{ user }, { items }] = await Promise.all([get(`/instagram/users/${handle}`), get(`/instagram/users/${handle}/posts`)])
    const eng = items.map((p) => (p.like_count + p.comment_count) / user.follower_count)
    return { followers: user.follower_count, medianViews: null,
      engagement: median(eng), postsPerWeek: perWeek(items.map((p) => p.taken_at)) }
  },
}

const rows = []
for (const c of CREATORS) {
  for (const [platform, load] of Object.entries(platforms)) {
    const stats = await load(c[platform]).catch((e) => ({ error: e.message }))
    rows.push({ creator: c.name, platform, handle: c[platform], ...stats })
  }
}

const fmt = (n, pct) => (n == null ? '–' : pct ? `${(n * 100).toFixed(2)}%` : Intl.NumberFormat('en', { notation: 'compact' }).format(n))
const tr = (r) => `<tr><td>${r.creator}</td><td>${r.platform}</td><td>${r.handle}</td>` +
  (r.error ? `<td colspan="4">${r.error}</td>` : `<td>${fmt(r.followers)}</td><td>${fmt(r.medianViews)}</td>` +
    `<td>${fmt(r.engagement, true)}</td><td>${r.postsPerWeek.toFixed(1)}</td>`) + '</tr>'
writeFileSync('dashboard.json', JSON.stringify(rows, null, 2))
writeFileSync('dashboard.html', `<!doctype html><meta charset="utf-8"><title>Creators</title>
<style>body{font:14px system-ui;margin:2rem}td,th{padding:.4rem .8rem;border-bottom:1px solid #ddd;text-align:left}</style>
<table><tr><th>Creator</th><th>Platform</th><th>Handle</th><th>Followers</th><th>Median views</th><th>Engagement</th><th>Posts/week</th></tr>
${rows.map(tr).join('\n')}</table><p>${new Date().toISOString()} · ${spent} credits</p>`)
console.table(rows.map(({ creator, platform, followers, medianViews, engagement, postsPerWeek, error }) =>
  ({ creator, platform, followers, medianViews, engagement: engagement && +(engagement * 100).toFixed(2), postsPerWeek: postsPerWeek && +postsPerWeek.toFixed(1), error })))
console.log(`${spent} credits`)
```

## Output

Run on 26 November 2026 with the two creators in the script:

```text
creator           platform   followers  medianViews  engagement %  postsPerWeek
Marques Brownlee  tiktok       2300000      1200000          6.22           0.4
Marques Brownlee  youtube     21500000      6800000             –           1.7
Marques Brownlee  instagram    5296203            –          1.68           0.8
Mrwhosetheboss    tiktok       2600000      1100000          6.15           0.2
Mrwhosetheboss    youtube     23100000      8100000             –           1.0
Mrwhosetheboss    instagram    2118456            –          6.64           0.8
12 credits
```

It also writes `dashboard.json` (for your app) and `dashboard.html`, a plain table you can open or host anywhere. Two things jump out of a table like this that follower counts hide: both creators’ TikToks get around half their follower count per video, and on Instagram the smaller account has four times the engagement of the bigger one.

## Cost and refresh

6 credits per creator per refresh. A roster of 200 creators refreshed daily is 36,000 credits a month, $36.00 at the smallest pack’s rate and $14.38 at the volume pack’s. Run it from cron, a GitHub Action or a Vercel cron job.

## Turning it into a real dashboard

- Store a row per creator per day (SQLite is enough). Growth over 7 and 30 days is the number brand teams ask for next.
- Use `tiktok.user.full` or `instagram.user.full` (2 credits) when you want profile and recent posts in one call.
- Add YouTube Shorts with `youtube.channel.shorts`; Shorts and long-form views are different games and should be separate rows.
- Pull transcripts (`youtube.video.transcript`, `tiktok.video.transcript`) to tag what each creator talks about, then search your roster by topic.
- Discover lookalikes with `tiktok.user.similar` and `instagram.user.similar`.

## Caveats

- YouTube view and subscriber counts are the rounded figures YouTube shows publicly (`statisticsAreApproximate: true`), not Studio numbers.
- Pinned TikToks appear first in the feed and can be old; the median keeps them from skewing views much, but filter them if you compute cadence on a short window.
- Instagram feed posts don’t carry view counts; use `instagram.user.reels` for reel plays.
- This is public data only. Audience demographics and private stats need the creator’s own login and the platform’s official API.

> Examples run against the live Groundsocial API on 2026-11-26. TikTok is a trademark of ByteDance Ltd. We are not affiliated with or endorsed by TikTok or ByteDance. YouTube is a trademark of Google LLC. We are not affiliated with or endorsed by Google or YouTube. Instagram is a trademark of Instagram, LLC (Meta Platforms, Inc.). We are not affiliated with or endorsed by Instagram or Meta.

_Canonical HTML: https://groundsocial.dev/blog/creator-analytics-dashboard_

## Site Navigation

### Global Hub
- [Home](https://groundsocial.dev/index.md)
- [Pricing](https://groundsocial.dev/pricing.md)
- [Endpoints](https://groundsocial.dev/endpoints.md)
- [For agents](https://groundsocial.dev/agents.md)
- [Docs](https://groundsocial.dev/docs.md)
- [Compare](https://groundsocial.dev/compare.md)
- [Blog](https://groundsocial.dev/blog.md)
- [Tutorials](https://groundsocial.dev/tutorials.md)
- [Changelog](https://groundsocial.dev/changelog.md)
- [llms.txt](https://groundsocial.dev/llms.txt)
- [Agent skill](https://groundsocial.dev/SKILL.md)

### On This Topic
- [Blog](https://groundsocial.dev/blog.md)
- [Give Claude and Cursor live social data with one MCP server](https://groundsocial.dev/blog/claude-cursor-live-social-data-mcp.md)
- [Track brand mentions across Reddit, X, TikTok and YouTube in 50 lines](https://groundsocial.dev/blog/track-brand-mentions-reddit-x-tiktok-youtube.md)
- [Reddit API pricing in 2026 and the alternatives](https://groundsocial.dev/blog/reddit-api-pricing-2026.md)
- [X API pricing in 2026 and the alternatives](https://groundsocial.dev/blog/x-api-pricing-2026.md)
- [Google SERP API price per 1,000 searches, compared](https://groundsocial.dev/blog/google-serp-api-price-per-1000.md)

## Structured data

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://groundsocial.dev/"},{"@type":"ListItem","position":2,"name":"Blog","item":"https://groundsocial.dev/blog"},{"@type":"ListItem","position":3,"name":"Building a creator-analytics dashboard","item":"https://groundsocial.dev/blog/creator-analytics-dashboard"}]}
```
