Back to Blog

How to Track Threads Engagement Metrics with the thredly API

· 3 min read

Why Track Engagement on Threads?

Understanding how content performs on Threads helps researchers study virality, brands measure impact, and creators optimize their strategy. With over 320M monthly active users, Threads has become a significant platform for social media analytics.

The thredly API makes it straightforward to collect and analyze engagement data programmatically — no scraping, no browser automation.

Key Engagement Metrics

Before building anything, let’s define what we’re measuring:

  • Engagement Rate = (likes + replies) / follower_count x 100
  • Reply Ratio = replies / likes (higher = more discussion)
  • Post Frequency = posts per day/week
  • Growth Rate = follower change over time

Step 1: Fetch User Posts

Start by pulling recent posts for a user:

async function getUserPosts(username) {
  const response = await fetch(
    `https://threads-api-pro.p.rapidapi.com/api/user/${username}/posts`,
    {
      headers: {
        "X-RapidAPI-Key": process.env.RAPIDAPI_KEY,
        "X-RapidAPI-Host": "threads-api-pro.p.rapidapi.com",
      },
    }
  );

  const { data } = await response.json();
  return data.posts;
}

Step 2: Calculate Engagement

With the post data, calculate engagement metrics:

function calculateEngagement(posts, followerCount) {
  return posts.map((post) => {
    const totalEngagement = post.like_count + post.reply_count;
    const engagementRate = (totalEngagement / followerCount) * 100;

    return {
      text: post.text?.substring(0, 50) + "...",
      likes: post.like_count,
      replies: post.reply_count,
      engagementRate: engagementRate.toFixed(2) + "%",
      replyRatio: (post.reply_count / Math.max(post.like_count, 1)).toFixed(3),
      postedAt: post.created_at,
    };
  });
}

Step 3: Track Over Time with Python

To spot trends, store metrics in a database or CSV and compare over time:

import requests
import csv
from datetime import datetime

def fetch_and_store(username):
    url = f"https://threads-api-pro.p.rapidapi.com/api/user/{username}"
    headers = {
        "X-RapidAPI-Key": "YOUR_API_KEY",
        "X-RapidAPI-Host": "threads-api-pro.p.rapidapi.com"
    }

    data = requests.get(url, headers=headers).json()["data"]

    with open(f"{username}_metrics.csv", "a") as f:
        writer = csv.writer(f)
        writer.writerow([
            datetime.now().isoformat(),
            data["follower_count"],
            data["following_count"],
        ])

Run this as a daily cron job to build a historical dataset.

Step 4: Analyze Patterns

With enough data points, you can identify:

  • Best posting times — When do posts get the most engagement?
  • Content types that perform — Do questions get more replies than statements?
  • Follower growth correlation — Do viral posts lead to sustained follower growth?

Example analysis with the collected data:

function findBestPostingHour(posts) {
  const hourBuckets = new Map();

  for (const post of posts) {
    const hour = new Date(post.created_at).getUTCHours();
    const current = hourBuckets.get(hour) || { total: 0, count: 0 };
    current.total += post.like_count + post.reply_count;
    current.count += 1;
    hourBuckets.set(hour, current);
  }

  let bestHour = 0;
  let bestAvg = 0;
  for (const [hour, data] of hourBuckets) {
    const avg = data.total / data.count;
    if (avg > bestAvg) {
      bestAvg = avg;
      bestHour = hour;
    }
  }

  return { hour: bestHour, averageEngagement: Math.round(bestAvg) };
}

Real-World Use Cases

Academic Research

Researchers studying social media dynamics use engagement metrics to analyze content virality, echo chambers, and public discourse patterns on Threads. See our dedicated guide on using thredly for academic research.

Brand Monitoring

Marketing teams track engagement on brand mentions and competitor profiles to inform content strategy and measure campaign effectiveness.

Creator Analytics

Content creators use engagement tracking to understand what resonates with their audience and optimize posting schedules.

Rate Limit Considerations

When building a tracker that polls regularly:

  • Free tier (100/month): Check 1 profile daily
  • Basic (10K/month): Track ~30 profiles with hourly posts
  • Pro (100K/month): Full analytics dashboard for 100+ profiles

Plan your polling frequency based on your subscription tier.

Next Steps