Reddit post scraper
The Zenrows Reddit post scraper turns a public subreddit feed into structured JSON: each post's ID, title, post type, score, upvote ratio, comment count, timestamp, permalink, linked domain and body text, plus the subreddit's stats and rules. Fetch in Adaptive Stealth Mode opens the feed, Extract returns the fields, from the API, the CLI or an AI agent.
- Site
reddit.com- Returns
- Post titles, scores, comment counts and body text per subreddit
- Updated
{
"community": {
"id": "t5_318ly",
"name": "webscraping",
"prefixed_name": "r/webscraping",
"member_count_label": "22K",
"members_term": "Scrapers",
"weekly_active_users": 22759,
"weekly_contributions": 485
},
"posts": [
{
"id": "t3_1x95tpc",
"title": "An insane new update to Scrapling! solve any captcha easy",
"author_username": "0.",
"post_type": "video",
"score": 104,
"upvote_ratio": 0.9642857142857143,
"comment_count": 24,
"created_timestamp": "2026-10-18T15:21:08.402000+0000",
"domain": "v.redd.it",
"flair": null,
"permalink": "/r/webscraping/comments/1x95tpc/an_insane_new_update_to_scrapling_solve_any/"
},
{
"id": "t3_1x7v51l",
"title": "New web obfuscation technique: Divergence",
"author_username": "T.",
"post_type": "link",
"score": 96,
"upvote_ratio": 0.9615384615384616,
"comment_count": 5,
"created_timestamp": "2026-10-16T23:21:36.060000+0000",
"content_url": "https://trustsig.eu/blog/javascript-divergence/",
"domain": "trustsig.eu",
"permalink": "/r/webscraping/comments/1x7v51l/new_web_obfuscation_technique_divergence/"
}
]
}{
"url": "https://www.reddit.com/r/webscraping/top/?t=week",
"mode": "auto",
"extract": "auto"
}Request and output of a live call to the weekly top feed of r/webscraping on Oct 22, 2026, trimmed for length, with usernames shortened to initials. A field is returned when the page shows it.
What data can you scrape from Reddit posts?
A subreddit feed returns one record per post in posts[], next to the community's own figures in community and its rules in community_rules[].
These are the fields teams read most, with the path of each one in the JSON.
| Field | What it holds | Example |
|---|---|---|
posts[]. |
Reddit's post ID, with the t3_ prefix |
t3_1x95tpc |
posts[]. |
The post title as written | New web obfuscation technique: Divergence |
posts[]. |
The kind of post Reddit reports | video, link, multi_media |
posts[]. |
Net votes at the time of the request | 104 |
posts[]. |
Share of votes that are upvotes, from 0 to 1 | 0.9642857142857143 |
posts[]. |
Comments Reddit counts on the thread | 35 |
posts[]. |
When the post went up, as an ISO 8601 timestamp | 2026-10-16T06:58:24.600000+0000 |
posts[]. |
Path of the post's own page | /r/webscraping/comments/1x79ae6/… |
posts[]. |
Where the post points: the outside link, the video or the post itself | https://trustsig.eu/blog/javascript-divergence/ |
posts[]. |
Domain of that link, or self. plus the subreddit for a text post |
self.webscraping |
posts[]. |
The text of a text post as the feed carries it | EDIT: I fixed the scraper and it's once again… |
posts[]. |
The post flair when the post has one, null otherwise |
null |
posts[]. |
Preview image of a link or video post | https://external-preview.redd.it/… |
posts[]. |
The account that posted it | C. |
community. |
Weekly visitors of the subreddit, as Reddit counts them | 22759 |
community. |
Members as the sidebar shows them, rounded | 22K |
community_ |
Number, title and description of each rule | { "number": 3, "title": "Commercial Products", … } |
How to scrape Reddit posts with Zenrows
- Create a free Zenrows account and copy your API key from the dashboard.
- Choose a sorted feed of the subreddit.
/r/NAME/top/?t=weekreturns the posts that drew the most votes in the last seven days, and thetvalue changes the window (day,week,month,year,all). - Send it with the default configuration: Adaptive Stealth Mode to open the feed and Extract to return each post as a record.
- Loop over
postsinparsed. Text posts carry body text and link posts carry a target URL, so read those two with a fallback. - Schedule a Batch job over the feeds you track once one subreddit returns what you need.
# pip install requests
import requests
params = {
"apikey": "YOUR_ZENROWS_API_KEY",
"url": "https://www.reddit.com/r/webscraping/top/?t=week",
"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()
parsed = response.json()["parsed"]
for post in parsed.get("posts", []):
body = post.get("text_body_preview") or ""
print(
post["id"],
post.get("score"),
post.get("comment_count"),
post.get("post_type"),
post["title"],
post.get("content_url") or "",
body[:80],
)// Node 18+ (built-in fetch)
const params = new URLSearchParams({
apikey: "YOUR_ZENROWS_API_KEY",
url: "https://www.reddit.com/r/webscraping/top/?t=week",
mode: "auto",
extract: "auto",
});
const response = await fetch(`https://api.zenrows.com/v1/?${params}`, {
signal: AbortSignal.timeout(180_000),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const { parsed } = await response.json();
const ranked = [...(parsed.posts ?? [])].sort((a, b) => (b.comment_count ?? 0) - (a.comment_count ?? 0));
for (const p of ranked) {
console.log(p.comment_count, p.score, p.flair ?? "no flair", p.title);
}curl "https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.reddit.com%2Fr%2Fwebscraping%2Ftop%2F%3Ft%3Dweek&mode=auto&extract=auto"
# Only the fields you need
curl "https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.reddit.com%2Fr%2Fwebscraping%2Ftop%2F%3Ft%3Dweek&mode=auto&extract=auto&extract_fields=posts.title%2Cposts.score%2Cposts.comment_count%2Cposts.created_timestamp%2Cposts.permalink"# pip install zenrows
import csv
from zenrows import ZenRowsClient
client = ZenRowsClient("YOUR_ZENROWS_API_KEY")
response = client.get(
"https://www.reddit.com/r/webscraping/top/?t=week",
params={"mode": "auto", "extract": "auto"},
)
posts = response.json()["parsed"].get("posts", [])
columns = ["id", "title", "post_type", "score", "upvote_ratio", "comment_count", "created_timestamp", "permalink"]
with open("webscraping-top-week.csv", "w", newline="") as f:
writer = csv.DictWriter(f, fieldnames=columns, extrasaction="ignore")
writer.writeheader()
writer.writerows(posts)Input
The scraper takes one subreddit feed URL per request, plus the options below.
A Batch job applies the same options to every URL, so tracking forty subreddits means a list of forty feed URLs with these settings.
| Parameter | Type | Default | Description |
|---|---|---|---|
url |
string | required | A public subreddit feed, best as a sorted view: /r/NAME/top/?t=week, /r/NAME/top/?t=day |
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 feed's posts and community fields as JSON in parsed, next to the raw html |
extract_ |
string | all fields | Comma-separated paths to keep, such as posts.title,posts.score,posts.comment_count |
proxy_ |
string | any | Two-letter country code, so the feed is requested from the same location on every run |
wait_ |
string | none | A CSS selector to wait for before the page is read |
session_ |
integer | none | Reuse the same session across several requests, up to 10 minutes |
{
"type": "regular",
"status": "closed",
"zenrows_params": {
"mode": "auto",
"extract": "auto",
"proxy_country": "us"
},
"tasks": [
{ "url": "https://www.reddit.com/r/webscraping/top/?t=week", "external_id": "webscraping-week" },
{ "url": "https://www.reddit.com/r/webscraping/top/?t=day", "external_id": "webscraping-day" },
{ "url": "https://www.reddit.com/r/Python/top/?t=week", "external_id": "python-week" }
]
}
Output
Every response is JSON with two keys: html, the feed as Reddit served it, and parsed, the structured record. A sorted feed returns three groups: community with the subreddit's figures, community_rules with its rules and posts with one object per post. The block below is the same live response as the sample, trimmed to three posts and fewer rules, with the third post showing a text post and its body.
The three post types in this one feed show how a record changes with the post. The video post points content_url at Reddit's video host, the link post points it at the outside article, and the text post points it back at its own thread, with domain set to self.webscraping and the body in text_body_preview. Flatten posts with pd.json_normalize(...) in pandas to get one row per post, or ask for Markdown when a language model will read the feed.
{
"community": {
"id": "t5_318ly",
"name": "webscraping",
"prefixed_name": "r/webscraping",
"created_date": "Apr 6, 2014",
"description": "The first rule of web scraping is... do not talk about web scraping. But if you must, you've come to the right place…",
"icon_url": "https://styles.redditmedia.com/t5_318ly/styles/communityIcon_sq64lrv9edwd1.png?width=128&frame=1&auto=webp…",
"banner_url": "https://styles.redditmedia.com/t5_318ly/styles/bannerBackgroundImage_lp0zartjox9c1.jpg?frame=1…",
"member_count_label": "22K",
"members_term": "Scrapers",
"visibility": "public",
"weekly_active_users": 22759,
"weekly_contributions": 485
},
"community_rules": [
{ "number": 1, "title": "Open Discussions", "description": "Ensure discussions remain public to benefit the entire community" },
{ "number": 3, "title": "Commercial Products", "description": "Refrain from referring to commercial products or services, including proxy vendors and products with free tiers" }
],
"posts": [
{
"id": "t3_1x95tpc",
"title": "An insane new update to Scrapling! solve any captcha easy",
"author_username": "0.",
"post_type": "video",
"score": 104,
"upvote_ratio": 0.9642857142857143,
"comment_count": 24,
"created_timestamp": "2026-10-18T15:21:08.402000+0000",
"content_url": "https://v.redd.it/c3xhuipws8wh1",
"domain": "v.redd.it",
"flair": null,
"text_body_preview": null,
"thumbnail_url": "https://external-preview.redd.it/an-insane-new-update-to-scrapling-solve-any-captcha-easy-v0-…",
"permalink": "/r/webscraping/comments/1x95tpc/an_insane_new_update_to_scrapling_solve_any/"
},
{
"id": "t3_1x7v51l",
"title": "New web obfuscation technique: Divergence",
"author_username": "T.",
"post_type": "link",
"score": 96,
"upvote_ratio": 0.9615384615384616,
"comment_count": 5,
"created_timestamp": "2026-10-16T23:21:36.060000+0000",
"content_url": "https://trustsig.eu/blog/javascript-divergence/",
"domain": "trustsig.eu",
"flair": null,
"text_body_preview": null,
"permalink": "/r/webscraping/comments/1x7v51l/new_web_obfuscation_technique_divergence/"
},
{
"id": "t3_1x79ae6",
"title": "Should people never share their scraping tools with others?",
"author_username": "C.",
"post_type": "multi_media",
"score": 48,
"upvote_ratio": 0.9137931034482759,
"comment_count": 35,
"created_timestamp": "2026-10-16T06:58:24.600000+0000",
"content_url": "https://www.reddit.com/r/webscraping/comments/1x79ae6/should_people_never_share_their_scraping_tools/",
"domain": "self.webscraping",
"flair": null,
"text_body_preview": "EDIT: I fixed the scraper and it's once again a no-login scraper via a completely new scraping strategy…",
"thumbnail_url": null,
"permalink": "/r/webscraping/comments/1x79ae6/should_people_never_share_their_scraping_tools/"
}
]
}
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/top/?t=week"
Then ask your agent
Use Zenrows to get this week's top posts from
https://www.reddit.com/r/webscraping/top/?t=week and give me a table
of title, post type, score, upvote ratio and comment count, sorted by
comment count. Mark which posts link to an outside site.
Scrape Reddit posts from your coding agent
Claude Code, Cursor, Codex and any MCP client can pull a subreddit's posts from a prompt.
The agent sends the Fetch and Extract request from the examples above and reads the same posts list, so it can rank, filter and summarize threads before you open Reddit. Connect the Zenrows MCP server once, or install the CLI and let the agent call it from the terminal.
Scrape Reddit posts at scale with Batch and Crawl
Batch runs a list of feed URLs as one job, in parallel, with your own ID on each result. A typical setup tracks the daily and weekly top feeds of every subreddit in a market, keyed by subreddit and window, and stores each run so scores and comment counts can be compared from one day to the next.
Crawl goes one level below the feed. Start it on a sorted feed, keep only the post pages of that subreddit, and it returns each thread's own page with its full content. Keep the depth at 1 when the feed already lists the posts you want, and raise it to reach threads linked from inside those posts.
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/top/?t=day", "external_id": "webscraping-day" },
{ "url": "https://www.reddit.com/r/Python/top/?t=day", "external_id": "python-day" }
]
}'
# 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"# feeds.jsonl: one {"url": "...", "external_id": "...", "extract": "auto"} per line
zenrows batch create feeds.jsonl --proxy-country us --wait
zenrows batch results <job-id> --out reddit-posts.jsonlcurl -X POST "https://api.zenrows.com/v1/crawls" \
-H "X-API-Key: YOUR_ZENROWS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.reddit.com/r/webscraping/top/?t=week",
"depth": 1,
"max_pages": 50,
"include_patterns": ["/r/webscraping/comments/"]
}'# Runs every day on Zenrows' side; each run keeps its own results
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": "scheduled",
"status": "closed",
"schedule": {
"rate": {
"every": 1,
"unit": "day"
}
},
"zenrows_params": {
"mode": "auto",
"extract": "auto"
},
"tasks": [
{
"url": "https://www.reddit.com/r/webscraping/top/?t=week",
"external_id": "reddit-posts"
}
]
}'
# Or at set times: "schedule": { "calendar": { "times_of_day": ["09:00"],
# "cadence": { "weekly": { "days": ["mon", "thu"] } } }, "timezone": "Europe/Madrid" }What teams do with Reddit posts
| Use case | Data they pull | Who runs it |
|---|---|---|
| Topic and trend tracking | Titles, scores and comment counts from the daily and weekly top feeds of a set of subreddits | Content strategists and analysts |
| Launch and campaign tracking | Posts that link to your domain, found through domain and content_url, with score and upvote ratio |
Marketing and developer relations teams |
| Content research | The most discussed questions of a niche, ranked by comment count, with the body text | Writers, SEO and documentation teams |
| Community benchmarking | Weekly active users, weekly contributions and post engagement across competing subreddits | Community managers and growth teams |
| Engagement modeling | Post type, timestamp, score and upvote ratio over many runs | Data science teams |
| Datasets for LLMs | Post titles and text with IDs and permalinks for attribution | AI and data teams |
Tips for scraping Reddit posts
- Request sorted feeds.
/r/NAME/top/?t=weekand itst=dayort=monthvariants give a fixed ranking for a fixed window, so two runs of the same URL rank posts over the same period. - Tell post types apart with
domain. A value that starts withself.marks a text post with body text,v.redd.ita Reddit video, and any other domain an outside link incontent_url. - Turn the permalink into a full URL.
permalinkis a path, so prefixhttps://www.reddit.combefore you request the thread or store the link. - Dedupe on the post ID. The
t3_ID inidstays the same when a post moves up or down a feed, so it is the key when daily and weekly runs return the same post. - Save the request time with each record. Score, upvote ratio and comment count keep moving after a post goes up, so store when each value was read and compare like with like.
- Expect empty fields by post type.
flair,text_body_previewandthumbnail_urlcome backnullwhen a post has no flair, no text or no preview image, so read them with a default.
More Reddit and social media scrapers
-
reddit.com
Reddit scraper
Posts, comments, scores and comment counts from public subreddits.
-
reddit.com
Reddit comment scraper
Threaded comment text, authors, scores and timestamps from any public Reddit post.
-
reddit.com
Reddit search scraper
Matching posts and subreddits for any Reddit search query with scores and dates.
-
linkedin.com
LinkedIn scraper
Public company pages, job postings and profile summaries with industry, headcount and location.
-
tiktok.com
TikTok scraper
Public videos with captions, creators, views, likes, shares and hashtags.
-
x.com
Twitter (X) scraper
Public posts, profiles and engagement counts like likes, reposts and replies from X.
-
snapchat.com
Snapchat scraper
Public creator profiles and Spotlight videos with captions, views and subscriber counts.
-
pinterest.com
Pinterest scraper
Public pins, boards and profiles with images, descriptions, save counts and outbound links.
-
substack.com
Substack scraper
Newsletter posts with titles, publications, authors, likes and comment counts.
Frequently asked questions
-
Collecting public posts that anyone can read without logging in, such as titles, scores and comment counts, is common practice for research and market analysis. Post text and usernames can be personal data, which laws such as the GDPR and the CCPA protect, so collect only what you have a legitimate reason to use and avoid profiling people. Check Reddit's user agreement and data terms for your use case and ask a lawyer if you are unsure.
-
Yes. Reddit's Data API lists a subreddit's posts for registered OAuth applications, with rate limits and separate terms for commercial use that Reddit sets and can change. It fits apps that act for a Reddit user. A scraper reads the public feed the way a visitor sees it, which suits teams that track many subreddits and want the same JSON shape as their other sources.
-
Public subreddit feeds, especially the sorted ones (
/top/with a time window), which return the post list, the community figures and the rules. Individual post pages carry the thread itself, which the Reddit comment scraper covers, and the Reddit scraper gives the overview of every Reddit page type. Private communities and anything behind a login stay out of reach. -
Each post in
postscarries its ID, title, author, post type, score, upvote ratio, comment count, timestamp, permalink, linked URL and domain, plus the flair, body text and thumbnail when the post has them. Fields a post does not have returnnull. -
Yes, for text posts. Their body comes back in
text_body_previewas the feed carries it. Link and video posts have no body, so the field isnulland the post's target sits incontent_urlinstead. -
Send a GET request to
https://api.zenrows.com/v1/with your API key, a sorted subreddit feed URL, Adaptive Stealth Mode and Extract, as in the Python example above, then loop overparsed["posts"]. Thezenrowspackage on PyPI wraps the same request, and the SDK example writes the posts to a CSV file. -
Each request returns the posts the feed shows. To cover more, request more feeds: several time windows of one subreddit, or many subreddits, as one Batch job that runs them in parallel with your own ID on each result. A Batch job accepts more than 10,000 URLs, inline or as a CSV file.
-
Run the same sorted feed URLs on a schedule, keep the post
idas the key and store the request time with each record. The changes in score, upvote ratio and comment count between runs show which posts kept drawing attention. -
Yes. Connect the Zenrows MCP server to Claude, Cursor, Codex or any MCP client, or give your agent the Zenrows CLI. Ask for a subreddit's posts in plain language and the agent calls Fetch and Extract, then works with the JSON.
-
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. A frequent setup sends each day's top posts from a set of subreddits to a Google Sheet or a Slack channel. See the integrations page for the full list.
-
JSON by default, with the structured record in
parsedand the original page inhtml. You can also ask for the feed as Markdown or plain text, which keeps titles and body text readable for LLM and RAG pipelines.