# Reddit Trends Scraper (`khadinakbar/reddit-trends-scraper`) Actor

Find trending Reddit posts in the subreddits you choose, ranked by a momentum trend score. Each row has title, author, link, score, comments, upvote ratio, post age, flair and NSFW flag.

- **URL**: https://apify.com/khadinakbar/reddit-trends-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, MCP servers, Automation
- **Features:** Limited permissions
- **Stats:** 15 total users, 6 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 reddit post scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 is Reddit Trends Scraper?

Reddit Trends Scraper returns the posts that are trending in the subreddits you choose, one dataset row per post, ranked by a `trendScore`. Each row has the title, author, link, score, comment count, upvote ratio, age in hours, flair and NSFW flag. You pick the subreddits, the feed (`hot`, `rising`, `top`, `new` or `controversial`) and the time window. Marketers, founders, researchers and AI agents use it to spot rising topics and early conversations, with no Reddit account or API key.

### Why teams use it for trend spotting

- **Ranked for momentum.** `trendScore` combines score, comments and post age, so fresh, fast-moving posts rise to the top.
- **Your communities.** Watch the subreddits that matter to your market, from `startups` to `skincareaddiction`.
- **Every Reddit feed.** `hot`, `rising`, `top`, `new` and `controversial`, with `timeRange` for top and controversial.
- **Quality filters.** `minScore` drops low-signal posts and `includeNsfw` keeps feeds work-safe.
- **Compact or detailed rows.** `responseFormat: "detailed"` adds a text preview of each self-post.

### How to use it

**What is rising in startup communities right now:**

```json
{
  "subreddits": ["startups", "SaaS"],
  "sort": "rising",
  "maxResults": 25,
  "responseFormat": "detailed"
}
```

**Today's top posts in world news with at least 100 points:**

```json
{
  "subreddits": ["worldnews"],
  "sort": "top",
  "timeRange": "day",
  "minScore": 100,
  "maxResults": 20
}
```

| Input | What it controls |
|---|---|
| `subreddits` | Subreddit names without `r/` (default `artificial`, `technology`, `Futurology`) |
| `sort` | `hot` (default), `rising`, `top`, `new` or `controversial` |
| `timeRange` | `hour`, `day`, `week` (default), `month`, `year` or `all`, used by `top` and `controversial` |
| `maxResults` | Total posts across all subreddits (default 50) |
| `maxPagesPerSource` | Feed pages read per subreddit (default 2) |
| `minScore` | Lowest Reddit score to keep (default 0) |
| `includeNsfw` | Keep posts marked NSFW (default off) |
| `responseFormat` | `concise` (default) or `detailed` with `textPreview` |
| `proxyConfiguration` | Proxy for Reddit requests; Apify Residential by default |

### Output: Reddit trend data you receive

A real row from the `rising` feed with `detailed` format (text preview shortened):

```json
{
  "postId": "1wvl3y5",
  "rank": 1,
  "title": "Feedback Friday",
  "subreddit": "startups",
  "author": "AutoModerator",
  "postUrl": "https://www.reddit.com/r/startups/comments/1wvl3y5/feedback_friday/",
  "domain": "self.startups",
  "score": 8,
  "commentCount": 12,
  "upvoteRatio": 1,
  "createdAt": "2026-10-02T05:00:26.000Z",
  "ageHours": 5.68,
  "isSelfPost": true,
  "isVideo": false,
  "isNsfw": false,
  "flair": null,
  "sourceName": "startups",
  "sort": "rising",
  "trendScore": 64.67,
  "scrapedAt": "2026-10-02T10:41:14.639Z",
  "textPreview": "Welcome to this week's Feedback Thread! Please use this thread appropriately to gather feedback..."
}
```

| Field | What it contains |
|---|---|
| `rank`, `trendScore` | Position in the combined results and the momentum score used to rank them |
| `title`, `postUrl`, `permalink`, `domain` | The post and where it links |
| `subreddit`, `author`, `flair` | Community, poster and flair |
| `score`, `commentCount`, `upvoteRatio` | Reddit engagement |
| `createdAt`, `ageHours` | When it was posted and how old it is |
| `isSelfPost`, `isVideo`, `isNsfw` | Post type flags |
| `sort`, `timeRange`, `sourceName` | Which feed the row came from; `timeRange` is `null` for feeds that ignore it |
| `textPreview`, `fullname` | Self-post text preview and Reddit's full ID, in `detailed` format |

`OUTPUT` and `RUN_SUMMARY` in the default key-value store report the outcome and the number of posts saved.

### Example workflow: a weekly topic radar

A content lead at a developer-tools company watches `programming`, `webdev` and `devops`. Every Monday they collect the `top` posts with `timeRange` set to `week` and `minScore` at 200, then sort by `trendScore` to pick blog topics. They continue with [Reddit Posts & Comments Scraper](https://apify.com/khadinakbar/reddit-posts-comments-scraper) on the best post links to read the full discussion before writing.

### Pricing

This Actor uses **Pay per event** plus **Apify platform usage**. You pay a small start event and one event per post saved, plus the platform usage of the job. The live Pricing tab on this page shows the current price.

- 3 subreddits, `maxResults` 50 = up to 50 post events + platform usage.
- `minScore` and `includeNsfw` filters run before posts are saved and charged.
- `maxResults` is the cost ceiling for the whole job.

### Reddit trends with AI agents (MCP)

Connect this Actor to an AI agent through [Apify MCP](https://mcp.apify.com) and ask in plain language:

> What are the top rising posts in r/artificial and r/MachineLearning right now? Give me titles, scores and links.

Agent checklist:

1. Put subreddit names without `r/` in `subreddits`.
2. Set `sort` to match the request (`rising` for "right now", `top` with `timeRange` for "this week").
3. Keep `responseFormat` at `concise` unless the user wants post text.
4. Read rows with `get-dataset-items`; they arrive ranked by `trendScore`.

### API example

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~reddit-trends-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"subreddits": ["artificial", "MachineLearning"], "sort": "rising", "maxResults": 20}'
```

### Related Reddit tools from the same developer

| Your next step | Use | Why |
|---|---|---|
| When you then want the full comment threads | [Reddit Posts & Comments Scraper](https://apify.com/khadinakbar/reddit-posts-comments-scraper) | Posts with nested comments and subreddit stats |
| When you search Reddit by keyword instead of subreddit | [Reddit Posts Search Scraper](https://apify.com/khadinakbar/reddit-posts-search-scraper) | Keyword search with sort and time filters |
| When you collect posts and replies from known URLs | [Reddit Posts Scraper](https://apify.com/khadinakbar/reddit-posts-scraper) | Posts, comments and replies |
| When you research the people behind trending posts | [Reddit User Profile Scraper](https://apify.com/khadinakbar/reddit-user-profile-scraper) | Karma, account age and post history |

### Best results

| Starting situation | Helpful action | Expected outcome |
|---|---|---|
| Spotting topics early | Use `sort: "rising"` | Young posts gaining traction |
| A weekly report | Use `top` with `timeRange: "week"` | The strongest posts of the week |
| Busy subreddits | Raise `minScore` | Only posts with real engagement |
| Reading post content | Set `responseFormat` to `detailed` | Text previews for self-posts |

### Builder's note

I found that Reddit's own `hot` order mixes old posts with new ones, so the Actor adds a `trendScore` that weighs engagement against age and ranks every row by it. I learned that people watching trends usually follow a handful of communities, so the input starts from subreddit names and keeps each row small enough for an agent to read many at once.

### FAQ

#### Do I need a Reddit account or API key?

No. The Actor reads public subreddit feeds.

#### Can I watch many subreddits at once?

Yes. Add them all to `subreddits`; `maxResults` caps the combined total.

#### What does `trendScore` measure?

Engagement (score and comments) relative to the post's age, so newer posts with fast engagement rank higher.

#### Why is `timeRange` `null` on some rows?

Reddit uses the time window only for the `top` and `controversial` feeds, so rows from other feeds leave it empty.

#### Does it include comments?

It returns `commentCount` per post. Use Reddit Posts & Comments Scraper for the comment text.

### Responsible use

This Actor collects public Reddit posts. Use the data for research and analysis, and follow Reddit's terms and the privacy laws that apply to you. Read Apify's guide on [whether web scraping is legal](https://blog.apify.com/is-web-scraping-legal/) for more context. Reddit is a trademark of Reddit, Inc. This independent Actor is not affiliated with, associated with, or endorsed by Reddit. For questions or bugs, open a ticket in the Issues tab.

# Changelog

This Actor's version history is a separate document: https://apify.com/khadinakbar/reddit-trends-scraper/changelog.md

# Actor input Schema

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

Use this when monitoring specific Reddit communities. Enter names without r/, for example artificial, technology, or Futurology. Defaults to artificial, technology, and Futurology. This is not a full Reddit URL list.

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

Use this when selecting subreddit listing order. Accepted values are hot, rising, top, new, or controversial. Defaults to hot and supports timeRange for top and controversial.

## `timeRange` (type: `string`):

Use this when top or controversial feeds need a time window. Accepted values are hour, day, week, month, year, or all. Defaults to week for trend discovery. This is not a date range picker.

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

Use this when capping the number of Reddit posts returned and charged. Accepted range is 1 to 500. Defaults to 50. This is not the number of pages; use maxPagesPerSource for pagination.

## `maxPagesPerSource` (type: `integer`):

Use this when each subreddit should paginate deeper. Accepted range is 1 to 10 pages per source. Defaults to 2 for fast quality-test runs. This is not a result limit.

## `includeNsfw` (type: `boolean`):

Use this when NSFW Reddit posts should be included in the dataset. Defaults to false, so NSFW records are skipped. Set true only when your workflow can handle adult or sensitive content. This does not bypass private or quarantined communities.

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

Use this when low-score posts should be filtered out. Enter a non-negative Reddit score such as 25 or 100. Defaults to 0. This is not a trendScore threshold.

## `responseFormat` (type: `string`):

Use this when choosing dataset detail level for humans or agents. concise returns stable trend fields under a small token budget, while detailed adds raw fullname and textPreview when available. Defaults to concise. This is not a file format selector.

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

Use this when Reddit blocks direct requests from the actor. Apify Residential proxy is the safest fallback, for example useApifyProxy true with RESIDENTIAL group. Defaults to Apify Residential proxy for cloud reliability. This is not a login or cookie setting.

## Actor input object example

```json
{
  "subreddits": [
    "artificial",
    "technology"
  ],
  "sort": "hot",
  "timeRange": "week",
  "maxResults": 50,
  "maxPagesPerSource": 2,
  "includeNsfw": false,
  "minScore": 25,
  "responseFormat": "concise",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `records` (type: `string`):

Default dataset containing one item per Reddit trend post.

## `recordsCsv` (type: `string`):

CSV export of the same Reddit trend post records.

## `runSummary` (type: `string`):

Run summary stored in the default key-value store.

## `output` (type: `string`):

Compact MCP-friendly output record.

# 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 = {
    "subreddits": [
        "artificial",
        "technology",
        "Futurology"
    ],
    "sort": "hot",
    "timeRange": "week",
    "maxResults": 50,
    "maxPagesPerSource": 2,
    "includeNsfw": false,
    "minScore": 0,
    "responseFormat": "concise"
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/reddit-trends-scraper").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 = {
    "subreddits": [
        "artificial",
        "technology",
        "Futurology",
    ],
    "sort": "hot",
    "timeRange": "week",
    "maxResults": 50,
    "maxPagesPerSource": 2,
    "includeNsfw": False,
    "minScore": 0,
    "responseFormat": "concise",
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/reddit-trends-scraper").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 '{
  "subreddits": [
    "artificial",
    "technology",
    "Futurology"
  ],
  "sort": "hot",
  "timeRange": "week",
  "maxResults": 50,
  "maxPagesPerSource": 2,
  "includeNsfw": false,
  "minScore": 0,
  "responseFormat": "concise"
}' |
apify call khadinakbar/reddit-trends-scraper --silent --output-dataset

```

## MCP server setup

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

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/d93x6u5TMGUQywlmd/builds/DjUKFbXbDJajmlMId/openapi.json
