How do you scrape Reddit posts via API without getting blocked?
To scrape Reddit posts without maintaining browser sessions or brittle HTML parsers, call ReefAPI's Reddit search endpoint with a subreddit or query and read the returned posts as structured JSON.
This guide demonstrates the real Reddit API engine with a captured response from . The example is only published because the engine passed the SEO snapshot gate.
Reddit post monitoring, community research, audience intelligence and social listening.
Call the live endpoint
- 1
Choose a subreddit or search query
Start with a narrow subreddit, keyword or topic so the response stays relevant and easy to review.
- 2
Call reddit/v1/search
Send the JSON params from the captured example with your ReefAPI key in the x-api-key header.
- 3
Normalize posts from data.results
Store id, title, author, subreddit, score, comment count, created timestamp and permalink for your workflow.
- 4
Use meta for monitoring
Check meta.record_count, latency_ms, cache_hit and error fields before charging downstream jobs or alerts.
Copy the request
These snippets use the captured request params for reddit/v1/search.
curl -X POST https://api.reefapi.com/reddit/v1/search \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"subreddit":"python","limit":10}'import requests
r = requests.post(
"https://api.reefapi.com/reddit/v1/search",
headers={"x-api-key": REEF_KEY},
json={
"subreddit": "python",
"limit": 10
},
)
print(r.json()["data"])const res = await fetch("https://api.reefapi.com/reddit/v1/search", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"subreddit": "python",
"limit": 10
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.reddit.search with {"subreddit":"python","limit":10}.Captured output from ReefAPI
Captured on UTC. The response below is the committed snapshot, including the API envelope and metadata.
{
"method": "POST",
"url": "https://api.reefapi.com/reddit/v1/search",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"subreddit": "python",
"limit": 10
}
}{
"ok": true,
"meta": {
"api": "reddit",
"endpoint": "search",
"mode": "live",
"latency_ms": 806.4,
"record_count": 10,
"bytes": 37271,
"cache_hit": false,
"completeness_pct": 100,
"requests": 1,
"source_used": "arctic",
"pagination": {
"next_cursor": null,
"has_more": false
},
"attempts": 1
},
"data": {
"results": [
{
"id": "1udohzd",
"fullname": "t3_1udohzd",
"title": "What are your goto lesserknown standard library modules that more Python devs should know about?",
"author": "mrcanada66",
"subreddit": "Python",
"score": 1,
"upvote_ratio": 1,
"num_comments": 0,
"created_utc": 1782237613,
"url": "https://www.reddit.com/r/Python/comments/1udohzd/what_are_your_goto_lesserknown_standard_library/",
"permalink": "https://www.reddit.com/r/Python/comments/1udohzd/what_are_your_goto_lesserknown_standard_library/",
"selftext": " Been writing Python for a while now and I keep discovering useful modules hiding in plain sight in the standard library. Things like itertools, collections, and contextlib come up fairly often, but plenty of others seem to fly completely under the radar.\n\nFor example, I only recently started using textwrap regularly for CLI output formatting, and graphlib for topological sorting, which saved me from pulling in an external dependency I didn't actually need.\n\nIt got me thinking about how often we reach for a thirdparty package when the standard library already has something solid built in. Not ",
"flair": "Discussion",
"over_18": false,
"spoiler": false,
"stickied": false,
"locked": false,
"is_self": true,
"is_video": false,
"domain": "self.Python",
"thumbnail": null,
"num_crossposts": 0,
"total_awards_received": 0,
"edited": false
},
{
"id": "1udmkgv",
"fullname": "t3_1udmkgv",
"title": "Pytml - Python in the browser with zero boilerplate",
"author": "NodeXAR",
"subreddit": "Python",
"score": 1,
"upvote_ratio": 1,
"num_comments": 1,
"created_utc": 1782233428,
"url": "https://www.reddit.com/r/Python/comments/1udmkgv/pytml_python_in_the_browser_with_zero_boilerplate/",
"permalink": "https://www.reddit.com/r/Python/comments/1udmkgv/pytml_python_in_the_browser_with_zero_boilerplate/",
"selftext": "[removed]",
"flair": "Showcase",
"over_18": false,
"spoiler": false,
"stickied": false,
"locked": false,
"is_self": true,
"is_video": false,
"domain": "self.Python",
"thumbnail": null,
"num_crossposts": 0,
"total_awards_received": 0,
"edited": false
},
{
"id": "1udm2b3",
"fullname": "t3_1udm2b3",
"title": "Managing external APIs cleanly in Python projects",
"author": "Dangerous_Agent_3292",
"subreddit": "Python",
"score": 1,
"upvote_ratio": 1,
"num_comments": 0,
"created_utc": 1782232306,
"url": "https://www.reddit.com/r/Python/comments/1udm2b3/managing_external_apis_cleanly_in_python_projects/",
"permalink": "https://www.reddit.com/r/Python/comments/1udm2b3/managing_external_apis_cleanly_in_python_projects/",
"selftext": "[removed]",
"flair": "Discussion",
"over_18": false,
"spoiler": false,
"stickied": false,
"locked": false,
"is_self": true,
"is_video": false,
"domain": "self.Python",
"thumbnail": null,
"num_crossposts": 0,
"total_awards_received": 0,
"edited": false
}
],
"count": 10,
"type": "post"
}
}Why this is hard manually
Reddit pages change markup, hide useful fields behind hydration data, and can behave differently by locale, login state and rate. A crawler that works for a single subreddit can fail when pagination, deleted posts, quarantined communities or comment-heavy threads enter the workflow.
The risky part is not only fetching HTML. It is normalizing titles, authors, scores, created timestamps, comment counts and canonical URLs into a repeatable shape that downstream jobs can trust.
Why ReefAPI solves it
ReefAPI wraps the working Reddit engine behind one POST request and returns the same envelope as every other ReefAPI endpoint: ok, data, meta and error. The committed snapshot for this guide shows a live search returning 10 Reddit posts with score, subreddit, author, comments and permalink fields.
Use it when you need dependable community data for research dashboards, content discovery, trend alerts or AI agents that need current public Reddit context.
Questions developers ask
Does this require a Reddit login?
No. The guide uses ReefAPI's Reddit engine and a ReefAPI key; it does not require your users to connect Reddit accounts.
What fields come back?
The captured response includes post ids, titles, authors, subreddit names, scores, comment counts, created timestamps, URLs and permalinks.
Is this live data?
Yes. The page renders the committed live snapshot captured by the SEO snapshot pipeline, including its capture timestamp and response metadata.
Can I monitor multiple subreddits?
Yes. Run one request per subreddit or query, store the post ids you have already seen, and dedupe new results in your own database.