Parse Reddit from
the Browser — Free
Reddit exposes a free JSON API for all public data — posts, comments, user profiles, subreddit info — with no API key required. The only thing stopping you is CORS. CORSPROXY removes that in one line of code.
fetch('https://www.reddit.com/r/programming/top.json')
// Access to fetch blocked by CORS policy
// After: Works instantly with CORSPROXY
fetch('https://corsproxy.io/?url=https://www.reddit.com/r/programming/top.json')
Reddit's API Is Free — But CORS Shuts You Out
Reddit has a well-documented JSON API. Simply append .json to any Reddit URL and you get structured data — posts, comments, user profiles, subreddit metadata. No OAuth required for public data.
The catch? Reddit's servers don't send the Access-Control-Allow-Origin header that browsers require. Every direct fetch from a web app gets blocked before it even leaves your browser.
Access to fetch at 'https://www.reddit.com/r/...' from origin
'https://yourapp.com' has been blocked by CORS policy:
No 'Access-Control-Allow-Origin' header is present
Direct fetch blocked
Browsers enforce CORS for every cross-origin request. Reddit doesn't opt in, so every call fails at the browser level — before any data reaches your app.
Official Reddit API costs money
Reddit's official OAuth API is rate-limited and now requires paid access for most use cases. The free JSON endpoints exist — you just can't reach them from a browser.
Server-side proxies add complexity
Building a backend just to forward Reddit requests means more infrastructure, more cost, and more code to maintain — for something that should take minutes.
Prefix. Fetch. Done.
CORSPROXY sits between your browser and Reddit. It forwards the request server-side — where CORS doesn't apply — and returns the response with the right headers.
Get a Free API Key
Sign up at corsproxy.io. Free tier included. Your key unlocks access from any domain, not just localhost.
Prefix Your Reddit URL
Prepend https://corsproxy.io/?url= to any Reddit JSON endpoint. That's the entire integration.
Build Without Limits
Fetch posts, comments, user data, subreddit metadata — all from the browser. No backend, no OAuth, no rate-limit headaches.
fetch('https://www.reddit.com/r/programming/top.json') No 'Access-Control-Allow-Origin' header present
fetch('https://corsproxy.io/?url=' + encodeURIComponent('https://www.reddit.com/r/programming/top.json')) 200 OK — full JSON response
Everything Reddit Exposes, Now Accessible
Reddit's JSON API is surprisingly rich. All public data is available — no API key, no OAuth, no server needed.
Subreddit Posts
Hot, new, top, and rising posts from any public subreddit. Title, score, URL, author, flair, and metadata included.
/r/{sub}/top.json?t=week Comments & Threads
Full comment trees for any post. Nested replies, scores, author info, awards, and edit history all included in the response.
/r/{sub}/comments/{id}.json User Profiles
Account age, karma, post/comment history, trophies, and subreddit moderator status for any public Reddit user.
/user/{username}/about.json Subreddit Metadata
Subscriber count, description, rules, moderators, flairs, and community stats. Build subreddit directories and analytics dashboards.
/r/{sub}/about.json Search
Full-text search across all of Reddit or scoped to a specific subreddit. Sort by relevance, new, top, or comments. Filter by time period.
/search.json?q={query} Flairs & Categories
Link flairs, user flairs, and post categories for any subreddit. Perfect for filtering and categorizing content in your app.
/r/{sub}/api/link_flair_v2.json Copy, Paste, Ship
Real-world patterns for fetching Reddit data in the browser — no backend required.
// Fetch top posts from any subreddit
const PROXY = 'https://corsproxy.io/?url=';
const subreddit = 'programming';
const response = await fetch(
PROXY + encodeURIComponent(
`https://www.reddit.com/r/${subreddit}/top.json?limit=25&t=week`
)
);
const data = await response.json();
const posts = data.data.children.map(p => p.data);
console.log(posts[0].title); // "Why I switched to TypeScript"
console.log(posts[0].score); // 4821
console.log(posts[0].url); // "https://..." // Fetch a post and all its comments
const PROXY = 'https://corsproxy.io/?url=';
// Get post ID from a Reddit URL
const postId = 'abc123';
const subreddit = 'javascript';
const response = await fetch(
PROXY + encodeURIComponent(
`https://www.reddit.com/r/${subreddit}/comments/${postId}.json`
)
);
const [postThread, commentTree] = await response.json();
const post = postThread.data.children[0].data;
const comments = commentTree.data.children
.filter(c => c.kind === 't1')
.map(c => ({
author: c.data.author,
body: c.data.body,
score: c.data.score
})); // Build a Reddit search widget
const PROXY = 'https://corsproxy.io/?url=';
async function searchReddit(query, subreddit = '') {
const base = subreddit
? `https://www.reddit.com/r/${subreddit}/search.json`
: 'https://www.reddit.com/search.json';
const params = new URLSearchParams({
q: query,
sort: 'relevance',
limit: '10',
restrict_sr: subreddit ? 'true' : 'false'
});
const res = await fetch(
PROXY + encodeURIComponent(`${base}?${params}`)
);
const json = await res.json();
return json.data.children.map(p => ({
title: p.data.title,
score: p.data.score,
comments: p.data.num_comments,
subreddit: p.data.subreddit,
url: `https://reddit.com${p.data.permalink}`
}));
}
// Works in any browser — no backend needed
const results = await searchReddit('react hooks', 'reactjs'); What Developers Are Building
Community Dashboards
Display live posts, trending topics, and community stats from any subreddit on your website. Embed Reddit content without iframes.
Brand Monitoring
Track mentions of your product, brand, or keywords across Reddit in real time. Build alerts when users discuss your company.
Content Aggregators
Build multi-source news feeds that pull top posts from multiple subreddits. Filter by flair, score, or time period to surface the best content.
Analytics & Research
Analyze community sentiment, track upvote trends, or research subreddit growth. Pull historical data for data science projects.
Product Feedback Tools
Show relevant Reddit discussions alongside your product docs. Let users see real-world examples and community solutions without leaving your app.
Browser Extensions
Enhance Reddit browsing with overlays, enhancements, or cross-subreddit comparisons — all fetched client-side without a backend service.
The Alternatives Don't Scale
Official Reddit API (OAuth)
Requires an approved app, OAuth flow, and now paid API access for most use cases. Overkill if you only need public post data.
Build your own proxy server
You'd need a Node/Python server just to forward requests. That means hosting costs, HTTPS setup, maintenance, and a new failure point.
Third-party Reddit APIs
Services like Pushshift were shut down. Unofficial scrapers go offline without warning. CORSPROXY uses Reddit's own endpoints — always up-to-date.
CORSPROXY
Free tier. One-line code change. 330+ edge locations. 99.9% uptime. Zero maintenance. Uses Reddit's own JSON endpoints directly.
Start building today
Unlock Reddit in 60 seconds
Get a free API key, prefix your Reddit URL, and start fetching posts, comments, and user data from the browser — no backend needed.