# Reddit Scraper: posts, comments, subreddits, users & search (`pikoulas/reddit`) Actor

Scrape Reddit posts with every comment of a thread, subreddits by hot, new, top or rising, search results, user profiles with their posts and comments, and subreddit details: scores, upvote ratios, flairs, images, videos, links, karma. Fast, no login, no browser.

- **URL**: https://apify.com/pikoulas/reddit.md
- **Developed by:** [Spyridon Pikoulas](https://apify.com/pikoulas) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/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

## Reddit Scraper

**Retired on 2026-11-06.** Reddit's User Agreement bans scraping without its consent ([link](https://redditinc.com/policies/user-agreement)), so this Actor no longer reads the site. A run reads nothing, charges nothing and ends with this notice.

Scrape posts, comments, subreddits, users and search results from Reddit, without an account or a
browser:

- **Subreddits:** by name or URL, sorted by hot, new, top, rising or controversial (top and
  controversial by hour, day, week, month, year or all time), with each subreddit's details.
  r/all, r/popular and multireddits (python+rust) work too.
- **Posts:** any post by its URL, a comment's permalink, a share link (reddit.com/r/.../s/...) or a
  redd.it link, with every comment and reply of the thread you ask for, top, best, new,
  controversial, old or Q\&A first.
- **Search:** posts for a keyword across Reddit or in one subreddit, by relevance, hot, top, new
  or most comments, and communities or users by keyword.
- **Users:** a profile's karma and details, its posts and its comments.

Every post comes with its title, text, author, subreddit, score, upvote ratio, comment and
crosspost counts, date and edit date, flair, link and domain, images (every image of a gallery, in
order), video URLs (MP4 and HLS with sound) and duration, thumbnail, and its NSFW, spoiler, locked,
stickied and crosspost details. Every comment comes with its text, author, score, date, depth, the
comment or post it answers and the post's title and URL, so threads can be rebuilt. Subreddits come
with subscribers, description, sidebar, creation date, type, language, category, icon and banner;
users with post, comment and total karma, creation date, description, avatar and their moderator,
premium, employee and verified badges.

It is fast: 3,781 items (625 posts from six subreddits and a search, 3,050 comments from two
threads and a user, 105 communities and a user) took 21 seconds. It costs **$0.50 per 1,000 posts
or comments** and $1 per 1,000 subreddits or users.

### What people use it for

- **Market and product research:** what people say about a product, a brand or a competitor,
  with the full comment threads.
- **Sentiment analysis and datasets for AI:** posts and comments at scale, with their scores and
  who wrote them.
- **Monitoring:** new posts in a list of subreddits or for a keyword since a date, day by day.
- **Community research:** the subreddits about a topic, their size and what does well in them.
- **Lead generation:** the users asking for what you offer.

### How to scrape Reddit

1. Click **Try for free**; Apify's free plan covers a first run.
2. Enter **Subreddits**, **Search terms**, **Users** or **Start URLs** (posts, subreddits, users, searches), and how many posts you want.
3. Click **Start**, then download the results as JSON, CSV, Excel or HTML, or read them through
   the API.

An input with more options:

```json
{
  "startUrls": [
    {"url": "https://www.reddit.com/r/AskReddit/comments/1wojhni/which_hobby_has_ended_more_relationships_than/"},
    {"url": "https://www.reddit.com/r/space/top/?t=month"}
  ],
  "subreddits": ["python", "dataisbeautiful"],
  "subredditSort": "hot",
  "searchTerms": ["sourdough starter"],
  "searchSort": "top",
  "time": "year",
  "users": ["spez"],
  "maxPostsPerSource": 100,
  "includeComments": false,
  "maxCommentsPerPost": 500,
  "commentsSort": "top",
  "maxCommentsPerUser": 50,
  "postedAfter": "2026-01-01"
}
```

A Reddit URL works in any of the lists: a subreddit URL keeps its own sort and time, a search URL
its sort, time and type. Posts given by URL always come with their comments, up to
`maxCommentsPerPost`; turn on `includeComments` to get the comments of every post the subreddits,
searches and users list too. Set `maxPostsPerSource` to 0 for the subreddits' and users' details
only, or turn off `includeDetails` for their posts only. `searchFor` switches search from posts to
communities or users.

### Output

A post:

```json
{
  "type": "post",
  "id": "1u2der0",
  "url": "https://www.reddit.com/r/SourdoughStarter/comments/1u2der0/i_was_gifted_an_extremely_old_sourdough_starter/",
  "title": "I was gifted an extremely old sourdough starter and I'm terrified to ruin it, but if I do nothing it's gonna die.",
  "text": "I was helping an elderly friend clean out his home, and came across a sourdough starter with a note that said \"Do not throw out! ...",
  "author": "lucivicron",
  "authorId": "ytb7s52",
  "authorFlair": null,
  "subreddit": "SourdoughStarter",
  "subredditId": "2inci7",
  "subredditSubscribers": 89505,
  "score": 2860,
  "upvoteRatio": 0.99,
  "numComments": 303,
  "numCrossposts": 1,
  "createdAt": "2026-06-10T20:09:35Z",
  "editedAt": "2026-06-26T20:50:38Z",
  "flair": null,
  "link": "https://www.reddit.com/gallery/1u2der0",
  "domain": "reddit.com",
  "imageUrls": [
    "https://preview.redd.it/59n7ph7oii6h1.jpg?width=4000&format=pjpg&auto=webp&s=...",
    "https://preview.redd.it/ybyckbdoii6h1.jpg?width=3000&format=pjpg&auto=webp&s=...",
    "https://preview.redd.it/im0kwfgoii6h1.jpg?width=4000&format=pjpg&auto=webp&s=..."
  ],
  "videoUrl": null,
  "videoHlsUrl": null,
  "videoDurationSeconds": null,
  "thumbnailUrl": "https://preview.redd.it/59n7ph7oii6h1.jpg?width=140&height=105&auto=webp&s=...",
  "isSelf": false,
  "isVideo": false,
  "isGallery": true,
  "over18": false,
  "spoiler": false,
  "locked": false,
  "stickied": false,
  "archived": false,
  "distinguished": null,
  "removedBy": null,
  "crosspostParentId": null,
  "crosspostParentUrl": null,
  "input": "sourdough starter"
}
```

A comment:

```json
{
  "type": "comment",
  "id": "pbngksk",
  "url": "https://www.reddit.com/r/Python/comments/1woh8y4/whats_new_in_python_315/pbngksk/",
  "text": "For command line programs with heavy dependencies, having to wait several seconds just to get an argparse error ... lazy imports solves the issue nicely.",
  "author": "jdehesa",
  "authorId": "xsxqzm9",
  "authorFlair": null,
  "score": 54,
  "createdAt": "2026-09-23T21:44:30Z",
  "editedAt": null,
  "postId": "1woh8y4",
  "postTitle": "What's new in Python 3.15?",
  "postUrl": "https://www.reddit.com/r/Python/comments/1woh8y4/whats_new_in_python_315/",
  "parentId": "pbnabl6",
  "isTopLevel": false,
  "depth": 1,
  "subreddit": "Python",
  "isSubmitter": false,
  "stickied": false,
  "distinguished": null,
  "controversial": false,
  "input": "https://www.reddit.com/r/Python/comments/1woh8y4/whats_new_in_python_315/"
}
```

A subreddit (`"type": "community"`, the sidebar shortened):

```json
{
  "type": "community",
  "id": "2qh0y",
  "name": "Python",
  "url": "https://www.reddit.com/r/Python/",
  "title": "Python",
  "description": "The largest Python community for Reddit! Stay up to date with the latest news, packages, and meta information relating to the Python programming language. ...",
  "sidebar": "####[The Python Discord](https://discord.gg/python) ...",
  "subscribers": 1514452,
  "createdAt": "2008-01-25T03:14:39Z",
  "over18": false,
  "communityType": "public",
  "submissionType": "self",
  "language": "en",
  "category": "Technology",
  "iconUrl": "https://styles.redditmedia.com/t5_2qh0y/styles/communityIcon_lctik80p96tg1.png?width=256&s=...",
  "bannerUrl": "https://styles.redditmedia.com/t5_2qh0y/styles/bannerBackgroundImage_cd73kiu1502d1.png?width=4000&s=...",
  "input": "python"
}
```

A user:

```json
{
  "type": "user",
  "id": "1w72",
  "username": "spez",
  "url": "https://www.reddit.com/user/spez/",
  "displayName": "spez",
  "description": "Reddit CEO",
  "createdAt": "2005-06-06T04:00:00Z",
  "postKarma": 184487,
  "commentKarma": 756493,
  "totalKarma": 940980,
  "isSuspended": false,
  "isEmployee": true,
  "isMod": true,
  "isPremium": true,
  "verified": true,
  "hasVerifiedEmail": true,
  "over18": false,
  "iconUrl": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png?width=256&height=256&crop=256:256,smart&s=...",
  "bannerUrl": "https://b.thumbs.redditmedia.com/KWeEpVxXOGLoloMbM0IxGt9EiKPXizpwFgcSeWqtpZM.png",
  "input": "spez"
}
```

`parentId` is the post's ID for a top-level comment (`isTopLevel`) and the parent comment's ID
otherwise. Comments come in reading order, each thread under its comment, then the ones Reddit
folds away ("load more comments"), which the run fetches too. A user's comments carry the title and
URL of the post they answer.

### Use it as an API

One call runs it and returns the results as JSON (for runs under 5 minutes; longer ones start a
run and read its dataset). Apify's Python and JavaScript clients, and its Make, Zapier and n8n
integrations, work the same way.

```bash
curl -X POST "https://api.apify.com/v2/acts/pikoulas~reddit/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"subreddits": ["python"], "maxPostsPerSource": 5, "startUrls": [{"url": "https://www.reddit.com/r/AskReddit/comments/1wojhni/which_hobby_has_ended_more_relationships_than/"}], "maxCommentsPerPost": 20, "searchTerms": ["sourdough starter"], "users": ["spez"], "maxCommentsPerUser": 3}'
```

AI agents can call it as a tool through Apify's MCP server: `https://mcp.apify.com?tools=pikoulas/reddit`.

### How much does it cost to scrape Reddit?

You pay **$0.0005 per post or comment**, which is $0.50 per 1,000, and **$0.001 per subreddit or
user**. Runs that go through Apify's residential proxy also pay its traffic, $0.0012 per 100 KB,
and fetch about half a kilobyte per post or comment: a few cents per 10,000 items. There are no
monthly fees.

### Good to know

- Reddit lists up to about 1,000 posts per subreddit sort, search or user; for more from a
  subreddit, combine sorts (new, top by week, month, year and all time).
- Reddit answers 100 requests per 10 minutes from an IP. A request gives 100 posts, up to 500
  comments of a thread or 100 more of its folded ones, so a run needs one per post whose comments it
  takes. Past that, the run takes a new IP from Apify's residential proxy by itself and carries on;
  with no proxy to take one from, it waits for the next 10 minutes.
- A search for communities or users gives at most about a hundred of them.
- Reddit's video files (`videoUrl`) have no sound; `videoHlsUrl` is the stream with sound.
- A post or comment found under several sources is given once per run.
- Private, banned and quarantined subreddits, and deleted or suspended users' posts, can't be
  scraped, and the log names them. Deleted comments come with `[deleted]` as author and text.

### FAQ

#### Is it legal to scrape Reddit?

It collects only what Reddit shows publicly, without logging in. Personal data is protected by laws such as the GDPR and the CCPA. If you're unsure, ask a lawyer;
Apify's [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/) is a good start.

#### Something missing or not working?

Open an issue on the **Issues** tab with the input you used, or ask there for a field you need.

# Actor input Schema

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

Reddit URLs of posts (with their comments), comment permalinks, share links (reddit.com/r/.../s/...), redd.it links, subreddits (keeping a /top/?t=week or /new sort), users (/user/name, /submitted or /comments) and searches (reddit.com/search?q=..., r/name/search?q=...).

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

Subreddit names (python, r/python) or URLs. Gives each one's details and its posts, sorted as set below. r/all, r/popular and multireddits (python+rust) work too.

## `subredditSort` (type: `string`):

The order of a subreddit's posts. Top and controversial take the time below.

## `searchTerms` (type: `array`):

Keywords searched on Reddit, for posts, communities or users as set below.

## `searchFor` (type: `string`):

Posts, communities (subreddits) or users. Reddit gives up to about a hundred communities or users per search.

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

The order of a search's posts.

## `searchSubreddit` (type: `string`):

Search posts in this subreddit only (python). Empty for all of Reddit.

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

The period of a search and of a subreddit's top or controversial posts. Empty for Reddit's own: all time for search, today for a subreddit.

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

Usernames (spez, u/spez) or profile URLs. Gives each profile's details, its posts, newest first, and its comments if set below.

## `maxPostsPerSource` (type: `integer`):

Posts from each subreddit, search or user (communities or users for a search of those). Reddit lists up to about 1,000 per source. 0 for details only.

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

Comments of every post the subreddits, searches and users list, up to the maximum below. Posts given by URL always come with theirs.

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

Comments and replies of each post, in the order set below, as deep as Reddit goes. 0 for none.

## `commentsSort` (type: `string`):

The order comments are taken in.

## `maxCommentsPerUser` (type: `integer`):

Each user's own comments, newest first, with the post each answers. 0 for none (a user's /comments URL then takes max posts per source of them).

## `includeDetails` (type: `boolean`):

One item per subreddit (subscribers, description, creation date, icon) and per user (karma, creation date, badges).

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

Posts, communities and users marked over 18.

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

Only posts and comments from this date on (YYYY-MM-DD). Newest-first listings stop once they get past it; posts given by URL are taken whatever their date.

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

Not needed for most runs. Reddit allows 100 requests per 10 minutes from an IP (a request gives 100 posts or up to 500 comments): past that, and when Reddit refuses the run's IP, the run takes a new IP from Apify's residential proxy by itself.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/AskReddit/comments/1wojhni/which_hobby_has_ended_more_relationships_than/"
    }
  ],
  "subreddits": [
    "python"
  ],
  "subredditSort": "hot",
  "searchFor": "posts",
  "searchSort": "relevance",
  "maxPostsPerSource": 25,
  "includeComments": false,
  "maxCommentsPerPost": 100,
  "commentsSort": "top",
  "maxCommentsPerUser": 0,
  "includeDetails": true,
  "includeNSFW": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

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

No description

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

No description

## `users` (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/AskReddit/comments/1wojhni/which_hobby_has_ended_more_relationships_than/"
        }
    ],
    "subreddits": [
        "python"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pikoulas/reddit").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/AskReddit/comments/1wojhni/which_hobby_has_ended_more_relationships_than/" }],
    "subreddits": ["python"],
}

# Run the Actor and wait for it to finish
run = client.actor("pikoulas/reddit").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/AskReddit/comments/1wojhni/which_hobby_has_ended_more_relationships_than/"
    }
  ],
  "subreddits": [
    "python"
  ]
}' |
apify call pikoulas/reddit --silent --output-dataset

```

## MCP server setup

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

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/8xP8nM1jBxAEDbzjr/builds/4PevdaJF8jYMlWeqT/openapi.json
