{"slug": "what-it-costs-to-pull-1000-reddit-comments-into-an-ai-agent-collapsed-replies", "title": "What it costs to pull 1,000 Reddit comments into an AI agent, collapsed replies included", "summary": "A developer at ProLevelMax detailed the cost and mechanics of pulling full Reddit comment threads into an AI agent, including collapsed branches that standard first-request scraping misses. Using the company's per-call sources at $0.003 per call and a median of 10 comments per call, 1,000 comments cost roughly $0.30, while a bulk route runs $10.86 for 1,000 results in a single job. The writeup walks through cursor-based expansion of \"more replies\" stubs and the fields returned per comment.", "body_md": "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.\n\nThis 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.\n\nReddit 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\".\n\nA scraper can handle that stub in two ways:\n\nBoth 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.\n\nThere are two per-call sources for a single thread:\n\n| Source | What it returns | Price | \n|---|---|---|\n| `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 | \n| `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 | \n\nA 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.\n\nFor 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.\n\nFrom a live `procli_reddit_b` result:\n\n`id` (for example `t1_...`), so you can de-duplicate and join` createdAt` (ISO timestamp)`authorInfo` (username and author details)`content.markdown` (the text)`score` and `isScoreHidden`\n`permalink`` depth` (nesting level)`isRemoved`, `isAdminTakedown`, `isLocked`, `isStickied`, `isInitiallyCollapsed`, `initiallyCollapsedReason`\n`more.cursor` on collapsed branches`page.commentCount` and `page.hasNextPage` on each page\nDeleted and removed comments come back the way Reddit shows them publicly, usually without text, and flagged so you can filter them out before counting.\n\nPer-call route: every call is $0.003. Across our recent calls the Post comments source returned a median of 10 comments per call, so:\n\n```\n1,000 comments ≈ 100 calls × $0.003 = $0.30\n```\n\nEach collapsed branch you expand is one more $0.003 call, so deep threads cost somewhat more than that.\n\nBulk route: $0.0108 per result plus $0.06 per run.\n\n```\n1,000 results in one run = 1,000 × $0.0108 + $0.06 = $10.86\n```\n\nThe 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](https://prolevelmax.com/pricing).\n\nThis 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`).\n\n``` python\nimport json, sys, time, requests\n\nAPI = \"https://prolevelmax.com/v1\"\nH = {\"Authorization\": \"Bearer sk_procli_...\"}\nPOST = \"t3_1abcde\"                      # the post you want\n\ndef run(scraper, inp):\n    q = requests.post(f\"{API}/inspect\", headers=H, json={\"scraper\": scraper, \"input\": inp}).json()\n    if q[\"quote\"][\"needsConfirmation\"]:\n        sys.exit(f\"Quote is {q['quote']['maxChargeDisplay']}, stopping for review\")\n    time.sleep(1.2)\n    return requests.post(f\"{API}/run\", headers=H, json={\"scraper\": scraper, \"input\": inp}).json()\n\ndef walk(node, comments, cursors):\n    if isinstance(node, dict):\n        if str(node.get(\"id\", \"\")).startswith(\"t1_\"):\n            comments[node[\"id\"]] = node\n        more = node.get(\"more\")\n        if isinstance(more, dict) and more.get(\"cursor\"):\n            cursors.append(more[\"cursor\"])\n        for v in node.values():\n            walk(v, comments, cursors)\n    elif isinstance(node, list):\n        for v in node:\n            walk(v, comments, cursors)\n\ncomments, cursors, calls = {}, [], 0\n\n# 1. page through the top of the thread\ninp = {\"post_id\": POST, \"sort_type\": \"TOP\"}\nwhile calls < 50:\n    r = run(\"procli_reddit_b\", inp); calls += 1\n    walk(r[\"items\"], comments, cursors)\n    page = r.get(\"page\") or {}\n    if not page.get(\"hasNextPage\") or not page.get(\"after\"):\n        break\n    inp[\"after\"] = page[\"after\"]\n\n# 2. expand every collapsed branch, including branches inside branches\nseen = set()\nwhile cursors and calls < 200:\n    c = cursors.pop()\n    if c in seen:\n        continue\n    seen.add(c)\n    r = run(\"procli_reddit_h\", {\"post_id\": POST, \"cursor\": c}); calls += 1\n    walk(r[\"items\"], comments, cursors)\n\njson.dump(list(comments.values()), open(\"thread.json\", \"w\"), ensure_ascii=False, indent=2)\nprint(len(comments), \"comments in\", calls, \"calls; balance\", r[\"wallet\"][\"balanceDisplay\"])\n```\n\nThe 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.\n\nBefore 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:\n\nIn 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.\n\nThe 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](https://prolevelmax.com/guides/reddit-full-comment-threads). Questions or corrections: [toph@prolevelmax.com](mailto:toph@prolevelmax.com).", "url": "https://wpnews.pro/news/what-it-costs-to-pull-1000-reddit-comments-into-an-ai-agent-collapsed-replies", "canonical_source": "https://dev.to/toph_a_0607897a5c9c5aca5c/what-it-costs-to-pull-1000-reddit-comments-into-an-ai-agent-collapsed-replies-included-1bp2", "published_at": "2026-10-19 04:37:39+00:00", "updated_at": "2026-10-19 04:48:15.275833+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-infrastructure"], "entities": ["Reddit", "ProLevelMax", "MCP"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/what-it-costs-to-pull-1000-reddit-comments-into-an-ai-agent-collapsed-replies", "markdown": "https://wpnews.pro/news/what-it-costs-to-pull-1000-reddit-comments-into-an-ai-agent-collapsed-replies.md", "text": "https://wpnews.pro/news/what-it-costs-to-pull-1000-reddit-comments-into-an-ai-agent-collapsed-replies.txt", "jsonld": "https://wpnews.pro/news/what-it-costs-to-pull-1000-reddit-comments-into-an-ai-agent-collapsed-replies.jsonld"}}