Crawl: the most reliable web crawler APISee what’s new
Zenrows
Talk to sales Start free

Reddit comment scraper

The Zenrows Reddit comment scraper turns a public post URL into structured JSON: post title, post ID, subreddit, score, upvote ratio, comment count, and each comment with author username, permalink, timestamp and text. Fetch in Adaptive Stealth Mode opens the thread, Extract returns the fields, through the API, CLI or an AI agent.

Site
reddit.com
Returns
Comment text, authors, permalinks and post stats
Runs on
Fetch, Extract, Batch, Crawl
Updated
{
  "post": {
    "id": "t3_1x9vfwh",
    "title": "Scraping Job halted by Captcha",
    "post_type": "text",
    "score": 11,
    "upvote_ratio": 0.8666666666666667,
    "comment_count": 31,
    "created_at": "2026-10-19T12:22:30.680Z",
    "permalink": "/r/webscraping/comments/1x9vfwh/scraping_job_halted_by_captcha/"
  },
  "subreddit": {
    "id": "t5_318ly",
    "name": "webscraping",
    "prefixed_name": "r/webscraping",
    "subscriber_count": 104755,
    "url": "https://www.reddit.com/r/webscraping/"
  },
  "comments": [
    {
      "author_username": "F.",
      "permalink": "https://www.reddit.com/r/webscraping/comments/1x9vfwh/comment/phpjwts/",
      "body_text": "Use random human-like waits when solving between actions and an ocr library for the actual text recognition…"
    },
    {
      "author_username": "W.",
      "permalink": "https://www.reddit.com/r/webscraping/comments/1x9vfwh/comment/phv7uvb/",
      "body_text": "I used camoufox and added jitter to mimic human behavior…"
    }
  ]
}

Sample output for a Reddit thread, built from a live request on Oct 22, 2026 and trimmed for length. The post and subreddit groups are the response as returned; the comment fields follow the conventions of the Reddit scraper, with usernames shortened to initials.

What data can you scrape from Reddit comments?

A post page returns the post, its community and the comments shown on the page.

These are the fields teams ask for most, with the path where each one lives in the JSON.

FieldWhat it holdsExample
comments[] The comment list of the thread [{ "author_username": "…", … }]
comments[].author_username Who wrote the comment F.
comments[].body_text The comment text Use random human-like waits…
comments[].permalink Link to the single comment https://www.reddit.com/r/webscraping/comments/1x9vfwh/comment/phpjwts/
comments[].created_at When the comment was written, as the page shows it 2d ago
post.id Reddit's ID of the post t3_1x9vfwh
post.title The post title Scraping Job halted by Captcha
post.post_type Kind of post: text, link, image or video text
post.score The post's vote score 11
post.upvote_ratio Share of votes that are upvotes 0.8666666666666667
post.comment_count Number of comments Reddit reports 31
post.created_at When the post was published 2026-10-19T12:22:30.680Z
post.permalink Path of the thread /r/webscraping/comments/1x9vfwh/…
post.external_url Where a link post points https://www.reddit.com/r/webscraping/…
subreddit.name Community name without the prefix webscraping
subreddit.subscriber_count Members of the community 104755

How to scrape Reddit comments with Zenrows

  1. Create a free Zenrows account and copy your API key from the dashboard.
  2. Copy the thread URL. A post lives at https://www.reddit.com/r/SUBREDDIT/comments/POST_ID/slug/. The slug is optional context, the ID is what matters.
  3. Send it with the default configuration: Adaptive Stealth Mode to open the thread and Extract to return the fields.
  4. Read parsed from the response. Read comments defensively, because a thread returns the comments the page shows, and a thread with none returns an empty list.
  5. Run your list of post URLs in Batch, or crawl a subreddit feed to collect the URLs first.
# pip install requests
import json
import requests

params = {
    "apikey": "YOUR_ZENROWS_API_KEY",
    "url": "https://www.reddit.com/r/webscraping/comments/1x9vfwh/scraping_job_halted_by_captcha/",
    "mode": "auto",          # Adaptive Stealth Mode
    "extract": "auto",       # structured JSON
}
response = requests.get("https://api.zenrows.com/v1/", params=params, timeout=180)
response.raise_for_status()

data = response.json()["parsed"]
post = data["post"]
print(post["title"], post["score"], post["comment_count"])
for comment in data.get("comments", []):
    print(comment.get("author_username"), comment.get("body_text"))
print(json.dumps(post, indent=2))

Input

The scraper takes one Reddit post URL per request, plus the options below.

The same parameters go into every task of a Batch job, so the input for a thousand threads is a list of URLs with these settings.

ParameterTypeDefaultDescription
url string required A public Reddit post URL (/r/name/comments/ID/slug/)
mode string auto Adaptive Stealth Mode: starts with the lightest setup and adds rendering and protected-site handling only when the page needs them
extract string auto Returns the page's fields as JSON in parsed, next to the raw html
extract_fields string all fields Comma-separated paths to keep, such as post.title,post.score
proxy_country string any Two-letter country code. Reddit labels the page in the language of the visitor's location
wait_for string none A CSS selector to wait for before the page is read
session_id integer none Reuse the same session across several requests, up to 10 minutes
Batch input
{
  "type": "regular",
  "status": "closed",
  "zenrows_params": {
    "mode": "auto",
    "extract": "auto",
    "proxy_country": "us"
  },
  "tasks": [
    { "url": "https://www.reddit.com/r/webscraping/comments/1x9vfwh/scraping_job_halted_by_captcha/", "external_id": "1x9vfwh" },
    { "url": "https://www.reddit.com/r/webscraping/comments/1x369e0/opensource_reddit_scraper_for_posts_and_comments/", "external_id": "1x369e0" }
  ]
}

Output

Every response is JSON with two keys: html, the page as Reddit served it, and parsed, the structured record. The sample below is trimmed, and its comment list is built from the values the page showed in a live request.

Need a spreadsheet? Load parsed["comments"] into pandas with pd.json_normalize(...) and write CSV or Excel. Need the thread for an LLM? Ask for Markdown instead of JSON and the comments come back as plain text.

Post page
{
  "comments": [
    {
      "author_username": "F.",
      "created_at": "2d ago",
      "permalink": "https://www.reddit.com/r/webscraping/comments/1x9vfwh/comment/phpjwts/",
      "body_text": "Use random human-like waits when solving between actions and an ocr library for the actual text recognition, I’ve had the best success with Paddle"
    }
  ],
  "post": {
    "comment_count": 31,
    "created_at": "2026-10-19T12:22:30.680Z",
    "external_domain": "self.webscraping",
    "external_url": "https://www.reddit.com/r/webscraping/comments/1x9vfwh/scraping_job_halted_by_captcha/",
    "id": "t3_1x9vfwh",
    "permalink": "/r/webscraping/comments/1x9vfwh/scraping_job_halted_by_captcha/",
    "post_type": "text",
    "score": 11,
    "title": "Scraping Job halted by Captcha",
    "upvote_ratio": 0.8666666666666667
  },
  "subreddit": {
    "id": "t5_318ly",
    "name": "webscraping",
    "prefixed_name": "r/webscraping",
    "subscriber_count": 104755,
    "url": "https://www.reddit.com/r/webscraping/"
  }
}

Connect the MCP server (Claude Code)

claude mcp add zenrows -e ZENROWS_API_KEY=YOUR_ZENROWS_API_KEY -- npx -y @zenrows/mcp

MCP config (Cursor, Claude Desktop, Windsurf)

{
  "mcpServers": {
    "zenrows": {
      "command": "npx",
      "args": ["-y", "@zenrows/mcp"],
      "env": { "ZENROWS_API_KEY": "YOUR_ZENROWS_API_KEY" }
    }
  }
}

Or run the CLI

npx -y @zenrows/cli init
zenrows extract "https://www.reddit.com/r/webscraping/comments/1x9vfwh/scraping_job_halted_by_captcha/"

Then ask your agent

Use Zenrows to read this Reddit thread and summarize the solutions the
commenters suggest, with a link to each comment:
https://www.reddit.com/r/webscraping/comments/1x9vfwh/scraping_job_halted_by_captcha/

Scrape Reddit comments from your coding agent

Claude Code, Cursor, Codex and any MCP client can scrape Reddit comments from a prompt.

The agent calls the same Fetch and Extract request a developer would, so the JSON above is what it reads. Connect the Zenrows MCP server once, or install the CLI and let the agent run it in the terminal.

Scrape Reddit comments at scale with Batch and Crawl

Batch runs a list of post URLs as one job: thousands of threads in parallel, with the post ID as your own ID on each result. Use it to pull the comments of every post you collected yesterday.

Crawl finds the threads for you. Start it on a subreddit feed such as /r/webscraping/new/, keep the links that contain /comments/, and it returns every post page it reaches with its comments. Raise the depth to follow older pages of the feed.

Scheduled jobs run the same Batch job on a timetable, on Zenrows' side: every few hours, once a day, at set times on chosen days, or once at a future date. Each run keeps its own results, a webhook can tell your app when a run finishes, and you can pause or resume the schedule at any time, with no cron server to keep alive.

curl -X POST "https://async.api.zenrows.com/v1/jobs" \
  -H "X-API-Key: YOUR_ZENROWS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "regular",
    "status": "closed",
    "zenrows_params": { "mode": "auto", "extract": "auto", "proxy_country": "us" },
    "tasks": [
      { "url": "https://www.reddit.com/r/webscraping/comments/1x9vfwh/scraping_job_halted_by_captcha/", "external_id": "1x9vfwh" },
      { "url": "https://www.reddit.com/r/webscraping/comments/1x369e0/opensource_reddit_scraper_for_posts_and_comments/", "external_id": "1x369e0" }
    ]
  }'

# Read the results when the job finishes
curl "https://async.api.zenrows.com/v1/jobs/JOB_ID/results?status=successful" \
  -H "X-API-Key: YOUR_ZENROWS_API_KEY"

What teams do with Reddit comments

Use caseData they pullWho runs it
Brand and product monitoring Comments that mention a brand, with permalink and timestamp Marketing and communications teams
Sentiment analysis Comment text and post score across a subreddit Data science and market research teams
Product feedback mining Feature requests and complaints in threads about your category Product and CX teams
Competitor research Comment text under posts about competing products Strategy and competitive intelligence teams
Community moderation research Thread size, scores and upvote ratio over time Community managers
LLM training and RAG Full thread text as Markdown or JSON AI and data teams

Tips for scraping Reddit comments

  • Use the canonical post URL. https://www.reddit.com/r/SUBREDDIT/comments/POST_ID/slug/ is enough. Drop tracking parameters such as utm_source.
  • Key everything on the post ID. post.id (t3_…) is stable, so use the ID after comments/ as the external_id in Batch.
  • Compare comment_count with the comments returned. The count is what Reddit reports for the whole thread, while comments[] holds what the page shows.
  • Link to a single comment with its permalink. Each comment's permalink ends with the comment ID, which is a good key for deduplicating across runs.
  • Collect URLs from feeds first. Crawl /r/name/new/ or /r/name/top/ with the /comments/ pattern, then run the thread URLs in Batch.
  • Read optional groups defensively. A fresh post can have no comments yet, and the list comes back empty.

Frequently asked questions

  • Collecting publicly available data from Reddit, such as post titles, scores and comment text visible to every visitor, is common practice for research and brand monitoring. Comments are written by individuals under usernames, and personal data is protected by laws such as the GDPR and the CCPA, so collect only what you have a legitimate reason to use. Check Reddit's terms and its data API terms for your use case and ask your lawyer if you are unsure.

  • Yes. Reddit offers a Data API that returns posts and comments for registered applications, under its own terms, rate limits and approval rules for commercial use. A scraper reads the public page instead, which suits teams that do not want to register an app or need the same output format across many sites.

  • Public subreddit pages, their sorted feeds (new, hot, top), and individual post pages with their comments. Send the URL as it appears in your browser. The Reddit scraper covers subreddit pages in detail.

  • Yes. Send the post URL and read parsed.comments. Each comment carries its author username, permalink, timestamp and text. Run a list of post URLs in Batch to collect comments across many threads.

  • Send a GET request to https://api.zenrows.com/v1/ with your API key, the post URL, Adaptive Stealth Mode and Extract turned on, as in the Python example above. The response's parsed key holds the thread as a Python dictionary. The zenrows package on PyPI wraps the same request.

  • Send one URL per request, or a whole list as a Batch job that runs the URLs in parallel and keeps your own ID on each result. One Batch job accepts more than 10,000 URLs, sent inline or as a CSV file.

  • No. Extract returns each field by name, so your code reads parsed instead of parsing Reddit's HTML. For a field of your own, send a separate request with CSS selectors instead of Extract.

  • Yes. Connect the Zenrows MCP server to Claude, Cursor, Codex or any MCP client, or give your agent the Zenrows CLI. Ask for the threads you want in plain language and the agent calls Fetch and Extract for you.

  • Yes. Create a scheduled Batch job with your Reddit URLs and the same settings as a single request, and Zenrows runs it on its side: every few hours, once a day, at set times on chosen days, or once at a future date. Each run keeps its own results, a webhook can notify your app when a run finishes, and the schedule can be paused or resumed at any time.

  • Zenrows works with n8n, Make, Zapier, Clay, Dify, LangChain, LlamaIndex, CrewAI and Mastra, plus the Python, Node.js and Go SDKs and any HTTP client. Send results to Google Sheets, a database or a data warehouse from the workflow tool you already use. See the integrations page for the full list.

  • JSON by default, with the structured record in parsed and the original page in html. You can also ask for the page as Markdown or plain text, which is what most LLM and RAG pipelines want.

Turn the live web into usable data.

Start building free 5,000 credits/month, always