snoowrap was the Reddit wrapper for JavaScript. Its repository was archived on March 17, 2024, and npm marks its last version deprecated ("Package no longer supported"), yet it still gets about thirteen thousand downloads a week. Like every Reddit wrapper, it needs OAuth credentials from a Reddit app, and since November 2025 Reddit gives new ones out only after it approves your request under its Responsible Builder Policy.
This guide reads Reddit with SocialTap in Node.js: subreddit feeds, posts with their comments, search and users, with no Reddit app.
What snoowrap needs
import snoowrap from "snoowrap";
const r = new snoowrap({
userAgent: "my-app by u/me",
clientId: "…",
clientSecret: "…",
refreshToken: "…",
});
const posts = await r.getSubreddit("node").getHot({ limit: 10 });An archived package, and credentials a new project can't get without approval: two reasons that code won't run tomorrow.
The same data with one API key
SocialTap reads public Reddit pages for you, with its own sessions and proxies, and returns live data in one schema. Install the SDK (ES modules, Node 20.3 or later):
npm install socialtapGet a key on the signup page and set it as SOCIALTAP_API_KEY. Every account starts with 100 free credits. This reads one post from its link:
// Save this as app.mjs (an ES module) and run: node app.mjs
import { SocialTap } from "socialtap";
const client = new SocialTap(); // apiKey defaults to process.env.SOCIALTAP_API_KEY
const res = await client.reddit.post.get({ url: "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/" });
console.log(res.data);
console.log(res.credits.charged, res.meta.request_id);A subreddit's posts, page by page
r.getSubreddit(name).getHot() becomes client.reddit.subredditPosts.iterate(), an async iterator over the feed, 25 posts a page, with sort for best, hot, newest, popular, rising or controversial. It stops at your guards and tells a private subreddit apart from a missing one:
// Save this as app.mjs (an ES module) and run: node app.mjs
import { SocialTap, APIError, NotFoundError, PrivateOrUnavailableError } from "socialtap";
const client = new SocialTap(); // apiKey defaults to process.env.SOCIALTAP_API_KEY
try {
// Stops at the end of the list, or at the first guard it reaches.
const items = client.reddit.subredditPosts.iterate({ url: "https://www.reddit.com/r/golang/", sort: "best" }, { maxPages: 10, maxCredits: 100 });
for await (const item of items) {
console.log(item);
}
console.log(items.pagesFetched, items.creditsCharged, items.stopReason, items.endReason);
} catch (err) {
if (err instanceof NotFoundError) {
// The item does not exist or was deleted.
console.error(err.code, err.remediation);
} else if (err instanceof PrivateOrUnavailableError) {
// The item exists but isn't public: it is private, age- or region-restricted, or needs a login.
console.error(err.code, err.remediation);
} else if (err instanceof APIError) {
// Retryable errors reach you only after the SDK's own retries. Failed requests cost no credits.
console.error(err.code, err.status, err.retryable, err.remediation, err.requestId);
} else throw err;
}Each post has its title, text, author, score, upvote ratio, comment count, media and flair, in the same fields as a post from any other platform.
From snoowrap to SocialTap
| snoowrap | SocialTap | Endpoint |
|---|---|---|
r.getSubreddit(name).getHot() | client.reddit.subredditPosts.iterate() | Reddit Subreddit Posts API |
r.getSubmission(id).fetch() | client.reddit.post.get() | Reddit Post API |
submission.comments | client.reddit.comments.iterate() | Reddit Comments API |
r.search({ query }) | client.reddit.searchPosts.iterate() | Reddit Search API |
r.getUser(name).fetch() | client.reddit.profile.get() | Reddit Profile API |
The SDK has no dependencies (it uses fetch) and runs in Node, Deno, Bun and Cloudflare Workers.
What it costs
You pay per successful request, and a list request returns a page:
- A subreddit's posts: $0.03–$0.08 per 1,000 posts.
- Comments: $0.0037–$0.0098 per 1,000 comments.
- Search results: $0.11–$0.28 per 1,000 posts.
Failed requests and cache hits cost nothing. See plans and packs.
Frequently asked questions
Is snoowrap deprecated?
Yes. Its GitHub repository was archived in March 2024 and npm marks the package as no longer supported, so it gets no fixes when Reddit changes.
How do I get a Reddit API key now?
You request access from Reddit and wait for its approval, under the Responsible Builder Policy it introduced in November 2025. Commercial use needs a separate written agreement. With SocialTap, the key comes with sign-up.
Can I search Reddit comments, not only posts?
Yes. The Reddit Comment Search API finds comments by keyword across Reddit, and the Reddit Search API finds posts, both newest first if you ask.
Does it work from serverless functions?
Yes. Each call is one HTTPS request with your key, so it runs from Vercel, Lambda or a Cloudflare Worker.