A Reddit thread as JSON, with the reply tree intact.
The honest difference between a Reddit CSV and a Reddit JSON: the CSV is flat, the JSON keeps the tree. If you’re writing code against the data, you want the tree. If you’re opening it in a spreadsheet, you want the flat. This page is about the first case.
A Reddit thread is a tree. JSON is a tree. The natural fit is so obvious that it’s strange most tools don’t honor it — half the “Reddit to JSON” exports on the open web are CSVs with curly braces. A real JSON export preserves nesting: each comment carries a children array of its replies, and those children carry their own children, down to the leaves.
The JSON shape
The export is a single JSON object with the post metadata at the top and a tree of comments underneath:
{
"post": {
"id": "1h2x7r",
"title": "How did you get your first 100 users?",
"author": "founderdiary",
"subreddit": "SaaS",
"url": "https://reddit.com/r/SaaS/comments/1h2x7r/...",
"createdAt": "2026-04-12T11:08:31Z",
"score": 312
},
"comments": [
{
"id": "k8s2j1m",
"parentId": null,
"depth": 0,
"author": "jellybean42",
"body": "How did you find your first paying customer?",
"score": 287,
"createdAt": "2026-04-12T12:14:02Z",
"permalink": "https://reddit.com/r/SaaS/...k8s2j1m",
"children": [
{
"id": "k8s3a4p",
"parentId": "k8s2j1m",
"depth": 1,
"author": "founderdiary",
"body": "Built it for a friend who needed it…",
"score": 56,
"children": [ ... ]
}
]
}
],
"extractedAt": "2026-04-12T14:33:02Z",
"extractionSource": "json-api"
} Every comment object carries the same fields whether it’s a top-level comment or a deeply nested reply. children is always an array (possibly empty). The shape is recursive.
Why JSON, when CSV exists
CSV flattens. That’s fine for spreadsheet work; it’s wrong for code that needs to walk the tree:
- Iteration is recursive. A function over JSON walks the tree naturally —
visit(comment), thencomment.children.forEach(visit). The CSV equivalent requires a join onparentIdevery time. - Subtree extraction is free. Want everything under a specific comment? Grab that node, you have the whole subtree. In CSV you do a recursive query.
- Types survive. Scores are numbers in JSON, dates are ISO strings, nulls are nulls. CSV is all strings until you parse it.
- Direct LLM input. Most LLM APIs accept JSON cleanly. CSV in a prompt becomes brittle.
If you want the spreadsheet-friendly version instead, see Reddit comments to CSV.
Three things people do with the JSON
Pandas, in five lines
import json, pandas as pd
data = json.load(open("thread.json"))
def flatten(c, rows):
rows.append({k: c.get(k) for k in ("id","parentId","depth","author","score","createdAt","permalink","body")})
for child in c.get("children", []): flatten(child, rows)
rows = []
for c in data["comments"]: flatten(c, rows)
df = pd.DataFrame(rows) Node, with the tree intact
const data = require("./thread.json");
function walk(c, depth = 0) {
console.log(" ".repeat(depth * 2) + c.author + ": " + c.body.slice(0, 80));
c.children.forEach(child => walk(child, depth + 1));
}
data.comments.forEach(c => walk(c)); LLM prompt with the actual structure
Pass the JSON as the user message; tell the model the schema in one sentence. It can answer “what does the comment chain under comment k8s2j1m argue?” because the tree structure is preserved — something that takes meaningful pre-processing if you’re working from CSV.
If you want a programmatic JSON endpoint
The Chrome extension is the right tool when a human is reading threads and wants the JSON on disk. If you want JSON as the response of an HTTP call — for a backend pipeline, a scheduled job, or a data product — the Pro tier exposes a hosted Reddit comments API with code samples in cURL, JavaScript, Python, PHP, Go, and Java. Same backend the extension uses, same JSON shape on the way out.
Where to go next
JSON for analysis pipelines. CSV or Excel for spreadsheet workflows. Google Sheets for shareable analysis. Google Docs for readable transcripts. The Reddit API alternative guide covers when to reach for the extension vs. PRAW vs. our hosted API.
Keep reading
Download · Save
Download Reddit comments to your disk
Save every comment from a thread before it disappears — CSV, JSON, Markdown, or a Google Doc.
Thread exporter
A Reddit thread exporter for the next thread you open
Comment scraper that runs in your browser. No API key, no OAuth, hierarchy intact, “more replies” auto-expanded.
How-to
Export Reddit comments to CSV
The cleanest way to get a Reddit thread into a spreadsheet — with hierarchy intact.
Stop copying comments by hand
Install once. Export forever.
A free Chrome extension built for one platform. Add it on the next thread you open.