The Typed Reddit npm Package: redditapis-mcp as Your JS/TS Way In (2026)
redditapis-mcp is the typed JS/TS way into the Reddit API: install via npx into any MCP client, use its 11 read tools, or import its query builders.

The typed JS and TypeScript way into the Reddit API in 2026 is the redditapis-mcp npm package. It ships the Reddit read surface as validated Model Context Protocol tools you can mount in Claude, Cursor, or any MCP client with one npx line, and its query builders are importable if you want to construct requests in your own code. There is no OAuth developer app, no global install, and no build step. One bearer token turns the package into live Reddit reads for an agent.
Not affiliated with Reddit Inc. redditapis.com is an independent third-party REST proxy for Reddit's API.
TL;DR:
redditapis-mcpis the official npm package for the Reddit API. Run it withnpx -y redditapis-mcp@latest, point your MCP client at it with aREDDITAPIS_KEY, and its 11 typed read tools appear to the agent. Or importTOOLS,buildQuery, andbuildPathto build requests in your own client. Zod validates every tool's arguments. Reads cost $0.002 per call (pricing).
What you will build:
- An
npxlaunch of the package with no global install - An MCP client config that mounts the 11 Reddit read tools
- A programmatic import of the package's query builders
- Environment configuration for base URL and timeout
- A clear read of how the package compares to snoowrap
Cost: The package is free and MIT. Reads cost $0.002 per call. Free credit at signup.
Why a Package, Not a Hand-Rolled Client
You can call the Reddit API with plain fetch, and for a small script that is the right choice. But the moment you want Reddit inside an AI agent, you want the calls to arrive as typed, validated tools the model can pick from, and you want them installable with one line. That is what a package buys you: a maintained, versioned surface instead of a client you copy between projects. Developers feel the pull toward a good package the moment they realize the old wrappers stalled:

Rohit Dasu
@rohitdasudotcom
Hi twitter 𝕏 developer community, is there any good wrapper package for reddit API for js/nodejs? I got to know about snoowrap. But it was last published 3 years ago. Let me know any updated packages that is good. Thanks :)
redditapis-mcp is that package for the Reddit API. It is published on npm, MIT-licensed, and built on the official Model Context Protocol SDK, with input schemas declared in Zod so every tool argument is validated before a request goes out. It targets the AI-agent use case head-on: mount it, and an agent gets typed Reddit read tools with one bearer token and no OAuth app. This guide covers both ways to use it, as an MCP server and as an importable module, at $0.002 per read call (pricing). For the raw-fetch alternative, see the Node.js and TypeScript tutorial.
Install with npx, No Global Install
The package runs over stdio with npx, so there is nothing to install globally and nothing to keep updated by hand. @latest pulls the current version each launch:
npx -y redditapis-mcp@latest
That command starts the MCP server, which reports the number of tools and the base URL to stderr and then waits for a client to connect. It needs one environment variable, REDDITAPIS_KEY, which you get at signup. The package requires Node 18 or newer, which matches the runtime most agent hosts already run. Because npx resolves the package fresh, upgrading is automatic: the next launch pulls the newest release, so you are never pinned to a stale client. The r/node community follows package release cadence closely, which is exactly the maintenance signal a hand-rolled client lacks:
Kreuzberg v4.0.0-rc.8 is available
For the underlying REST endpoints the package wraps, see the Reddit data API overview.
Configuring Your MCP Client
To mount the package in an MCP client, add one server entry. The command is npx, the args launch the package, and the env block carries your key. This is the entire integration for Claude Desktop, Claude Code, Cursor, or any client that reads an mcp.json:
{
"mcpServers": {
"reddit": {
"command": "npx",
"args": ["-y", "redditapis-mcp@latest"],
"env": { "REDDITAPIS_KEY": "your_api_key_here" }
}
}
}
Once the client restarts, the Reddit read tools appear to the agent, and it can list a subreddit, search Reddit, or fetch a comment tree as native tool calls. The key lives only in the env block, never in a prompt, which keeps the credential out of the conversation. The server holds no state and forwards your key on every call, so there is nothing to persist between sessions. For the protocol mechanics behind this handshake, see how to build a Reddit MCP server, and to package the same access as a portable folder instead, the Reddit Agent Skill guide.
The Eleven Read Tools
The package exposes the Reddit read surface as 11 tools, each a thin wrapper over one REST endpoint. All are read-only; Reddit writes are a separate authenticated surface the package does not expose. This is the full catalog:
| Tool | Endpoint | What it does |
|---|---|---|
reddit_subreddit_posts |
GET /api/reddit/posts |
List a subreddit's posts by sort |
reddit_search |
GET /api/reddit/search |
Search posts across Reddit or one subreddit |
reddit_post_comments |
GET /api/reddit/comments |
A post plus its comment tree, by permalink |
reddit_search_communities |
GET /api/reddit/search/communities |
Find subreddits by name or topic |
reddit_search_comments |
GET /api/reddit/search/comments |
Search comments, not posts |
reddit_search_media |
GET /api/reddit/search/media |
Search image, video, and gif posts |
reddit_search_users |
GET /api/reddit/search/users |
Find redditors by name |
reddit_subreddit_top |
GET /api/reddit/sub/{name}/top |
Top posts of a subreddit for a window |
reddit_post |
GET /api/reddit/post/{id} |
A single post by id |
reddit_user_profile |
GET /api/reddit/user/{name} |
A user's public profile |
reddit_user_comments |
GET /api/reddit/user/{name}/comments |
A user's recent comments |
Each tool's arguments map one to one to the endpoint's query parameters, and path parameters like {name} and {id} are interpolated into the URL. Because the input schemas are Zod, the tool descriptions and enums, like the sort vocabulary and the t time window, are documented to the agent, so the model picks valid arguments. That is the practical advantage of a typed package over a raw endpoint: the agent gets guardrails on every call. For the search-specific parameters, see the Reddit search API tutorial.
Start building with Redditapis
Reads $0.002, votes $0.005, writes $0.012, DMs $0.025. $0.50 free credits.
Using the Package Programmatically
The package is not only an MCP server; it is an ES module that exports its tool catalog and query builders. If you are writing your own client, you can import TOOLS, buildQuery, and buildPath to construct correct request paths without reimplementing the parameter handling:
import { TOOLS, buildQuery, buildPath } from "redditapis-mcp/src/tools.js";
// Look up a tool's endpoint template and build a real request path.
const tool = TOOLS.find((t) => t.name === "reddit_subreddit_posts");
const args = { subreddit: "programming", sort: "top", t: "week", limit: 10 };
const { path, rest } = buildPath(tool.path, args); // interpolates {name}/{id}
const qs = buildQuery(rest); // remaining args to query string
const url = `https://api.redditapis.com${path}?${qs}`;
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.REDDITAPIS_KEY}` } });
const data = await res.json();
console.log(data.posts.map((p) => p.title));
buildPath interpolates path placeholders like {name} and {id} and returns the remaining arguments; buildQuery turns those into a query string, skipping empty values. Reusing the package's builders means your hand-written client shares the exact parameter handling the MCP server uses, so a path you build matches a path the tools build. This is the bridge between the packaged agent tools and a typed client of your own, which the TypeScript typed-client guide develops further with Zod validation.
Environment Configuration
The package reads three environment variables, so you can point it at a different base URL or tune the timeout without touching code:
export REDDITAPIS_KEY="YOUR_API_KEY" # required (REDDIT_APIS_KEY is accepted too)
export REDDITAPIS_BASE_URL="https://api.redditapis.com" # optional, this is the default
export REDDITAPIS_TIMEOUT_MS="30000" # optional per-request timeout, default 30s
The REDDITAPIS_KEY is the only required variable, and the package accepts REDDIT_APIS_KEY as an alias so a typo in the separator does not break your config. The base URL override is useful for testing against a staging endpoint, and the timeout guards against a slow upstream hanging a tool call inside an agent turn. These three variables are the entire configuration surface, which keeps the package predictable: everything else is a tool argument. For how bearer auth works underneath, see the authentication overview.
redditapis-mcp versus snoowrap
The historical JS package for Reddit is snoowrap, and the contrast explains why a new package exists. snoowrap wraps Reddit's OAuth API, which means a developer app, a client ID and secret, and a token you refresh, and it has not shipped a meaningful release in years. redditapis-mcp targets a different world: one bearer token, no developer app, typed MCP tools built for agents, and an active release line. The wrapper era is visible in how people still find snoowrap first:

Git Lotto
@gitlotto
snoowrap: A Node.js wrapper for the reddit API #JavaScript https://t.co/bXBEFYt2DB
The two packages are not solving the same problem. snoowrap is a general OAuth client for scripts; redditapis-mcp is an agent-first tool surface over a managed REST endpoint. If you are building a personal script against your own Reddit account, snoowrap still works. If you are giving an AI agent live Reddit reads, a typed package with one bearer token and no OAuth app is the shorter path. The r/webdev community's ongoing debates about which API styles survive capture exactly this generational shift:
GraphQL used to be popular, but that doesn't seem to be the case anymore...
For a full access-path comparison including Reddit's own OAuth API, see PRAW versus Redditapis REST.
The Package in the 2026 AI-Agent Era
The reason a typed npm package matters more in 2026 than it would have in 2020 is the agent. When a model chooses a tool, the tool's schema is what tells it how to call correctly, so a package whose arguments are validated with Zod and documented with clear descriptions is directly a better agent experience: fewer malformed calls, fewer retries, more reliable reads. Reddit is one of the most-cited sources in AI answer engines, which is why a Reddit tool surface is high-value to mount. redditapis-mcp packages exactly that surface.
Mounting the package rather than hand-rolling tools also means the tool definitions improve as the package does. A new release can sharpen a description or add a read endpoint, and because you launch with @latest, your agent picks it up on the next start. That maintenance-by-package model is the difference between a tool surface that compounds and a copy of tool code that quietly ages. For the broader agent context, see the Reddit API for AI agents guide.
Pinning Versions and Managing Upgrades
Running with @latest is the right default for most agents because it keeps the tool surface current, but there are cases where you want to pin a version instead. If you are shipping a product where the agent's behavior must be reproducible across deployments, pinning to an exact semver version, redditapis-mcp@0.1.2 rather than @latest, means every launch mounts the identical tool set, so a description change or a new tool cannot alter behavior between runs without a deliberate bump. The package is built on the official MCP TypeScript SDK, so its tool definitions track the protocol as it evolves. The tradeoff is that you take on the upgrade decision yourself, watching the package's changelog and moving to a new version when it adds value.
For a personal setup or a research agent where the newest tools are always welcome, @latest is simpler and keeps you current automatically. For a production agent behind a product, pin the version, test a new release against your workflows, and bump deliberately. The choice mirrors any dependency-pinning decision in software: reproducibility versus currency, and the right answer depends on whether an unexpected change is a welcome improvement or a support ticket. Because the package is small and its surface is stable, upgrades are usually low-risk, but a product-grade deployment still benefits from the control that pinning gives.
The reason this matters for an agent specifically is that the tool schema is part of the agent's behavior. When a tool's description sharpens or a new read tool appears, the model may make different choices, which is usually an improvement but is still a change. Treating the package like any other production dependency, with a version you control and a changelog you read, is what keeps an agent's behavior predictable as the package evolves. The community around npm packaging has long settled these upgrade-hygiene questions, and the same practices apply to a tool package an agent mounts.
The cheapest Reddit API. Try it free.
Reads from $0.002 per call. $0.50 free credits. No credit card required.
Observability: Knowing What the Agent Called
A tool surface an agent uses autonomously benefits from the same observability any production dependency needs. Because the package forwards your key on every call and each call is a real charge, you want visibility into what the agent actually requested: which tools it used, how often, and whether any returned errors. The package logs its readiness and tool count to stderr on launch, and the API itself is the source of truth for usage, so pairing the two gives you a picture of an agent's Reddit behavior over time.
The practical setup is a short checklist:
- Watch usage on the account side and correlate spikes with agent activity.
- Attribute spend to endpoints so a jump points at the tool that drove it.
- Alert on an unexpected increase so a runaway loop surfaces early, while it is still cheap.
If a research agent's Reddit spend jumps, the usage view tells you which endpoints drove it, and you can decide whether that is a legitimate heavy-research session or a loop that needs a guard. Because reads are $0.002 each (pricing), even a runaway loop is cheap to catch early, but observability turns "why did this cost more this week" from a mystery into a query. This is the same discipline you would apply to any metered dependency: measure usage, correlate it with behavior, and set an alert on an unexpected jump.
There is a design comfort in the package being read-only here. Because none of its 11 tools change anything on Reddit, the worst an unsupervised agent can do with it is spend read credit, which is both cheap and bounded. That safety property is what makes the package comfortable to mount in an autonomous agent: you are observing cost and usage, not guarding against destructive actions, because the tool surface has none. When a workflow does need writes, keep them on a separate, human-gated path rather than in the read package, which the Reddit Agent Skill guide covers.
Where the Package Fits Among the Access Options
By 2026 there are several ways to put Reddit in front of a JavaScript or TypeScript program, and the package is one point on that spectrum. At one end is plain fetch, which is perfect for a small script and gives you total control at the cost of writing every parameter and type yourself. In the middle is a typed client you own, interfaces plus a schema library, which is the right choice when you want a maintained internal library with your own conventions. At the packaged end is redditapis-mcp, which is the right choice when you want an installable, agent-ready tool surface with no client code to maintain at all.
The package earns its place by targeting the case the other two handle awkwardly: giving an AI agent typed, validated Reddit tools with one line of config. A raw fetch client is not a tool surface an agent can discover, and a hand-rolled typed client is a tool surface you have to build and maintain. The package is a tool surface someone else maintains, mounted with npx, which is exactly what an agent-first project wants. Choosing among the three is really choosing how much you want to own: everything, your conventions, or nothing but the config.
Most teams end up using more than one of these at different layers. A backend service might use a typed client it owns for its own reads, while its agent layer mounts the package for the model's tools, and a quick data script uses plain fetch. They all hit the same REST endpoints with the same bearer token, so moving between them is not a migration, just a different entry point. For the owned-client path, see the TypeScript typed-client tutorial; for the raw path, the Node.js and TypeScript tutorial; and for the running-server details, how to build a Reddit MCP server.
What the Package Costs to Run
The package is free and MIT-licensed; you pay only for the API calls it makes. Reads are $0.002 each, votes $0.005, comments and logins $0.012, and direct messages $0.025 (full per-call pricing), and because the package is read-only it bills at the read rate. Three concrete scenarios:
- Agent with Reddit tools (a few reads per task): a fraction of a cent per task (pricing).
- Research agent (50,000 reads a month): roughly $100 a month (pricing).
- Trial and evaluation (a few hundred reads): covered by the free starter credit (pricing).
An agent's tool usage is bursty and read-heavy, the shape usage pricing fits: $0.002 per read for exactly the calls the agent makes (pricing). Reddit's own commercial tier starts at a $12,000 per year minimum (Reddit's Data API terms), a floor that rules out the official commercial API for most agent projects, which is the gap a per-call package fills. Model your exact numbers with the cost calculator and compare access paths on the pricing page. The video below walks publishing and consuming npm packages, the mechanics underneath the tool you are mounting:
Package, Server, Protocol, and Skill: Untangling the Terms
The vocabulary around agent tooling trips people up, because a single install touches four concepts that are easy to conflate. The redditapis-mcp package is the npm artifact you install. The MCP server is the process that package runs when launched. The Model Context Protocol is the specification that server speaks to a client. And an Agent Skill is a different packaging entirely, a folder of instructions rather than a running process. Sorting these out makes the whole picture click, because each answers a different question: what you install, what runs, how it talks, and how else you could package the same access.
Start with the package and the server. The npm package is a bundle of code on the registry; the server is what that code does when you run it with npx. So "install the package" and "run the server" are two steps of one flow: npx -y redditapis-mcp@latest fetches the package and launches its server in a single command. The server holds no state, so there is nothing to provision or persist, which is why it feels more like a command than a service you stand up. When people say they are running the Reddit MCP, they mean this launched server, and the package is simply how it arrives.
The protocol is the contract between that server and your client. Model Context Protocol defines how a client discovers a server's tools and calls them, so any client that speaks it, whether a chat app, an IDE, or a custom agent runtime, can mount the Reddit tools without special-casing them. This is the value of a protocol over a bespoke integration: you write the server once, and every compliant client can use it, which is exactly why the package targets MCP rather than a single client's plugin format. The tools the server exposes are described in a way the protocol standardizes, so the model sees consistent, typed tool definitions regardless of which client mounted them.
The skill is the road not taken here, and understanding it clarifies the package by contrast. An Agent Skill packages the same Reddit access as a folder of instructions the agent reads, with no running server and no protocol handshake. A skill suits a self-contained task that travels as files; the package suits a live tool surface many clients connect to. They are complementary: a skill can even instruct an agent to use the MCP server's tools when one is mounted. Choosing between them is choosing a packaging shape, a folder of instructions versus a launched tool server, not choosing a different Reddit API, since both ultimately hit the same REST endpoints with the same bearer token.
Holding these four terms distinct pays off the first time you debug a setup. A tool that does not appear is usually a client-config problem, not a package problem; a 401 is an auth problem in the env block, not a protocol problem; and a behavior change after an upgrade is a package-version question. Knowing which layer owns a symptom turns troubleshooting from guesswork into a short checklist, and it is why the four-word vocabulary, package, server, protocol, skill, is worth keeping straight. For the skill packaging in full, see the Reddit Agent Skill guide, and for the server internals, how to build a Reddit MCP server.
Ship It
The typed JS and TypeScript way into the Reddit API is the redditapis-mcp package. Mount it in an MCP client with one npx line and a REDDITAPIS_KEY, and an agent gets 11 validated read tools with no OAuth app and no build. Import its TOOLS, buildQuery, and buildPath exports, and you get the same parameter handling in a client of your own. Either way, the package is the maintained surface a hand-rolled client is not.
The whole integration is one config entry: npx, -y redditapis-mcp@latest, and your key in the env block. The tools are read-only and Zod-validated, the configuration is three environment variables, and upgrades arrive automatically through @latest unless you deliberately pin a version for reproducibility. That is the whole appeal of the packaged path: the tool surface is something you mount and keep current rather than something you build and keep patched. Generate a key and mount the package in about two minutes: sign up for free, no card required, and your agent has typed Reddit read tools on the very next launch. For the protocol details, see how to build a Reddit MCP server; for a portable folder instead of a server, the Reddit Agent Skill guide; and for a typed client you own, the TypeScript typed-client tutorial.
Frequently asked questions.
Yes. `redditapis-mcp` is the official npm package for redditapis.com. It ships the Reddit read surface as typed Model Context Protocol tools for Claude, Cursor, and any MCP client, and you run it with `npx` with no install. Its input schemas are declared with Zod, so tool arguments are validated. See the [install section](/blogs/reddit-api-npm-sdk-2026#install-with-npx-no-global-install) and [sign up for a key](/signup).
Add one entry to your MCP client config: command `npx`, args `-y redditapis-mcp@latest`, and an `env` block with your `REDDITAPIS_KEY`. The client launches the server over stdio and the Reddit read tools appear to the agent. No global install and no build. The [config section](/blogs/reddit-api-npm-sdk-2026#configuring-your-mcp-client) has the exact JSON, and [how to build a Reddit MCP server](/blogs/how-to-build-reddit-mcp-server-2026) covers the protocol.
Yes. The package is an ES module that exports its tool catalog and query builders, so you can import `TOOLS`, `buildQuery`, and `buildPath` to construct correct request paths in your own client. That gives you the package's validated tool definitions without running the MCP server. See the [programmatic section](/blogs/reddit-api-npm-sdk-2026#using-the-package-programmatically) and the [typed TypeScript client](/blogs/reddit-api-typescript-2026).
snoowrap is an aging OAuth wrapper that has not shipped a meaningful release in years and requires a Reddit developer app. `redditapis-mcp` is current, ships typed MCP tools, authenticates with one bearer token, and needs no developer app. It targets the AI-agent use case directly rather than a raw OAuth client. See the [comparison section](/blogs/reddit-api-npm-sdk-2026#redditapis-mcp-versus-snoowrap) and the [Node.js and TypeScript tutorial](/blogs/reddit-api-nodejs-2026).
Eleven read tools: subreddit posts, search posts, a post's comment tree, community search, comment search, media search, user search, subreddit top posts, a single post, a user profile, and a user's comments. All are read-only; Reddit writes are a separate authenticated surface. See the [tools table](/blogs/reddit-api-npm-sdk-2026#the-eleven-read-tools) and the [data API overview](/blogs/reddit-data-api-2026).
The package is free and MIT-licensed; you pay only for the API calls it makes. Redditapis charges $0.002 per GET read, $0.005 per vote, $0.012 per comment or login, and $0.025 per direct message ([pricing](/pricing)). The package is read-only, so it bills at the read rate. There is no monthly minimum. Model your volume with the [cost calculator](/reddit-api-cost-calculator), and the first credit is free at [signup](/signup).
Keep reading.
Continue exploring related pages.
Reddit API documentation
The complete 2026 reference: auth, all 28 endpoints, and code.
Get a Reddit API key
Instant bearer token, no waitlist and no enterprise contract.
Reddit Responsible Builder Policy
Why Reddit denies API applications, and the managed REST bypass.
Reddit API use cases
14 use cases from AI training to brand monitoring and DMs.
Reddit Search API
Search posts, comments, users, and communities over one REST endpoint.
Reddit MCP server
Wrap the REST API as MCP tools for Claude, Cursor, and any MCP client.
Reddit API for AI agents
Live Reddit context for tool calls, MCP servers, and RAG pipelines.
Redditapis pricing
Endpoint-level costs and quick monthly totals - reads from $0.002 / call.
Reddit API cost calculator
Estimate monthly spend using your request volume.
Reddit API guides and tutorials
Tutorials, walkthroughs, and API deep-dives for developers.
Reddit API alternatives
Evaluate alternatives by cost model, limits, and integration fit.
Official Reddit API vs Redditapis
Access, setup, rate limits, and pricing, side by side.
Affiliate program
Earn 20% lifetime commissions - capped at $5,000/yr.
Reddit Vote API tutorial
Upvote and downvote a post programmatically via the REST API.
Reddit Data API: REST, no PRAW
REST endpoints for Reddit data with no PRAW and no OAuth dance.
Reddit scraping benchmarks
Real throughput, error rates, and cost benchmarks for Reddit scraping.
Reddit API answers
Direct answers on cost, access, rate limits, endpoints, and auth.
How much the Reddit API costs
Per-call pricing from $0.002 a read, with $0.50 in free credits.
Reddit API in Python
One requests call with a bearer token, no PRAW and no OAuth flow.
Reddit shadowban checker
Check if a Reddit account is shadowbanned in seconds, free and no login.
Similar reads.
More guides on the Reddit API, scraping, pricing, and MCP servers.








