# Reddit Posts & Comments Scraper — Full Thread Extraction (`maged120/reddit-scraper`) Actor

Scrape Reddit posts and full comment threads from any post URL. Extract title, score, author, timestamp, and all nested comments without login.

- **URL**: https://apify.com/maged120/reddit-scraper.md
- **Developed by:** [Maged](https://apify.com/maged120) (community)
- **Categories:** Automation, Social media
- **Stats:** 55 total users, 1 monthly users, 88.6% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $10.00 / 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/platform/actors/running/actors-in-store#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 Data Scraper Actor

Fastest, the most affordable, and stable, doesn't need any login or auth

### Input Configuration

The actor accepts the following input fields. If none of `subreddit`, `username`, or `link` are provided, it defaults to scraping `https://www.reddit.com/`.

| Field       | Type    | Description                                      | Default |
|-------------|---------|--------------------------------------------------|---------|
| subreddit   | String  | Subreddit ID (e.g., `Frontend`)                  | -       |
| username    | String  | Reddit username (e.g., `Fluffy_Hearts`)          | -       |
| link        | String  | Specific Reddit URL (e.g., post or comment URL)  | -       |
| limit       | Integer | Maximum number of posts to retrieve              | 25      |

#### Example Input

```json
{
    "subreddit": "Frontend",
    "limit": 10
}
```

or

```json
{
    "link": "https://www.reddit.com/user/Fluffy_Hearts/",
    "limit": 50
}
```

### Output

```json
[
  {
    "title": "AIO: Gf sent me photos of her with another guy",
    "description": "My gf went to Italy when we were on a break. When she got back, we ended up reconciling and got back together. Yesterday she sent me these AI generated photos of her with another guy. She called me and at first we were joking, but it was very obvious she was trying to ",
    "link": "https://www.reddit.com/r/AmIOverreacting/comments/1nxavq2/aio_gf_sent_me_photos_of_her_with_another_guy/",
    "permalink": "/r/AmIOverreacting/comments/1nxavq2/aio_gf_sent_me_photos_of_her_with_another_guy/",
    "subreddit": "r/AmIOverreacting",
    "subreddit_id": "t5_4uoy2u",
    "subreddit_subscribers": 3829634,
    "post_id": "1nxavq2",
    "ups": 16137,
    "downs": 0,
    "upvote_ratio": 0.86,
    "num_comments": 9891,
    "num_crossposts": 6,
    "media_type": "text",
    "media_urls": [
      "https://preview.redd.it/1s72c9dnmysf1.jpg?width=1289&format=pjpg&auto=webp&s=2321c18b6b5e8e18295577db6e9b5c2b93f282e6",
      "https://preview.redd.it/akop78dnmysf1.jpg?width=1289&format=pjpg&auto=webp&s=d36ebace648077974522f75f5e312a20e46a83f0"
    ],
    "thumbnail": "https://b.thumbs.redditmedia.com/tH8q0D3V1KCTE9I5mScyFVaH6mJ1rjXmyYKrdhkt_7U.jpg",
    "is_video": false,
    "is_gallery": true,
    "created_utc": 1759524817,
    "author": "Dangerous-Bit2664",
    "author_flair_text": null,
    "flair": "❤️‍🩹 relationship",
    "is_original_content": false,
    "awards_count": 0,
    "over_18": false,
    "is_spoiler": false,
    "is_locked": false,
    "is_stickied": false,
    "content_categories": null,
    "allow_live_comments": false,
    "domain": "reddit.com"
  },
  {
    "title": "ICE agents arrest alderperson Jessie L. Fuentes (26th Ward of Chicago city council) after she questions them on whether they have a signed judicial warrant to arrest person at Humboldt Park hospital",
    "description": "",
    "link": "https://www.reddit.com/r/law/comments/1nxb4y9/ice_agents_arrest_alderperson_jessie_l_fuentes/",
    "permalink": "/r/law/comments/1nxb4y9/ice_agents_arrest_alderperson_jessie_l_fuentes/",
    "subreddit": "r/law",
    "subreddit_id": "t5_2qh9k",
    "subreddit_subscribers": 1930520,
    "post_id": "1nxb4y9",
    "ups": 74845,
    "downs": 0,
    "upvote_ratio": 0.92,
    "num_comments": 8238,
    "num_crossposts": 54,
    "media_type": "hosted:video",
    "media_urls": [
      "https://v.redd.it/7t9no2n7oysf1/DASH_720.mp4?source=fallback"
    ],
    "thumbnail": "https://external-preview.redd.it/d2owcHcybjdveXNmMUnSeAU_mZGuqiEwx-4bpWooe5g2R5cH-2smvI1SVWFN.png?width=140&height=140&format=jpg&auto=webp&s=69fe570638767cdbedee8e6d2f01c1c3baf04cfc",
    "is_video": true,
    "is_gallery": false,
    "created_utc": 1759525426,
    "author": "Minute_Revolution951",
    "author_flair_text": null,
    "flair": "Other",
    "is_original_content": false,
    "awards_count": 0,
    "over_18": false,
    "is_spoiler": false,
    "is_locked": false,
    "is_stickied": false,
    "content_categories": null,
    "allow_live_comments": false,
    "domain": "v.redd.it"
  },
  {
    "title": "You Shall Not Poo Said Chicago: Kristi Noam Forced To Do The Potty Dance After Being Denied Access To A Restroom",
    "description": "",
    "link": "https://www.reddit.com/r/illinois/comments/1nxbicd/you_shall_not_poo_said_chicago_kristi_noam_forced/",
    "permalink": "/r/illinois/comments/1nxbicd/you_shall_not_poo_said_chicago_kristi_noam_forced/",
    "subreddit": "r/illinois",
    "subreddit_id": "t5_2qhco",
    "subreddit_subscribers": 258113,
    "post_id": "1nxbicd",
    "ups": 52618,
    "downs": 0,
    "upvote_ratio": 0.87,
    "num_comments": 8106,
    "num_crossposts": 21,
    "media_type": "hosted:video",
    "media_urls": [
      "https://v.redd.it/zwiieb60rysf1/DASH_1080.mp4?source=fallback"
    ],
    "thumbnail": "https://external-preview.redd.it/OXhqdjAyNjByeXNmMRmMYiiLCGEvf43tkAG_uU1eWUvNRRXUuxTWTwbxLct9.png?width=140&height=140&format=jpg&auto=webp&s=fbd10611de8cc6e1a3dce3e3125281cd313819ff",
    "is_video": true,
    "is_gallery": false,
    "created_utc": 1759526342,
    "author": "CantStopPoppin",
    "author_flair_text": null,
    "flair": "ICE Posts",
    "is_original_content": false,
    "awards_count": 0,
    "over_18": false,
    "is_spoiler": false,
    "is_locked": false,
    "is_stickied": false,
    "content_categories": null,
    "allow_live_comments": false,
    "domain": "v.redd.it"
  },
  {
    "title": "Sean P Diddy Combs sentenced to 4 years 2months in prison.",
    "description": "",
    "link": "https://www.reddit.com/r/pics/comments/1nxaksr/sean_p_diddy_combs_sentenced_to_4_years_2months/",
    "permalink": "/r/pics/comments/1nxaksr/sean_p_diddy_combs_sentenced_to_4_years_2months/",
    "subreddit": "r/pics",
    "subreddit_id": "t5_2qh0u",
    "subreddit_subscribers": 33090110,
    "post_id": "1nxaksr",
    "ups": 74813,
    "downs": 0,
    "upvote_ratio": 0.94,
    "num_comments": 4548,
    "num_crossposts": 12,
    "media_type": "image",
    "media_urls": [
      "https://i.redd.it/kjk2q3w1jysf1.jpeg"
    ],
    "thumbnail": "https://b.thumbs.redditmedia.com/93feopyO6VWpORi89fD6RrlgeuhcLuJC-PHTJtrQ9fc.jpg",
    "is_video": false,
    "is_gallery": false,
    "created_utc": 1759524091,
    "author": "MustBeDem",
    "author_flair_text": null,
    "flair": null,
    "is_original_content": false,
    "awards_count": 0,
    "over_18": false,
    "is_spoiler": false,
    "is_locked": false,
    "is_stickied": false,
    "content_categories": [
      "photography"
    ],
    "allow_live_comments": false,
    "domain": "i.redd.it"
  },
  {
    "title": "We need more teachers like her.",
    "description": "",
    "link": "https://www.reddit.com/r/MadeMeSmile/comments/1nxsw4j/we_need_more_teachers_like_her/",
    "permalink": "/r/MadeMeSmile/comments/1nxsw4j/we_need_more_teachers_like_her/",
    "subreddit": "r/MadeMeSmile",
    "subreddit_id": "t5_2uqcm",
    "subreddit_subscribers": 11812079,
    "post_id": "1nxsw4j",
    "ups": 17846,
    "downs": 0,
    "upvote_ratio": 0.97,
    "num_comments": 197,
    "num_crossposts": 1,
    "media_type": "image",
    "media_urls": [
      "https://i.redd.it/mpw8d3a8b3tf1.png"
    ],
    "thumbnail": "https://b.thumbs.redditmedia.com/e4AwORQYJL1HG6RSg9-qjn_P6ciOQJFv9fdkrYo26Xs.jpg",
    "is_video": false,
    "is_gallery": false,
    "created_utc": 1759581535,
    "author": "Embarrassed_Tip7359",
    "author_flair_text": null,
    "flair": ":snoo_hearteyes: Wholesome Moments :snoo_simple_smile:",
    "is_original_content": false,
    "awards_count": 0,
    "over_18": false,
    "is_spoiler": false,
    "is_locked": false,
    "is_stickied": false,
    "content_categories": null,
    "allow_live_comments": false,
    "domain": "i.redd.it"
  },
  {
    "title": "China is making these massive Solar Plants on water bodies as they need the land for agriculture",
    "description": "",
    "link": "https://www.reddit.com/r/nextfuckinglevel/comments/1nxl15d/china_is_making_these_massive_solar_plants_on/",
    "permalink": "/r/nextfuckinglevel/comments/1nxl15d/china_is_making_these_massive_solar_plants_on/",
    "subreddit": "r/nextfuckinglevel",
    "subreddit_id": "t5_m0bnr",
    "subreddit_subscribers": 9801028,
    "post_id": "1nxl15d",
    "ups": 47123,
    "downs": 0,
    "upvote_ratio": 0.85,
    "num_comments": 3669,
    "num_crossposts": 29,
    "media_type": "hosted:video",
    "media_urls": [
      "https://v.redd.it/s7hc4bbm01tf1/DASH_720.mp4?source=fallback"
    ],
    "thumbnail": "https://external-preview.redd.it/YXNkZnI5Ym0wMXRmMZ9pw3LQIQL6Xh5qg7tslHyy8LVcxXwleS_Q5VFlpM3n.png?width=140&height=140&format=jpg&auto=webp&s=0e474c78f4b10b44e2d6a99c4c9c984f21d2c982",
    "is_video": true,
    "is_gallery": false,
    "created_utc": 1759553739,
    "author": "AristFrost",
    "author_flair_text": null,
    "flair": null,
    "is_original_content": false,
    "awards_count": 0,
    "over_18": false,
    "is_spoiler": false,
    "is_locked": false,
    "is_stickied": false,
    "content_categories": null,
    "allow_live_comments": false,
    "domain": "v.redd.it"
  },
  {
    "title": "Diddy sentenced to 50 months in prison",
    "description": "",
    "link": "https://www.reddit.com/r/news/comments/1nxan2j/diddy_sentenced_to_50_months_in_prison/",
    "permalink": "/r/news/comments/1nxan2j/diddy_sentenced_to_50_months_in_prison/",
    "subreddit": "r/news",
    "subreddit_id": "t5_2qh3l",
    "subreddit_subscribers": 30944846,
    "post_id": "1nxan2j",
    "ups": 39953,
    "downs": 0,
    "upvote_ratio": 0.95,
    "num_comments": 2443,
    "num_crossposts": 1,
    "media_type": "link",
    "media_urls": [],
    "thumbnail": "default",
    "is_video": false,
    "is_gallery": false,
    "created_utc": 1759524242,
    "author": "tx_brandon",
    "author_flair_text": null,
    "flair": null,
    "is_original_content": false,
    "awards_count": 0,
    "over_18": false,
    "is_spoiler": false,
    "is_locked": false,
    "is_stickied": false,
    "content_categories": null,
    "allow_live_comments": false,
    "domain": "cnn.com"
  },
  {
    "title": "'No one can find him': Trump drops from public view again after 'slurring' military speech",
    "description": "",
    "link": "https://www.reddit.com/r/NoFilterNews/comments/1nx9s4c/no_one_can_find_him_trump_drops_from_public_view/",
    "permalink": "/r/NoFilterNews/comments/1nx9s4c/no_one_can_find_him_trump_drops_from_public_view/",
    "subreddit": "r/NoFilterNews",
    "subreddit_id": "t5_3f1a0",
    "subreddit_subscribers": 139289,
    "post_id": "1nx9s4c",
    "ups": 24114,
    "downs": 0,
    "upvote_ratio": 0.94,
    "num_comments": 2356,
    "num_crossposts": 3,
    "media_type": "link",
    "media_urls": [],
    "thumbnail": "https://external-preview.redd.it/crIwmzYcUgm1-oU8bvNgo__1wEWS9i49fLr1GmIa_lI.jpeg?width=140&height=70&auto=webp&s=42efe944a47e7f352015159f0994bae54af10d1d",
    "is_video": false,
    "is_gallery": false,
    "created_utc": 1759522212,
    "author": "RawStoryNews",
    "author_flair_text": null,
    "flair": null,
    "is_original_content": false,
    "awards_count": 0,
    "over_18": false,
    "is_spoiler": false,
    "is_locked": false,
    "is_stickied": false,
    "content_categories": null,
    "allow_live_comments": false,
    "domain": "rawstory.com"
  },
  {
    "title": "So Many Comedians Just Ruined Their Reputations",
    "description": "",
    "link": "https://www.reddit.com/r/videos/comments/1nxgwfr/so_many_comedians_just_ruined_their_reputations/",
    "permalink": "/r/videos/comments/1nxgwfr/so_many_comedians_just_ruined_their_reputations/",
    "subreddit": "r/videos",
    "subreddit_id": "t5_2qh1e",
    "subreddit_subscribers": 26748317,
    "post_id": "1nxgwfr",
    "ups": 12185,
    "downs": 0,
    "upvote_ratio": 0.82,
    "num_comments": 2357,
    "num_crossposts": 0,
    "media_type": "rich:video",
    "media_urls": [],
    "thumbnail": "https://external-preview.redd.it/P6D_FK0o5rYBTNwhLnbsq1BQQyRNlRVScB3OyVx0SYk.jpeg?width=140&height=105&auto=webp&s=c433af38631c170959bd118d95005becd6ffcf6c",
    "is_video": false,
    "is_gallery": false,
    "created_utc": 1759540810,
    "author": "CapitalCourse",
    "author_flair_text": null,
    "flair": null,
    "is_original_content": false,
    "awards_count": 0,
    "over_18": false,
    "is_spoiler": false,
    "is_locked": false,
    "is_stickied": false,
    "content_categories": null,
    "allow_live_comments": false,
    "domain": "youtube.com"
  },
  {
    "title": "Southern white woman calling out Trump and Hegseth nonsense",
    "description": "",
    "link": "https://www.reddit.com/r/CringeTikToks/comments/1nxtvpi/southern_white_woman_calling_out_trump_and/",
    "permalink": "/r/CringeTikToks/comments/1nxtvpi/southern_white_woman_calling_out_trump_and/",
    "subreddit": "r/CringeTikToks",
    "subreddit_id": "t5_2491vo",
    "subreddit_subscribers": 463629,
    "post_id": "1nxtvpi",
    "ups": 9482,
    "downs": 0,
    "upvote_ratio": 0.95,
    "num_comments": 510,
    "num_crossposts": 5,
    "media_type": "hosted:video",
    "media_urls": [
      "https://v.redd.it/hapweoh2j3tf1/DASH_480.mp4?source=fallback"
    ],
    "thumbnail": "https://external-preview.redd.it/cndja29vaDJqM3RmMf46nxl41kAouV4cbFz9a8pkSQe1E3nIxCqkmaU_nuW9.png?width=140&height=140&format=jpg&auto=webp&s=4dac707fff1e735e849b27741537be69975db937",
    "is_video": true,
    "is_gallery": false,
    "created_utc": 1759584164,
    "author": "MrDillon369",
    "author_flair_text": null,
    "flair": "Political Cringe",
    "is_original_content": false,
    "awards_count": 0,
    "over_18": false,
    "is_spoiler": false,
    "is_locked": false,
    "is_stickied": false,
    "content_categories": null,
    "allow_live_comments": false,
    "domain": "v.redd.it"
  }
]
```

# Actor input Schema

## `subreddit` (type: `string`):

The ID of the subreddit to scrape (e.g., 'Frontend').

## `username` (type: `string`):

The Reddit username to scrape (e.g., 'Fluffy\_Hearts').

## `link` (type: `string`):

A specific Reddit URL to scrape (e.g., 'https://www.reddit.com/r/Frontend/comments/1dbyqda/...').

## `limit` (type: `integer`):

Maximum number of posts to retrieve (default: 25).

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

Leave the default Apify Residential proxy and do not select a specific country (leave it on automatic) for best results and to avoid rate limiting.

## Actor input object example

```json
{
  "limit": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "limit": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("maged120/reddit-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 = { "limit": 10 }

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

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

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

```

## CLI example

```bash
echo '{
  "limit": 10
}' |
apify call maged120/reddit-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=maged120/reddit-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/8x7dmLDxNyTQ5Rpe3/builds/GMCiHtnpP3XSKEaeG/openapi.json
