惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
B
Blog RSS Feed
H
Help Net Security
Blog — PlanetScale
Blog — PlanetScale
Vercel News
Vercel News
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
L
LangChain Blog
IT之家
IT之家
F
Fortinet All Blogs
V
V2EX
C
Check Point Blog
The Cloudflare Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How to Build a Tool that Track Which World Cup Players Ar...
Olamide Olaniyan · 2026-06-23 · via DEV Community
Cover image for How to Build a Tool that Track Which World Cup Players Are Blowing Up on Social Media

Olamide Olaniyan

Every World Cup there's a moment. Some player nobody outside their domestic league had heard of scores an absolute screamer in a knockout match, and by the time they've finished celebrating, their follower count is climbing like a rocket.

I always found that fascinating, but I could never see it happening in real time. By the time the "X gained 3 million followers!" tweets show up, the surge is already over.

So this tournament I built a little tracker that snapshots player follower counts on a schedule and shows me the growth curve as it happens. Here's how it works.

Why the official APIs were a dead end

My first instinct was to do this "properly" with official APIs. That died fast:

  • Instagram's Graph API won't give you follower counts for accounts you don't own.
  • TikTok's research API is academics-only and takes weeks of applications.
  • X's API now starts at $100/month.

I just wanted public follower counts — numbers anyone can see by opening the app. I didn't want a data partnership and a legal review.

I ended up using SociaVault, which wraps the public profile data from each platform behind one API and one key. One request, one credit, JSON back.

The shared client

Everything runs through one tiny helper:

// Node 18+ has fetch built in
const API_KEY = process.env.SOCIAVAULT_API_KEY;
const BASE = "https://api.sociavault.com";

async function sv(path, params) {
  const url = new URL(BASE + path);
  Object.entries(params).forEach(([k, v]) => url.searchParams.set(k, v));
  const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
  if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
  return res.json();
}

Grabbing follower counts across platforms

Each platform nests the count slightly differently, so I use fallback chains to stay defensive:

async function instagramFollowers(username) {
  const data = await sv("/v1/scrape/instagram/profile", { username });
  const p = data.data?.user ?? data.data ?? data;
  return p.follower_count ?? p.edge_followed_by?.count ?? null;
}

async function tiktokFollowers(username) {
  const data = await sv("/v1/scrape/tiktok/profile", { username });
  const stats = data.stats ?? data.user?.stats ?? {};
  return stats.followerCount ?? null;
}

async function xFollowers(username) {
  const data = await sv("/v1/scrape/twitter/profile", { username });
  const u = data.user ?? data.data ?? data;
  return u.followers_count ?? null;
}

Snapshot a whole watchlist at once

I keep a list of players and their handles, then snapshot everyone in one pass. Promise.allSettled means one bad lookup never sinks the whole run:

const watchlist = [
  { name: "Breakout Striker", ig: "player_ig", tiktok: "player_tt", x: "player_x" },
  // add as many as you want
];

async function snapshot() {
  const ts = new Date().toISOString();
  const results = await Promise.allSettled(
    watchlist.map(async (p) => ({
      name: p.name,
      ts,
      ig: await instagramFollowers(p.ig),
      tiktok: await tiktokFollowers(p.tiktok),
      x: await xFollowers(p.x),
    }))
  );
  return results.filter(r => r.status === "fulfilled").map(r => r.value);
}

Append each run to a CSV (or a real DB), run it on a cron every hour during the tournament, and within a couple of matches you've got a clean time series.

The fun part: spotting the breakout

The story lives in the percentage growth, not the absolute numbers. A superstar gaining 500k followers is a smaller relative event than an unknown gaining 500k off a base of 200k. Sort your deltas by percentage growth and the breakout players float right to the top — usually before the mainstream "look who blew up" posts even start.

Cost

Each profile lookup is one credit. A watchlist of 20 players across 3 platforms, snapshotted hourly for a month, is a rounding error compared to enterprise social tools.

Want the full version?

I wrote up the complete build — CSV logging, surge-detection math, charting — on the SociaVault blog: Tracking Player Social Growth During the World Cup. There's also a more story-driven piece on why these follower surges happen.

Grab a free key at sociavault.com — you get 50 credits, which is plenty to pilot a watchlist.

What would you point this at next? I'm tempted to try a full F1 season.