# Reddit API: Posts, Comments, Users & Subreddits (`deepmine/reddit-api`) Actor

A Reddit API with no keys or OAuth: send any Reddit URL, search, subreddit or username and get clean JSON posts, comments, users and communities. No login, no browser, no rate-limit setup. Call it from code, Make, n8n or an AI agent; first results in seconds, you pay per result.

- **URL**: https://apify.com/deepmine/reddit-api.md
- **Developed by:** [DeepMine](https://apify.com/deepmine) (community)
- **Categories:** Social media, Lead generation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.49 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Reddit API do?

Reddit API gives you Reddit data as clean JSON without API keys, OAuth apps or rate-limit code: send any Reddit URL, search term, subreddit or username and get posts, comments (whole threads with replies), user profiles and communities back. Call it from your code, Make, Zapier, n8n or an AI agent (MCP), or press Start in the Console. No login, no browser, no cookies.

These are real rows from the prefilled call (r/programming, top of the week, 20 posts with 4 comments each):

| Post | Subreddit | Score | Comments | Posted |
|---|---|---:|---:|---|
| [\<input type="password" maxlength="20"> is considered harmful, and w...](https://www.reddit.com/r/programming/comments/1ww842a/input_typepassword_maxlength20_is_considered/) | r/programming | 1031 | 293 | 2026-10-02 |
| [There is no "now" in distributed systems](https://www.reddit.com/r/programming/comments/1wyumm6/there_is_no_now_in_distributed_systems/) | r/programming | 260 | 53 | 2026-10-06 |
| [StackOverflow Developer Survey Results 2026](https://www.reddit.com/r/programming/comments/1wz64oa/stackoverflow_developer_survey_results_2026/) | r/programming | 89 | 41 | 2026-10-06 |
| [Skip List Data structure](https://www.reddit.com/r/programming/comments/1wwfp40/skip_list_data_structure/) | r/programming | 139 | 31 | 2026-10-03 |
| [New Python releases are out, 3.10.x reaches EOL, (and 3.15.0 is sch...](https://www.reddit.com/r/programming/comments/1wv4hph/new_python_releases_are_out_310x_reaches_eol_and/) | r/programming | 122 | 23 | 2026-10-01 |

<sub>$1.69 per 1,000 results on Starter ($1.79 Free, $1.59 Scale, $1.49 Business). The prefilled call (91 results: 20 posts, 71 comments) costs about $0.15. No start fee. Collected 2026-10-06.</sub>

### How to call it

One HTTP request runs it and returns the rows (replace `<YOUR_APIFY_TOKEN>`; the token is in Apify Console > Settings > API & Integrations):

```bash
curl -X POST "https://api.apify.com/v2/acts/deepmine~reddit-api/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": [{"url": "https://www.reddit.com/r/programming/top/?t=week"}], "maxItemsPerSource": 20}'
```

From Python, with `pip install apify-client`:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("deepmine/reddit-api").call(run_input={
    "searches": ["best crm for startups"],
    "searchSort": "new",
    "includeComments": True,
    "maxCommentsPerPost": 50,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["dataType"], row.get("title") or row.get("body"))
```

The synchronous endpoint waits up to 5 minutes; for bigger jobs, start a run and read its dataset when it finishes (or get a webhook). An empty input reads the example above (r/programming, top of the week, posts only).

### What can you get from it?

| You send | You get |
|---|---|
| A subreddit (name or link, any sort and period) | Its posts, optionally each with its comment thread |
| A post link | The post and its comments, replies included, with `depth`, `parentId`, `rootCommentId` |
| Search terms | Posts, comments, communities or users that match (**Search for**) |
| A username or profile link | Profile (karma, account age, verification), posts and comments |
| Any reddit.com link | Whatever that page lists: front page, search, user, post |

Filters: posted after or before a date (or "7 days"), minimum score, NSFW on or off. Filtered-out rows are free.

### Why use it instead of Reddit's own API?

- **No developer account or OAuth app**: one Apify token, the same for every Actor.
- **No rate-limit code**: the run spreads calls over Apify's proxy IPs, retries failures from a new IP and waits out Reddit's limit when it must.
- **Whole threads in one call**: it opens Reddit's "more replies" links for you, up to your per-post cap.
- **Typed rows, ready for tables**: camelCase fields, ISO dates, `dataType` on every row, a dataset schema with titles and descriptions, and per-type tables in the Console. Everything you scan or filter on is its own column (image and gallery URLs, media type, crosspost parent link, flair text); Reddit's raw media, preview, crosspost and flair objects come along as nested JSON for code that wants them, and the tables leave them out.

### How much does it cost?

You pay per result in your dataset: a post, a comment, a user or a community, all at the same price.

| Apify plan | Price per 1,000 results |
|---|---:|
| Free | $1.79 |
| Starter | $1.69 |
| Scale | $1.59 |
| Business | $1.49 |

Each row is charged once per run, even when several of your inputs find it. There's no start fee and no monthly fee; the run stops at your spending limit (`maxTotalChargeUsd` on API calls).

### Input

All fields are optional; the input form shows each one with its description. The ones most calls use:

- `startUrls`: Reddit links, as `[{"url": "..."}]`.
- `searches`, `searchType` (`posts`, `comments`, `communities`, `users`), `searchSort`, `searchTime`, `withinSubreddit`, `maximizeCoverage`.
- `subreddits`, `sort`, `time`; `users`, `userContent` (`profile`, `posts`, `comments`).
- `maxItemsPerSource` (100 by default), `maxResults` (a total cap), `includeComments`, `maxCommentsPerPost`, `commentDepth`, `commentSort`.
- `postedAfter`, `postedBefore` (a date or "7 days"), `minScore`, `includeNSFW`.

### Output

Every row has `dataType` (`post`, `comment`, `user` or `community`), `input` (which of your inputs found it) and `scrapedAt`. A post row from the prefilled call (shortened):

```json
{
  "dataType": "post",
  "id": "t3_1ww842a",
  "url": "https://www.reddit.com/r/programming/comments/1ww842a/input_typepassword_maxlength20_is_considered/",
  "title": "<input type=\"password\" maxlength=\"20\"> is considered harmful, and why I couldn't login into Vanguard",
  "communityName": "r/programming",
  "upVotes": 1031,
  "upvoteRatio": 0.94,
  "commentsCount": 293,
  "createdAt": "2026-10-02T23:14:57Z",
  "postType": "link",
  "domain": "tanin.nanakorn.com",
  "input": "https://www.reddit.com/r/programming/top/?t=week"
}
```

Posts have 101 fields, comments 61, users 37 and communities 53; the dataset schema on the Actor's Output tab lists each one with a description. Run totals, per-input counts and anything not found are in the run's key-value store under `OUTPUT`.

### Is it legal to use?

The Actor reads only public Reddit content that anyone can open without an account. It never logs in and skips private and quarantined communities. It is not Reddit's official API and isn't affiliated with Reddit. If your results include personal data, you're responsible for handling it lawfully (for example under GDPR).

### FAQ

**How fast is it?** The prefilled call (about 90 rows) takes about 8 seconds on Apify, about 4 of them reading Reddit, and the first row lands about 2 seconds after the start (256 MB, datacenter proxy, October 6, 2026). Rows are written page by page, so you can read the dataset while a big run is still going.

**How much can one call return?** Reddit lists about 1,000 posts per subreddit sort and about 250 per search sort (`maximizeCoverage` reads more sorts and merges them). Comments: up to 100,000 per post.

**Does my Apify plan matter?** Only for very large runs. Reddit allows 100 requests per IP every 10 minutes and the run uses your plan's datacenter proxy IPs (5 on Free, more on paid plans). If they are all used up, the run waits for Reddit's window to reset and says so in its status.

### Feedback

Need a field or an endpoint? Open an issue on the Actor's Issues tab; we read every one. If it saved you time, a short review on the Store page helps others find it.

# Actor input Schema

## `startUrls` (type: `array`):

Any Reddit link, one per row: a subreddit (r/Python, r/Python/top/?t=week), a post, a user (u/spez), a search (reddit.com/search/?q=...) or the front page. Leave empty if you use Search terms or the sections below.

## `searches` (type: `array`):

Words to search all of Reddit for, one per line, e.g. best crm for startups. 'Search for' picks posts, comments, communities or users.

## `searchType` (type: `string`):

What the search terms look for. Comments finds comments that use your words anywhere on Reddit (Search sort: relevance, new or top; Search period and Search only in this subreddit apply), each with its post and community.

## `includeComments` (type: `boolean`):

Add each post's comments, replies included, right after the post. Each comment is one result.

## `maxCommentsPerPost` (type: `integer`):

Most comments to read per post, replies included, in Reddit's thread order (e.g. 4 for a quick look, 500 for whole threads).

## `maxItemsPerSource` (type: `integer`):

Most posts (or communities or users) per URL, search term, subreddit or user. Reddit lists about 1,000 posts per subreddit sort and about 250 per search sort; 'Maximize coverage' gets more from a search.

## `maxResults` (type: `integer`):

Most rows for the whole run: every source, post, comment, user and community counted together. Empty = no total cap (Max posts per source and your spending limit still apply).

## `subreddits` (type: `array`):

Subreddit names (Python or r/Python), one per line. Their posts are read in the order set by 'Subreddit sort'.

## `sort` (type: `string`):

Order of subreddit posts, as on Reddit.

## `time` (type: `string`):

Period for the Top and Controversial sorts.

## `users` (type: `array`):

Reddit usernames (spez or u/spez), one per line.

## `userContent` (type: `array`):

The profile (karma, account age, verification), the user's posts, the user's comments, or any mix.

## `searchSort` (type: `string`):

Order of search results.

## `searchTime` (type: `string`):

How far back a search looks. Comments older than this are skipped (Reddit's comment search has no period of its own, so it is applied here; skipped comments are free).

## `withinSubreddit` (type: `string`):

Optional subreddit name (e.g. CRM) to limit search terms to. With Comments, other communities' comments are skipped (free).

## `maximizeCoverage` (type: `boolean`):

Reddit stops a search at about 250 posts per sort. On: each search is also read in other sorts and periods (new, top by year, month, week...) and merged without duplicates.

## `postedAfter` (type: `string`):

Only posts and comments from after this date: 2026-09-01, 2026-09-01T12:00:00Z, or a period like '7 days' or '12 hours'.

## `postedBefore` (type: `string`):

Only posts and comments from before this date (same formats).

## `minScore` (type: `integer`):

Skip posts with a lower score (upvotes minus downvotes), e.g. 10. Empty = no minimum.

## `includeNSFW` (type: `boolean`):

Keep posts and communities marked 18+.

## `commentDepth` (type: `integer`):

How deep in reply chains to go: 1 = top-level comments only, 10 = Reddit's maximum.

## `commentSort` (type: `string`):

Order of comments, as on Reddit.

## `includeCommunityRules` (type: `boolean`):

For community search results, also read each community's rules (one extra Reddit call per community; free).

## `proxyConfiguration` (type: `object`):

Leave as is: Reddit answers Apify's datacenter proxy, the cheapest option. If you pick Residential, the run still reads through datacenter and uses your residential IPs only to retry a call Reddit refuses there.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/programming/top/?t=week"
    }
  ],
  "searchType": "posts",
  "includeComments": true,
  "maxCommentsPerPost": 4,
  "maxItemsPerSource": 20,
  "sort": "hot",
  "time": "day",
  "userContent": [
    "profile",
    "posts",
    "comments"
  ],
  "searchSort": "relevance",
  "searchTime": "all",
  "maximizeCoverage": false,
  "includeNSFW": true,
  "commentDepth": 10,
  "commentSort": "confidence",
  "includeCommunityRules": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `posts` (type: `string`):

No description

## `comments` (type: `string`):

No description

## `users` (type: `string`):

No description

## `communities` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.reddit.com/r/programming/top/?t=week"
        }
    ],
    "includeComments": true,
    "maxCommentsPerPost": 4,
    "maxItemsPerSource": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/reddit-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://www.reddit.com/r/programming/top/?t=week" }],
    "includeComments": True,
    "maxCommentsPerPost": 4,
    "maxItemsPerSource": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("deepmine/reddit-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/programming/top/?t=week"
    }
  ],
  "includeComments": true,
  "maxCommentsPerPost": 4,
  "maxItemsPerSource": 20
}' |
apify call deepmine/reddit-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deepmine/reddit-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/CfiwPVRTwzEafJEYq/builds/ezZLzvNahUPfidcOX/openapi.json
