# Reddit Popular Feed Scraper - Trending Posts (`thenetaji/reddit-popular-feed-scraper`) Actor

Reads Reddit's popular listing across every community and returns one row per post: id, permalink, title, author, score, upvote ratio, comment count, flair, post type, and creation time. The listing repeats posts between reads, so repeats are counted once and a run saves distinct posts.

- **URL**: https://apify.com/thenetaji/reddit-popular-feed-scraper.md
- **Developed by:** [The Netaji](https://apify.com/thenetaji) (community)
- **Categories:** Social media, News, Automation
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.13 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Reddit Popular Feed Scraper

The Actor reads Reddit's popular listing — the cross-community feed of what the site is carrying
right now — and saves a structured record for every post it returns. It covers that one listing:
a named subreddit, an account's history, and a post's comments are the jobs of the sibling Actors
named at the end. No Reddit account, application, or API credential is involved.

### Accepted input

| Field | Required | Default | Notes |
| --- | --- | --- | --- |
| `maxItems` | no | `100` | Total distinct posts to save across the whole run. `0` removes the bound. |
| `after` | no | — | A continuation point from an earlier run: the value the run log prints when it stops, or the id of a post already collected. |

There is no subreddit field and no sort field, because the popular listing has neither. It is one
feed in one order, and that order is Reddit's own.

```json
{
  "maxItems": 50
}
```

### Response fields

Each saved record carries: `id`, `fullname`, `permalink`, `url`, `title`, `subreddit`,
`subreddit_prefixed`, `subreddit_id`, `author`, `author_id`, `author_icon`, `created_at`, `score`,
`upvote_ratio`, `comment_count`, `award_count`, `domain`, `content_url`, `post_type`, `flair`,
`flair_url`, `thumbnail`, `media`, `text`, `nsfw`, `spoiler`, `locked`, `archived`, and `language`.

`permalink` is the path Reddit states for the post, beginning with `/r/`; `url` is the same address
in absolute form. `content_url` is where the post itself points — an outbound link, an image, or a
hosted video — and `domain` says which of those it is. `created_at` is an ISO 8601 timestamp in UTC.

```json
{
  "id": "1abcdef",
  "fullname": "t3_1abcdef",
  "permalink": "/r/technology/comments/1abcdef/example_title/",
  "url": "https://www.reddit.com/r/technology/comments/1abcdef/example_title/",
  "title": "Example title",
  "subreddit": "technology",
  "subreddit_prefixed": "r/technology",
  "author": "example_user",
  "created_at": "2026-08-14T09:41:07.000Z",
  "score": 1842,
  "upvote_ratio": 0.94,
  "comment_count": 317,
  "post_type": "link",
  "domain": "arstechnica.com",
  "content_url": "https://arstechnica.com/example",
  "nsfw": null
}
```

### What the popular listing is, and what it is not

The popular listing samples as much as it pages. Two reads of it a moment apart return overlapping
but not identical sets, and a longer read serves the same post more than once: a deep walk returned
roughly four distinct posts for every five rows it was given. The Actor therefore counts distinct
posts. A post already saved in the run is recognised and skipped rather than written twice, and
`maxItems` bounds posts saved rather than rows fetched, which is the only way that number can mean
what it says.

The consequence worth planning around is that this listing has no fixed order to return to. Two runs
of the same input will not produce the same list in the same sequence, and a record present in one
run may be absent from the next without having been deleted. The listing is a picture of what Reddit
is promoting at the moment of the read; it is not a stable index of anything. Work that needs a
reproducible set should read a named subreddit sorted by `new` instead, which does page rather than
sample.

Because the listing repeats itself, a run costs somewhat more upstream reading per saved post than
its page size suggests. That is the trade for the count being honest.

### Pagination, limits, and resuming

`maxItems` bounds the number of posts saved, not the number of requests made. Paging is settled
before a response is returned, so a run asking for 150 posts is answered with up to 150 posts rather
than a first page and a stack of follow-up work. Setting `maxItems` to `0` removes the bound and the
run continues until the listing reports that it has no more to give.

A run that stops with more available writes its continuation point into the run log, and passing
that value as `after` in a later run continues from that post. The continuation point is derived
from the last post saved rather than being a session token, so it does not expire. It is worth
remembering what it continues, though: on a listing that re-ranks between reads, resuming continues
from a position in a feed that has moved in the meantime.

### Fields that are frequently absent

`media`, `text`, and `nsfw` are the three fields most often empty, and they are empty for ordinary
reasons rather than as a failure. `text` carries the body of a self post and is empty for link,
image, and video posts, which have no body. `media` is populated only when the listing itself
carries the attachment, which link posts do not.

`nsfw` has three states, and the third one matters. `true` means Reddit reported the over-18 mark,
`false` means Reddit reported its absence, and `null` means the listing reported nothing either way.
A `null` is an absence of information, not a statement that the post is safe for work. The Actor
offers no NSFW filter for the same reason: filtering on a field that is frequently unknown would
produce a result set that looks filtered without being filtered. Records can be filtered downstream
on `nsfw === true`, provided the `null` cases are treated as unknown rather than as safe.

### Failures and partial results

A request that fails ends the run. Posts already saved remain in the dataset and the run log holds
the continuation point, so a failed long run is continued rather than restarted. Fields absent from
the listing are returned as `null` rather than omitted, so the column set is the same in every
record.

### Cost

Charging is per distinct post saved to the dataset, plus the platform's one-off Actor start event. A
post served twice is charged once, because it is saved once. A run that saves nothing is charged for
nothing beyond that start event, so `maxItems` is the direct control on what a run costs.

### Related Actors

- **Reddit Subreddit Feed Scraper** — one named community, in a chosen order, and a feed that pages
  rather than samples.
- **Reddit Keyword Search Scraper** — for finding posts about a subject rather than reading what is
  currently promoted.
- **Reddit Scraper - All In One** — the same read alongside the other eight, chosen at run time.

### Support

Questions, bug reports, and requests for a field that is not here yet: thenetaji@proton.me.

# Actor input Schema

## `maxItems` (type: `integer`):

The maximum number of records to save. A value of 0 removes the bound and the run continues until the source reports it has no more to give.

## `after` (type: `string`):

A continuation point from an earlier run: the value the run log prints when it stops, or the id of a record already collected. The feed continues after that record instead of starting at the top. Leave it empty to start at the top.

## Actor input object example

```json
{
  "maxItems": 25,
  "after": "t3_1abcdef"
}
```

# Actor output Schema

## `dataset` (type: `string`):

All records scraped by this run

# 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 = {
    "maxItems": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/reddit-popular-feed-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 = { "maxItems": 25 }

# Run the Actor and wait for it to finish
run = client.actor("thenetaji/reddit-popular-feed-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 '{
  "maxItems": 25
}' |
apify call thenetaji/reddit-popular-feed-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thenetaji/reddit-popular-feed-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/q3x9scakfr8vnwdto/builds/7I6NKJXFwn9DuzXIF/openapi.json
