How to Use the Reddit API in Your Own Agent
Pull a small Reddit feed into your agent, preserve post timestamps and comment counts, and add community context to a reusable table.

Give your agent a small Reddit feed with fields it can reuse. Paste this into your agent:
Set up https://monid.ai/SKILL.md, and then use Monid to collect two recent r/Python posts and the community information. Inspect prices first. Keep post dates, vote counts and comment counts separate. Return a table without usernames or personal details.
1 min setup target · hrs saved depend on your workflow.
As a developer using the Reddit API, you need more than a copied discussion. Even a two-post sample needs consistent dates, counts and community labels before an agent can compare the records.
Pasting page text into a prompt leaves you rebuilding that structure each time. A comment count also looks useful until the next step expects actual comment text and receives a number instead.
We'll use Monid, the OpenRouter for agent tools, to produce a small post table and a separate community record. The route is choose the input, collect a bounded sample, then preserve the fields your agent needs.
Here is the finished sample from November 14, 2026. Row labels replace post identifiers and personal details.
| Sample row | Community | Votes | Comment count | Record type |
|---|---|---|---|---|
| A | r/Python | 0 | 7 | post |
| B | r/Python | 4 | 8 | post |
How to use the Reddit API with Monid
Start by discovering a Reddit data tool, inspecting its input, and requesting only the records your agent needs. Monid supplies the tool access; your application supplies the storage, selection rules and final answer.
This guide uses an endpoint, meaning a named callable tool with a defined input. The selected Apify Reddit data tool, /practicaltools/apify-reddit-api, returned structured posts from one subreddit URL. It is a provider tool accessed through the shared tool layer, not instructions for configuring Reddit's own API. For a broader posts-and-comments choice, read the Reddit collection route guide.
For agents
Get a key at app.monid.ai, then hand it to your agent with this instruction. The agent quickstart explains the setup.
set up https://monid.ai/SKILL.md
For humans
Install the CLI and save your key using the required setup commands. The CLI quickstart covers configuration.
npm install -g @monid-ai/cli
monid keys add -k <your-api-key> -l main
Step 1. Find and inspect the data source
Search the Reddit tools, then inspect the selected tool before spending anything; both commands are free. Read the billing shape alongside the schema because the maximum result count determines this sample's budget.
monid discover -q "reddit api" -l 5 -j --include-unavailable
monid inspect -p apify -e /practicaltools/apify-reddit-api -j
The 3 ways to give your agent Reddit data
Choose the route around the input and output your application already has. Keeping an existing structured feed is sensible; adopting another transport does not improve a record by itself.
| Route | Billing approach | Best fit | Limitation |
|---|---|---|---|
| Monid tool call | Returned records or calls, depending on tool | Agent choosing tools through one key and balance | Each tool has its own schema |
| Existing structured export | Existing arrangement | Pipeline that already receives the needed fields | You maintain its adapter |
| Manual selection | Your time | Reading a small, known discussion | Repeated copying and field cleanup |
Keep an existing feed when it already fits
If you already receive post identifiers, timestamps and counts, transform those records directly. Write down the expected fields before replacing the source. A source change also creates a comparison problem: a different sort or collection time produces a different sample.
Different Reddit scrapers return different posts when their feed sorting and search scope differ. Save the input alongside the output so tomorrow's collector knows which question today's table answered.
Select a small discussion manually
For one known thread, read it and select the relevant passages yourself. Automation earns its place when the same collection needs repeating or another process needs the fields. Manual reading also lets you decide whether a discussion actually answers the question before building a recurring workflow around it.
Use a shared tool call for a repeatable input
Monid fits the case where your agent needs a named tool and structured output on demand. You still choose whether the next action is summarization, indexing or a human review queue. The tool does not decide that a popular post is relevant to your business.
The rest of this guide uses a feed URL rather than a keyword search. That choice makes the collection boundary explicit: one community, one sort and two requested records.
How to collect two posts and community context
Collect posts first and community metadata second so the two record types stay separate. The Monid calls below returned two post records and one community object in our small test.
Step 2. Request a bounded feed
Set a small limit when testing: maxItems: 2 bounds this single feed job, while sort: "new" requests recent ordering and time: "week" sets the window. The skip flags keep community enrichment and comment collection out of this first request.
monid run -p apify -e /practicaltools/apify-reddit-api -w \
-i '{"startUrls":[{"url":"https://www.reddit.com/r/python/"}],"sort":"new","time":"week","maxItems":2,"skipCommunity":true,"skipComments":true,"fetchPostComments":false,"searchPosts":true}'

The request completed with HTTP 200 in 3.856 seconds, measured from creation to completion. Both requested rows arrived; neither was missing. This is a timing observation for one call, not a latency guarantee.
Step 3. Add the community record
Inspect the TikHub community lookup, /api/v1/reddit/app/fetch_subreddit_info, then pass the bare community name through query parameters. TikHub supplies this second tool; need_format: true requests its formatted response.
monid inspect -p tikhub -e /api/v1/reddit/app/fetch_subreddit_info -j
monid run -p tikhub -e /api/v1/reddit/app/fetch_subreddit_info \
--query '{"subreddit_name":"Python","need_format":true}' -w -j

The response completed with HTTP 200 in 1.849 seconds. Its subredditInfoByName object contained the following community context, measured on November 14, 2026.
| Returned field | Value | How to label it |
|---|---|---|
| subscribersCount | 1,522,654 | Subscribers |
| activeCount | 0 | Returned activeCount |
| communityStats.weeklyActiveUsersCount | 92,979 | Weekly active users |
| communityStats.weeklyContributionsCount | 762 | Weekly contributions |
Do not turn the zero activeCount into a statement that nobody uses the community. The response has a separate weekly activity field with a separate value. For more community-focused work, use the guide to subreddit stats and rules.
Step 4. Keep the receipt with the output
Keep each run identifier with its input and collection date so a downstream job can retrieve the same response. This command retrieves our completed feed call without collecting another sample.
monid runs get -r 01M7DCQ99DR2X96S2NY5340JCG -j
A later fresh request answers a later question. Treat retrieval of a saved response and collection of new posts as different operations in your application.
How do you turn the response into an agent table?
Project the returned fields into a stable table before asking an agent to interpret them. Monid returned the source records; the following labeling and storage decisions belong to your application.
Preserve creation and collection dates
Keep createdAt and scrapedAt as different columns. The first describes the post's creation time; the second records collection time in this response. Replacing both with a generic date field loses the distinction your monitoring job needs.
| Sample row | createdAt in UTC | scrapedAt in UTC | numberOfComments | upVotes |
|---|---|---|---|---|
| A | 2026-11-14T14:18:25.000Z | 2026-11-14T16:02:23.951Z | 7 | 0 |
| B | 2026-11-14T12:22:27.000Z | 2026-11-14T16:02:23.951Z | 8 | 4 |
Both records also returned communityName and dataType. Store those labels with the counts, so a join cannot silently mix a community object with a post row. For this published table, sample labels replace identifiers and usernames.
Separate counts from evidence
The two records have 15 comments in their combined numberOfComments values. That arithmetic does not mean the collector returned 15 comment bodies. This request deliberately disabled comment enrichment, so the agent must not summarize a discussion from its count.
Editorial recommendation: ask for a summary of the post body only, then label any need for discussion text as another collection task. If your actual job needs posts and comments together, collect discussion text before asking for a discussion summary.
Keep selection outside the source fields
Add your own relevance or review labels in separate columns. Do not overwrite upVotes with a model's enthusiasm score or rename numberOfComments to engagement without defining the change. A stable source table lets another reviewer distinguish what came back from what your agent inferred.
For a monitoring job, retain an internal identifier for deduplication and keep collection receipts alongside snapshots. Export only the columns needed by the next consumer. A reporting table rarely needs the entire raw response or a contributor's profile details.
The business conclusion from this sample is narrow: you have two recent posts to triage, plus a community activity snapshot. You do not have a representative survey, a sentiment distribution or the full week's discussions. Build a review queue from this sample rather than declaring a community trend.
How much does a small collection cost?
The feed tool bills per returned result, while the community lookup bills per call. Use the current Monid tool catalog to inspect the tool before expanding a collection.
The tested Apify feed tool lists $0.002 per result, Verified 2026-11-14. Two returned records produced two billed units. Its observed call total was $0.002 multiplied by two, Verified 2026-11-14.
The TikHub community tool lists $0.001 per call, Verified 2026-11-14. Its successful lookup billed one unit. Together, the sample cost two feed units plus one lookup unit; the run receipts record the totals.

Budget for inputs as well as limits
maxItems applies per job in the inspected feed schema. Each search query, subreddit or URL creates a separate job, so adding inputs changes the output ceiling. Keep a single input while testing, and calculate the intended total before expanding a list.
A successful call with two records establishes its own billing behavior. It does not establish what happens on an empty response or failure. For a recurring collector, record status, billed units and cost separately rather than assuming every request has the same charge.
Which tool should you choose for each job?
Choose the Monid tool around the record type your next step consumes. These are the two tools actually used in this guide, with prices Verified 2026-11-14.
| Use case | Best endpoint | Why? |
|---|---|---|
| Small subreddit feed | Apify Reddit data tool | Returned two structured post records; per result, Verified 2026-11-14 $0.002 |
| Community context | TikHub community lookup | Returned a separate community object; per call, Verified 2026-11-14 $0.001 |
Keep the provider and path in your application configuration, and keep a separate mapping for each response shape. The feed is an array of posts; the community response wraps its data in subredditInfoByName. Treating both as interchangeable JSON leaves the integration work unfinished.
When should you use something else?
Use another route when your task is already served by an existing feed or requires a capability outside these two calls. You are reading the Monid blog, and we resell provider tools; that does not make this route the right choice for every Reddit job.
Use Apify directly when you want to manage the provider workflow there. Keep your existing integration when its records already satisfy your application. Read a thread manually when the task is a single judgment about a known conversation.
These calls cover collection of post records and community context. They do not publish replies, moderate a community or schedule your application. They also leave persistence, deduplication and interpretation to you. Choose the route that ends with the record your next step actually requires.
Conclusion
You now have a repeatable two-post request, a community lookup and a table that preserves timestamps and count meanings. Discover and inspect through Monid before the next small collection, then save its receipt with the data. The opening's one-minute setup is a target, not a measured onboarding result; no numeric hours-saved estimate is promised because the existing workflow determines that saving. Your agent gets a clear boundary between source evidence and its own interpretation.
FAQ
Is this Reddit API workflow free?
Discovery and inspection are free; collection calls are paid.
Do I need Reddit API keys?
These calls use your Monid key.
What do I install?
Use the CLI or setup prompt.
How many posts per job?
The schema accepts maxItems from 1 to 100.
Are failures charged?
These receipts cover successful calls only.
Can I schedule collection?
Your scheduler invokes the collector; these calls retrieve data.
Is collecting Reddit data legal?
Rules vary by location; check those applying to your use.
Published November 2026.


