InsightSocial API
Recipes

Creator engagement scoring

Compare one creator's engagement on TikTok, Instagram and YouTube in a single ranked table, using the same computed formula on every platform. 60 credits per creator.

You will build a vetting table for influencer marketing: a single row per platform for one creator across TikTok, Instagram and YouTube, sorted by metrics that mean the same thing on each network.

Cost per run

60 credits per creator: three profile calls at 20 credits each. Vetting a shortlist of 100 creators costs 6,000 credits. Checking the same creator again within 24 hours is free.

How do you compare engagement rates across platforms?

Call each platform's profile endpoint and read computed.engagement_rate. When the profile carries the inputs the formula needs, the rate is calculated the same way on every platform and kept inside [0, 1], so a TikTok value of 0.08 means the same as an Instagram value of 0.08.

Raw numbers do not compare on their own. A TikTok like is not an Instagram like, follower counts inflate differently, and every analytics tool defines "engagement rate" its own way. A shared formula is what makes the ranking fair.

What you need

EndpointReturnsCredits
GET /v1/tiktok/profileTikTok profile with computed.engagement_rate20
GET /v1/instagram/profileInstagram profile with computed.engagement_rate20
GET /v1/youtube/channelYouTube channel with computed.engagement_rate20

The code

Python
# creator_scoring.py
# Run with: INSIGHTSOCIAL_API_KEY=isk_live_... python creator_scoring.py
import os
from concurrent.futures import ThreadPoolExecutor

import requests

KEY = os.environ["INSIGHTSOCIAL_API_KEY"]
BASE = "https://api.insightsocial.app/v1"

# Real creators rarely share one handle, so map them per platform.
CREATOR = {"tiktok": "mrbeast", "instagram": "mrbeast", "youtube": "MrBeast"}
PATHS = {"tiktok": "tiktok/profile", "instagram": "instagram/profile", "youtube": "youtube/channel"}

def get(path, **params):
    res = requests.get(f"{BASE}/{path}", params=params,
                       headers={"x-api-key": KEY}, timeout=120)
    return res.json()

with ThreadPoolExecutor(max_workers=3) as pool:
    futures = {p: pool.submit(get, PATHS[p], handle=h) for p, h in CREATOR.items()}
    profiles = {p: f.result() for p, f in futures.items()}

rows = []
for platform, body in profiles.items():
    if not body["success"]:
        print(f"{platform}: {body['error']['type']}")
        continue
    data = body["data"]
    rows.append({
        "platform": platform,
        "followers": data["author"].get("followers"),
        "engagement_rate": (data.get("computed") or {}).get("engagement_rate"),
        "warnings": data.get("_warnings"),
    })

# Rank the comparable rows; keep the null ones visible but unranked.
ranked = sorted((r for r in rows if r["engagement_rate"] is not None),
                key=lambda r: r["engagement_rate"], reverse=True)
unranked = [r for r in rows if r["engagement_rate"] is None]

for r in ranked:
    print(f'{r["platform"]:<10} {r["followers"]:>12,}  {r["engagement_rate"]:.4f}')
for r in unranked:
    print(f'{r["platform"]:<10} cannot compare: {r["warnings"]}')

What you get back

Example output
youtube      298,000,000  0.0768
instagram     71,500,000  0.0359
tiktok     cannot compare: ['computed.engagement_rate: author ratio exceeded 1.0 ...; returned null ...']

The figures are illustrative. A null rate is a signal, not a low score. On TikTok, the profile's like count is lifetime hearts, and against current followers that ratio often exceeds 1, so the rate comes back null and data._warnings says why. Treat such rows as "cannot compare", never as "best" or "worst".

What to change

  • Get a comparable TikTok number. Swap the TikTok leg for GET /v1/tiktok/profile/full (100 credits). It computes avg_engagement_rate_by_followers from the latest page of videos rather than from lifetime totals. instagram/profile/full and youtube/profile/full carry the same field, so running all three /full calls (300 credits per creator) gives a like-for-like table.
  • Score a shortlist. Loop over a list of creator maps and sort the flattened rows. Budget 60 credits per creator, or 300 on the /full endpoints.
  • Weight the rank. Engagement rate alone favours small accounts. Blend it with followers for the trade-off your team actually makes.

On this page