A community with 100,000 members and a handful of comments per post is quiet, even if its posts collect upvotes. A community where every question gets 20 answers is alive, even if the upvotes are modest. Votes measure attention. Comments measure effort, and effort is what community managers care about.
This guide builds an audit script in Python. It pages through a subreddit's posts with SteadyAPI's Reddit API, drops posts that are still collecting votes, calculates comments per net upvote for each one, compares that ratio by post type, and measures how deep the conversation goes in the busiest threads. Each run is appended to a CSV so you can compare weeks.
Prerequisites
- A SteadyAPI API key from steadyapi.com. One subreddit costs 11 requests per run.
- Python 3.8+ with
requests.
Where the numbers come from
GET /v1/reddit/posts(weight 2) returns 25 posts per page withscore,num_comments,upvote_ratio,created_utc,link_flair_text,urlandis_video. The script pages throughsortType=newwith thecursorvalue.GET /v1/reddit/post(weight 1) returns one thread with its comments nested under their parents. It gives the depth measurement.
Two details shaped the script:
- Use
new, nottop. In my tests,sortType=topreturned only posts from the last day, andtimeFilterdid not change the result. Paging throughnewreaches further back, so you can find posts that have settled. scoreis net upvotes, not the total number of upvotes. The ratio below is therefore comments per net upvote, and it is only comparable between posts and communities measured the same way.
How the audit works
1. Collect. Read four pages of new posts, skip pinned posts, and drop anything younger than 24 hours. A post that is two hours old has not collected its votes yet, so its ratio would be misleadingly high. 2. Filter. Keep posts with a score of at least 10. Dividing by a score of 1 or 2 produces huge ratios that mean nothing. 3. Calculate. For each post, ratio = num_comments / score. 4. Compare. Print the median and mean for the community, the median per post type (text, image, gallery, video, link), and the three posts with the most and the least discussion for their score. 5. Measure depth. For the three most-commented posts, fetch the thread and report what share of the comments got a reply, and the deepest reply level.
The script uses the median as its main number, because a single post with 500 comments would move the mean.
The script
Save this as reddit_engagement_audit.py:
import csv
import html
import os
import statistics
import sys
import time
from collections import defaultdict
import requests
BASE = "https://api.steadyapi.com"
API = f"{BASE}/v1/reddit"
HEADERS = {"Authorization": f"Bearer {os.environ['STEADYAPI_KEY']}"}
PAGES = 4 # 25 posts per page, weight 2 each
MIN_AGE_HOURS = 24 # younger posts are still collecting votes
MIN_SCORE = 10 # a ratio built on a tiny score is noise
DEPTH_THREADS = 3 # most-discussed posts whose comment tree we also measure, weight 1 each
def call(path, **params):
failures = 0
for attempt in range(4):
r = requests.get(f"{API}/{path}", headers=HEADERS, params=params, timeout=90)
if r.status_code in (429, 500, 502, 503):
time.sleep(2 ** attempt)
continue
r.raise_for_status()
data = r.json()
if data.get("success") is False:
failures += 1
if failures < 2:
time.sleep(2) # some requests fail once and then work, so retry one time
continue
raise ValueError(data["message"])
return data
raise RuntimeError(f"{path} failed after retries")
def media_type(p):
url = p.get("url") or ""
if p.get("is_video"):
return "video"
if "/gallery/" in url:
return "gallery"
if p.get("domain") == "i.redd.it" or url.lower().split("?")[0].endswith((".jpg", ".jpeg", ".png", ".gif", ".webp")):
return "image"
return "text" if p.get("is_self") else "link"
def fetch_posts(subreddit):
posts, cursor = [], None
for _ in range(PAGES):
params = {"subreddit": subreddit, "sortType": "new"}
if cursor:
params["cursor"] = cursor
data = call("posts", **params)
posts += [p for p in data["body"] if not p.get("stickied")]
cursor = data["meta"].get("cursor")
if not cursor:
break
cutoff = time.time() - MIN_AGE_HOURS * 3600
return [p for p in posts if p["created_utc"] <= cutoff]
def thread_depth(post):
"""Share of comments that got a reply, and the deepest reply level, from one thread call."""
try:
data = call("post", url="https://www.reddit.com" + post["permalink"])
except ValueError:
return None # some threads fail; skip them instead of stopping
def walk(comments, depth=0):
for c in comments:
yield depth, c
yield from walk(c["replies"], depth + 1)
flat = list(walk(data["body"]["post_comments"]))
if not flat:
return None
return {
"comments": len(flat),
"replied": sum(1 for _, c in flat if c["replies"]) / len(flat),
"max_depth": max(d for d, _ in flat),
}
def audit(subreddit):
posts = fetch_posts(subreddit)
rows = []
for p in posts:
score, comments = p.get("score") or 0, p.get("num_comments") or 0
if score < MIN_SCORE:
continue
rows.append({
"id": p["id"], "title": html.unescape(p["title"]), "media": media_type(p),
"flair": p.get("link_flair_text") or "none",
"score": score, "comments": comments,
"ratio": comments / score, "upvote_ratio": p.get("upvote_ratio"),
"permalink": p["permalink"],
})
print(f"\nr/{subreddit}: {len(posts)} posts older than {MIN_AGE_HOURS}h, {len(rows)} with score >= {MIN_SCORE}")
if not rows:
return rows
ratios = [r["ratio"] for r in rows]
print(f"comments per net upvote: median {statistics.median(ratios):.2f}, mean {statistics.mean(ratios):.2f}")
groups = defaultdict(list)
for r in rows:
groups[r["media"]].append(r["ratio"])
for kind, vals in sorted(groups.items(), key=lambda kv: -statistics.median(kv[1])):
print(f" {kind:8} {len(vals):3} posts median {statistics.median(vals):.2f}")
ranked = sorted(rows, key=lambda r: -r["ratio"])
print("most discussion for their score:")
for r in ranked[:3]:
print(f" {r['ratio']:.2f} {r['comments']:>4} comments / {r['score']:>5} pts {r['title'][:60]}")
print("least discussion for their score:")
for r in ranked[-3:]:
print(f" {r['ratio']:.2f} {r['comments']:>4} comments / {r['score']:>5} pts {r['title'][:60]}")
for r in sorted(rows, key=lambda r: -r["comments"])[:DEPTH_THREADS]:
d = thread_depth(r)
if d:
print(f"depth: {d['comments']} comments read, {d['replied']:.0%} got a reply, "
f"deepest level {d['max_depth']} ({r['title'][:40]})")
return rows
if __name__ == "__main__":
all_rows = []
for sub in sys.argv[1:] or ["learnpython"]:
for row in audit(sub):
all_rows.append({"subreddit": sub, "day": time.strftime("%Y-%m-%d"), **row})
with open("engagement.csv", "a", newline="", encoding="utf-8") as f:
w = csv.DictWriter(f, fieldnames=list(all_rows[0].keys())) if all_rows else None
if w and f.tell() == 0:
w.writeheader()
if w:
w.writerows(all_rows)
Run it on two communities:
export STEADYAPI_KEY="your_api_key"
python reddit_engagement_audit.py learnpython pics
Real output
This is the result of one run, trimmed to the main lines. Your numbers will differ, because posts and votes change by the hour.
r/learnpython: 88 posts older than 24h, 17 with score >= 10
comments per net upvote: median 1.00, mean 1.11
text 17 posts median 1.00
most discussion for their score:
2.00 20 comments / 10 pts final project in cs
1.88 30 comments / 16 pts strings in if statements
least discussion for their score:
0.50 9 comments / 18 pts Efficiency practice for daily python training
0.47 14 comments / 30 pts best way to learn advance python?
depth: 25 comments read, 16% got a reply, deepest level 2 (Need help with learning)
depth: 31 comments read, 23% got a reply, deepest level 3 (strings in if statements)
r/pics: 39 posts older than 24h, 38 with score >= 10
comments per net upvote: median 0.03, mean 0.06
gallery 8 posts median 0.06
image 30 posts median 0.03
most discussion for their score:
0.54 27 comments / 50 pts (OC) I’ve gotten pretty good at claw machines. Latest haul f
least discussion for their score:
0.00 0 comments / 84 pts Port Washington, Wisconsin Sunrise [OC]
0.00 0 comments / 15 pts [OC] Dusk at Praia de São Rafael. Algarve, Portugal
depth: 40 comments read, 40% got a reply, deepest level 4 (LGBT parade in Argentina [OC])
Reading the numbers
- Do not compare communities directly. r/learnpython's median is about 1.00 comment per point. r/pics is about 0.03. That is a 30-fold gap, but it says more about the kind of community than about its health. People answer a question. They rarely write a paragraph about a photo.
- Compare within a community, and over time. Rerun the script weekly and watch the median for your community move. A falling ratio with steady scores means readers are still showing up, but fewer are taking part.
- Post type matters inside a community. In r/pics, galleries had a higher median ratio (0.06) than single images (0.03), on 8 posts. That is a small sample, so treat it as a lead to check, not a finding.
- The outliers are the useful part. The posts with the highest ratio, such as questions that drew 20 comments on 10 points, show the kind of post that gets people talking. The ones at 0.00 show what gets scrolled past.
- Depth is a sample. A thread response holds about 40 comments, so the reply share and deepest level describe those comments, not the whole discussion.
Limits to plan for
- Few posts qualify in a quiet community. Of 88 older posts in r/learnpython, only 17 had a score of 10 or more. Lower
MIN_SCOREif you accept noisier ratios, or add pages. - Busy communities need more pages. r/pics posts so often that four pages covered only a couple of days, and 39 posts were old enough to measure. Raise
PAGESfor a longer window. - The CSV repeats posts. If you run the script daily, a post appears on several days. Keep the latest row per post
idwhen you analyze it. - Responses are cached for about 15 minutes, and an occasional request fails once and works on retry. The script handles both.
- Check Reddit's terms before you publish figures built from its data.
Cost
One subreddit per run costs 11 requests: 4 listing pages at weight 2, plus 3 threads at 1 each. Checking two communities weekly is about 95 requests a month. The Free plan's 500 requests a month covers about 45 runs. A daily run for one community is about 330 requests a month. The standard rate limit is 10 requests per second per account, and only HTTP 200 responses count toward your quota.
Bonus: ask the question directly
If you use Claude Code, Cursor, VS Code, or any MCP client, you can connect it to https://api.steadyapi.com/mcp with your API key. Then you can ask which recent posts in a subreddit got the most comments for their score in plain English, before you write the script.
Conclusion
You collected settled posts from a subreddit, calculated comments per net upvote, compared post types, and measured how deep the busiest threads go. Run it on a schedule and the CSV becomes a record of how your community's conversation changes.
Create a free account at steadyapi.com (no card required) and run the audit on a community you manage. The API documentation lists every Reddit parameter with ready-made examples in cURL, JavaScript, PHP, and Python.