Competitor tracking
Snapshot a competitor's followers, engagement and latest posts on TikTok, Instagram, YouTube and X in one parallel sweep, then diff it against the last run. 160 to 660 credits per competitor.
You will build the data side of a competitive dashboard: on a schedule, snapshot each competitor's follower counts, engagement rate and latest posts on four platforms, store the snapshot, and compare it with the previous one. Your stored history then reveals sudden follower jumps and new campaigns.
Cost per run
160 to 660 credits per competitor: four profiles at 20 credits each (80), plus four post lists that are metered between 20 and 100 (TikTok), 20 and 340 (Instagram), 20 and 40 (YouTube) and 20 and 100 (X). Tracking 10 competitors once a week costs at least 6,400 credits a month.
How do you track a competitor's social accounts?
Call each platform's profile endpoint and its latest-posts endpoint in parallel, store the result keyed by competitor and date, and diff it against the previous snapshot to spot follower growth and new posts. For most consumer brands, four platforms at two calls each, eight in total, is enough.
What you need
| Platform | Profile (20 credits) | Latest posts |
|---|---|---|
| TikTok | GET /v1/tiktok/profile (handle) | GET /v1/tiktok/profile/videos (handle), 20–100 |
GET /v1/instagram/profile (handle) | GET /v1/instagram/profile/posts (handle), 20–340 | |
| YouTube | GET /v1/youtube/channel (handle) | GET /v1/youtube/channel/videos (handle), 20–40 |
| X | GET /v1/twitter/profile (handle) | GET /v1/twitter/user/tweets (handle), 20–100 |
Where the profile carries enough inputs, computed.engagement_rate is filled in with the same formula on every platform, so you can compare the numbers without per-platform maths. It is null when an input is missing, and your code should keep it null rather than treat it as zero. See Computed fields.
Tracking a B2B competitor
Add GET /v1/linkedin/profile/full (100 credits). Despite the name, it takes a LinkedIn company page URL and returns the company, its latest 10 posts and engagement metrics in one call. That is cheaper than GET /v1/linkedin/company plus GET /v1/linkedin/company/posts (100 each), and it saves you resolving the numeric company_id that company/posts needs.
The code
# competitor_tracking.py
# Snapshots one competitor on four platforms. Store the result and diff runs.
# Run with: INSIGHTSOCIAL_API_KEY=isk_live_... python competitor_tracking.py
import os
from concurrent.futures import ThreadPoolExecutor
from datetime import date
import requests
KEY = os.environ["INSIGHTSOCIAL_API_KEY"]
BASE = "https://api.insightsocial.app/v1"
COMPETITOR = "duolingo" # the same handle on all four platforms here
def get(path, **params):
res = requests.get(f"{BASE}/{path}", params=params,
headers={"x-api-key": KEY}, timeout=120)
return res.json()
PAIRS = {
"tiktok": ("tiktok/profile", "tiktok/profile/videos"),
"instagram": ("instagram/profile", "instagram/profile/posts"),
"youtube": ("youtube/channel", "youtube/channel/videos"),
"twitter": ("twitter/profile", "twitter/user/tweets"),
}
# Step 1: eight calls in parallel (the key allows 10 in flight).
with ThreadPoolExecutor(max_workers=8) as pool:
futures = {
(platform, kind): pool.submit(get, path, handle=COMPETITOR)
for platform, paths in PAIRS.items()
for kind, path in zip(("profile", "posts"), paths)
}
results = {k: f.result() for k, f in futures.items()}
# Step 2: build today's snapshot.
snapshot = {"date": date.today().isoformat(), "handle": COMPETITOR, "platforms": []}
spent = 0
for platform in PAIRS:
profile = results[(platform, "profile")]
posts = results[(platform, "posts")]
spent += profile.get("credits_used", 0) + posts.get("credits_used", 0)
if not profile["success"]:
print(f"{platform}: {profile['error']['type']}")
continue
items = posts.get("data", {}).get("items", []) if posts["success"] else []
latest = items[0]["post"] if items else {}
snapshot["platforms"].append({
"platform": platform,
"followers": profile["data"]["author"].get("followers"),
"engagement_rate": (profile["data"].get("computed") or {}).get("engagement_rate"),
"posts_fetched": len(items),
"latest_post": (latest.get("text") or "")[:80],
})
for row in snapshot["platforms"]:
print(row)
print(f"credits used this run: {spent}")
# Step 3: persist `snapshot` keyed by (handle, date), then compare with the last one:
# follower_delta = today.followers - previous.followers
# new_posts = posts published after the previous run
# engagement_jump = today.engagement_rate / trailing average
# Alert when a delta crosses your threshold.What you get back
{'platform': 'tiktok', 'followers': 19300000, 'engagement_rate': None, 'posts_fetched': 30, 'latest_post': '...'}
{'platform': 'instagram', 'followers': 5600000, 'engagement_rate': 0.0297, 'posts_fetched': 12, 'latest_post': '...'}
{'platform': 'youtube', 'followers': 7640000, 'engagement_rate': 0.0446, 'posts_fetched': 30, 'latest_post': '...'}
{'platform': 'twitter', 'followers': 14900000, 'engagement_rate': None, 'posts_fetched': 20, 'latest_post': '...'}
credits used this run: 160The figures are illustrative. A None engagement rate is expected on some platforms: on TikTok, for example, a lifetime likes-to-followers ratio above 1 is returned as null with a note in data._warnings, rather than as a made-up number.
What to change
- Handles per platform. Real brands rarely use one handle everywhere. Keep a
{tiktok, instagram, youtube, twitter}map per competitor. - Only fetch new posts. Store the newest post id per platform and pass it back as
stop_at_id, or pass the previous run's date assince. The list then stops at what you already hold. See Choosing endpoints. - Pay a flat price instead. Swap each pair for the platform's
profile/fullendpoint (100 credits each, 400 for four platforms). You get the profile, one page of posts and engagement computed over that page, at a fixed price. - Which platforms. Drop a pair to save at least 40 credits, or add LinkedIn for 100 more.
- Run often without paying twice. Re-running the exact same call is free for 24 hours on profiles and 6 hours on post lists, so a dashboard that refreshes several times a day pays once per window.
Related
Sentiment analysis
Find the conversation about a topic on YouTube and Reddit, pull the comments, and read the sentiment label every comment already carries for free. From 400 credits per run.
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.