ProLevelMax 擷取 1,000 條 Reddit 評論至 AI Agent 的費用及摺疊回覆處理方法
What it costs to pull 1,000 Reddit comments into an AI agent, collapsed replies included
ProLevelMax 的資料來源可透過 MCP 逐層展開 Reddit 討論串的摺疊回覆,將完整評論載入 AI Agent;逐次呼叫方案擷取 1,000 條評論約需 $0.30。
Ask an AI to summarise a long Reddit thread and it will usually work from whatever came back on the first request. On a thread with a few hundred comments, that is often well under half of the discussion. The rest sits behind Reddit's "more replies" and "continue this thread" links, and those collapsed branches tend to hold the long back-and-forth arguments you actually wanted.
This post covers three things I get asked about when people compare Reddit data tools for research: whether collapsed branches really get expanded, what fields come back for each comment, and what 1,000 comments cost. I work on ProLevelMax, the data source used in the examples, so the numbers below are ours. The checklist at the end applies to any tool.
Why "nested comments" is not the same as "all comments"
Reddit does not send a whole comment tree in one response. Past a certain depth or count it returns a stub that says, in effect, "there are more replies here, ask again with this cursor".
A scraper can handle that stub in two ways:
- Return it as a placeholder record with an ID and move on. The output looks nested and complete, but the deepest replies are missing.
- Follow the stub, fetch the branch, and repeat for any stubs inside it.
Both can be described as "supports nested comments". Only the second gets you the full thread. When you test a tool, count how many records in its output are placeholders.
How the expansion works here
There are two per-call sources for a single thread:
| Source | What it returns | Price |
|---|---|---|
procli_reddit_b Post comments |
One page of a post's comment tree. Pass page.after from the previous result as after to get the next page. |
$0.003 per call |
procli_reddit_h Comment replies |
The replies under one collapsed branch. Pass the post ID and the stub's more.cursor as cursor. |
$0.003 per call |
A collapsed branch comes back with a more.cursor value. Send that to procli_reddit_h and you get the replies under it. If those replies contain stubs of their own, do the same again. An agent connected over MCP does this when you ask for "all comments, including collapsed replies". In your own code you loop until no cursor is left.
For bigger jobs across many posts there is also a bulk source (procli_reddit_a) that runs searches, subreddits or URL lists in one job, with a per-post comment cap.
What comes back for each comment
From a live procli_reddit_b result:
-
id(for examplet1_...), so you can de-duplicate and join -
createdAt(ISO timestamp) -
authorInfo(username and author details) -
content.markdown(the text) -
scoreandisScoreHidden permalink-
depth(nesting level) -
isRemoved,isAdminTakedown,isLocked,isStickied,isInitiallyCollapsed,initiallyCollapsedReason -
more.cursoron collapsed branches -
page.commentCountandpage.hasNextPageon each page
Deleted and removed comments come back the way Reddit shows them publicly, usually without text, and flagged so you can filter them out before counting.
The cost of 1,000 comments
Per-call route: every call is $0.003. Across our recent calls the Post comments source returned a median of 10 comments per call, so:
1,000 comments ≈ 100 calls × $0.003 = $0.30
Each collapsed branch you expand is one more $0.003 call, so deep threads cost somewhat more than that.
Bulk route: $0.0108 per result plus $0.06 per run.
1,000 results in one run = 1,000 × $0.0108 + $0.06 = $10.86
The bulk route costs more per comment but covers many posts in one job. For reading a limited set of threads in full, the per-call route is cheaper. Every run is quoted before it starts and the charge never goes above the quote. Current prices are on the pricing page.
A script that walks the whole thread
This pages through a post's comments, then expands every collapsed branch it finds, and stops if anything would need a confirmation (quotes above $0.10). It does not assume the exact nesting of the response: it walks the JSON and picks up anything that looks like a comment (id starting with t1_) or a stub (more.cursor).
import json, sys, time, requests
API = "https://prolevelmax.com/v1"
H = {"Authorization": "Bearer sk_procli_..."}
POST = "t3_1abcde" # the post you want
def run(scraper, inp):
q = requests.post(f"{API}/inspect", headers=H, json={"scraper": scraper, "input": inp}).json()
if q["quote"]["needsConfirmation"]:
sys.exit(f"Quote is {q['quote']['maxChargeDisplay']}, stopping for review")
time.sleep(1.2)
return requests.post(f"{API}/run", headers=H, json={"scraper": scraper, "input": inp}).json()
def walk(node, comments, cursors):
if isinstance(node, dict):
if str(node.get("id", "")).startswith("t1_"):
comments[node["id"]] = node
more = node.get("more")
if isinstance(more, dict) and more.get("cursor"):
cursors.append(more["cursor"])
for v in node.values():
walk(v, comments, cursors)
elif isinstance(node, list):
for v in node:
walk(v, comments, cursors)
comments, cursors, calls = {}, [], 0
# 1. page through the top of the thread
inp = {"post_id": POST, "sort_type": "TOP"}
while calls < 50:
r = run("procli_reddit_b", inp); calls += 1
walk(r["items"], comments, cursors)
page = r.get("page") or {}
if not page.get("hasNextPage") or not page.get("after"):
break
inp["after"] = page["after"]
# 2. expand every collapsed branch, including branches inside branches
seen = set()
while cursors and calls < 200:
c = cursors.pop()
if c in seen:
continue
seen.add(c)
r = run("procli_reddit_h", {"post_id": POST, "cursor": c}); calls += 1
walk(r["items"], comments, cursors)
json.dump(list(comments.values()), open("thread.json", "w"), ensure_ascii=False, indent=2)
print(len(comments), "comments in", calls, "calls; balance", r["wallet"]["balanceDisplay"])
The two calls limits are a budget guard: 200 calls is $0.60 at most. Raise them once you have seen what a typical thread in your niche needs.
A test you can run on any Reddit tool
Before committing to one tool for a research project, pick three threads you can check by hand: one small, one with a few hundred comments, and one with long collapsed arguments. Then for each tool:
- Count the comments with text in its output and compare with what you can read on Reddit. Reddit's displayed count includes deleted and removed comments, so expect fewer.
- Count placeholder records (an ID with no text and a "more" marker). If there are many, the tool is not expanding branches.
- Check that every comment has an ID, author, timestamp, score and permalink.
- Divide what you were charged by the number of comments with text. That is your real cost per comment, which is the number worth comparing.
Limits
- Public data only. Private and quarantined communities cannot be read.
- Scores are a snapshot at request time.
- Up to 5 jobs run at once per account. Results are kept for 30 days.
- Using Reddit data commercially is subject to Reddit's terms. Collecting it does not by itself give you the right to use it.
Setup
In Claude, Claude Code, Codex or Cursor: create an API key in the console ("Generate setup message" on the Get started page) and send it to your AI. In ChatGPT: add https://prolevelmax.com/mcp as an app and sign in with OAuth. New accounts get $1 of credit after email verification, which covers the script above several times over.
The full reference for this, including the Chinese version, is in the guide How to get full Reddit comment threads, including collapsed replies, into your AI. Questions or corrections: toph@prolevelmax.com.
來源:DEV Community · dev.to