# Reddit Video & Image Post Scraper (`codenest/reddit-video-image-post-scraper`) Actor

Extract Reddit videos & images with full metadata! 🎬📸 Get direct URLs, multiple resolutions, post analytics, and secure Apify storage links—all in structured JSON output.🚀Reddit Video & Image Post Scraper.

- **URL**: https://apify.com/codenest/reddit-video-image-post-scraper.md
- **Developed by:** [CodeNest](https://apify.com/codenest) (community)
- **Categories:** Videos, Social media, Developer tools
- **Security:** Limited permissions
- **Stats:** 26 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $19.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

## 🎯 Reddit Video & Image Post Scraper - Ultimate Reddit Media Extraction Tool

**Effortlessly download Reddit posts with our powerful **Reddit Video & Image Post Scraper**! This Apify actor enables you to batch scrape Reddit content while preserving high-quality media, comprehensive metadata, and direct storage access.**

***

### 📋 Overview

Need to archive Reddit content, analyze viral trends, or repurpose posts? This **Reddit Video & Image Post Scraper** delivers:

- 🎬 **Video Support**: Download merged MP4 videos from Reddit-hosted content
- 🖼️ **Gallery Extraction**: Capture complete image galleries (up to 20+ images per post)
- 📊 **Rich Metadata**: Titles, authors, subreddit info, scores, upvote ratios, comments count
- 🔒 **NSFW Filtering**: Automatic NSFW and spoiler detection
- ☁️ **Apify Storage**: Encrypted download URLs with fallback options
- ⚡ **Batch Processing**: Scrape 100+ post URLs per run

Perfect for content researchers 📈, social media managers 🎬, data scientists 📊, and community moderators 👥!

***

### ✨ Core Capabilities/Key Features

#### 🎥 Media Options

- **Merged Videos**: Download complete Reddit videos with audio
- **Gallery Images**: Extract all images from multi-image posts
- **Preview Images**: Capture thumbnail/preview images for video posts
- **Direct Images**: Download single image posts effortlessly
- **Bulk Mode**: Process unlimited post URLs in one run

#### 📊 Metadata Mastery

- **Post Information**: Titles, permalinks, post IDs, domains
- **Creator Profiles**: Author usernames and subreddit names
- **Engagement Metrics**: Score, upvote ratio, comment count
- **Temporal Data**: UTC timestamps for chronological analysis
- **Content Flags**: NSFW, spoiler, and video status detection

#### 🖼️ Gallery Intelligence

- **Complete Gallery Capture**: No missing images from multi-image posts
- **High-Resolution Downloads**: Preserve original image dimensions
- **Fallback URLs**: Direct i.redd.it links when available
- **Media Type Detection**: Automatic classification (gallery_image, direct_image, preview_image)

#### 🔧 Advanced Tech Features

- **Apify Key-Value Store**: Persistent media storage with secure tokens
- **Resolution Metadata**: Width/height preservation for all images
- **Reddit API Emulation**: Bypass rate limits with smart request handling
- **URL Normalization**: Automatic query parameter cleanup

***

### 📥 Input Configuration

Simply enter Reddit post URLs in the Input Section, configure your preferences, then click "Start" and wait for the results.

#### Input JSON Example

```json
{
  "include_gallery_images": true,
  "include_preview_images": true,
  "key_value": true,
  "post_urls": [
    {
      "url": "https://www.reddit.com/r/BollyBlindsNGossip/comments/1rl9l1v/more_pictures/"
    },
    {
      "url": "https://www.reddit.com/r/europe/comments/1rjpcoo/the_staging_of_macrons_speech_on_nuclear/"
    },
    {
      "url": "https://www.reddit.com/r/NothingTech/comments/1rjj3ac/phone_4a_colours_in_mwc_2026_event_cc_cnet/"
    }
  ]
}
```

#### Input Specifications

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `post_urls` | Array | ✅ Yes | Reddit post URLs to process (supports any Reddit post type) |
| `url` | String | ✅ Yes | Valid Reddit post URL (comments, direct links, galleries) |
| `include_gallery_images` | Boolean | ❌ No | Extract all images from gallery posts (default: true) |
| `include_preview_images` | Boolean | ❌ No | Capture preview thumbnails for video posts (default: true) |
| `key_value` | Boolean | ❌ No | Store media in Apify key-value store (default: true) |

***

### 📤 Output Structure

Your **Reddit Video & Image Post Scraper** produces comprehensive output like this:

```json
[
  {
    "post_url": "https://www.reddit.com/r/BollyBlindsNGossip/comments/1rl9l1v/more_pictures/",
    "post_id": "1rl9l1v",
    "title": "More pictures",
    "author": "Resident-Train-7227",
    "subreddit": "BollyBlindsNGossip",
    "subreddit_prefixed": "r/BollyBlindsNGossip",
    "score": 1713,
    "upvote_ratio": 0.92,
    "num_comments": 129,
    "created_utc": 1772689983,
    "is_video": false,
    "is_nsfw": false,
    "spoiler": false,
    "selftext": "Out of context, but don't ya'll think Rashmika's family has been sidelined?",
    "permalink": "/r/BollyBlindsNGossip/comments/1rl9l1v/more_pictures/",
    "domain": "reddit.com",
    "link_flair_text": "Discuss",
    "images": [
      {
        "type": "gallery_image",
        "media_id": "9p14pjod16ng1",
        "url": "https://api.apify.com/v2/key-value-stores/.../image.jpg",
        "fallback_url": "https://i.redd.it/9p14pjod16ng1.jpg",
        "width": 1600,
        "height": 1646,
        "kv_store_url": "https://api.apify.com/v2/key-value-stores/.../image.jpg"
      }
    ]
  }
]
```

#### 📋 Output Field Documentation

**Post Metadata Section**

| Field | Description |
|-------|-------------|
| `post_url` | Original Reddit post URL |
| `post_id` | Unique Reddit post identifier |
| `title` | Post title text |
| `author` | Reddit username of content creator |
| `subreddit` | Subreddit name without prefix |
| `subreddit_prefixed` | Subreddit name with r/ prefix |
| `score` | Total upvote count |
| `upvote_ratio` | Percentage of upvotes (0.0 to 1.0) |
| `num_comments` | Total comment count |
| `created_utc` | Unix timestamp of post creation |
| `is_video` | Boolean flag for video content |
| `is_nsfw` | Not Safe For Work content flag |
| `spoiler` | Spoiler content flag |
| `selftext` | Post text content (if any) |
| `permalink` | Relative Reddit permalink |
| `domain` | Content domain (reddit.com, i.redd.it, v.redd.it, etc.) |
| `link_flair_text` | Post flair/category text |

**Media Assets Section**

| Field | Description |
|-------|-------------|
| `images` | Array of image objects (galleries, direct, preview) |
| `videos` | Array of video objects (merged Reddit videos) |
| `type` | Media type: gallery_image, direct_image, preview_image, merged_video |
| `url` | Primary download URL (Apify storage) |
| `fallback_url` | Direct Reddit CDN URL (i.redd.it) |
| `kv_store_url` | Apify key-value store persistent URL |
| `width` | Image/video width in pixels |
| `height` | Image/video height in pixels |
| `format` | Container format (mp4, jpg, png) |
| `resolution` | Human-readable resolution (e.g., "360x640") |

***

### 🎨 Media Type Breakdown

The **Reddit Video & Image Post Scraper** automatically detects and extracts three media types:

#### 1. **Gallery Images** (Multi-Post Images)

- Extracted from Reddit gallery posts
- Complete sequence preservation (0 to N index)
- High-resolution originals (up to 1600x1996px)
- Fallback to i.redd.it CDN

#### 2. **Direct Images** (Single Image Posts)

- Single high-quality image extraction
- Domain detection (i.redd.it, external hosts)
- Width/height metadata included

#### 3. **Merged Videos** (Reddit Video Posts)

- Complete MP4 download with audio
- Resolution metadata preserved
- Preview images also captured when available
- v.redd.it domain support

***

### 🚀 Use Cases

- **📊 Data Scientists** – Analyze Reddit engagement patterns and viral content trends with our **Reddit Video & Image Post Scraper**
- **📱 Social Media Managers** – Archive competitor content and repurpose viral posts across platforms
- **🔍 Market Researchers** – Track brand mentions and product discussions with visual content
- **👥 Community Moderators** – Backup important subreddit posts and monitor content quality
- **🤖 ML Engineers** – Build training datasets from Reddit images and videos
- **📰 Journalists** – Investigate trending stories with complete post metadata
- **🎓 Academics** – Study online communities and content virality patterns

***

### 🔧 Technical Features

#### Advanced Media Handling

- **Multi-format support**: JPG, PNG, MP4, and more
- **Gallery pagination**: Automatically finds all images in multi-image posts
- **Resolution detection**: Width/height extraction for every media file
- **Fallback mechanism**: Direct CDN URLs when Apify storage is disabled

#### Metadata Intelligence

- **Engagement metrics**: Score, upvote_ratio, num_comments for trend analysis
- **Content classification**: NSFW, spoiler, video status flags
- **Temporal analysis**: UTC timestamps for chronological studies
- **Subreddit context**: Complete subreddit information with engagement data

#### Reliability Features

- **URL normalization**: Automatic cleanup of tracking parameters
- **Error resilience**: Graceful failure handling per post
- **Rate limit respect**: Smart delays between requests
- **Token-based auth**: Secure Apify API token integration

***

### ✅ Why Choose Our Reddit Video & Image Post Scraper?

- **⚡ Blazing Fast** – Parallel processing for multiple posts
- **🔒 Privacy-Focused** – No data storage beyond your Apify account
- **🔄 Regular Updates** – Maintained for Reddit API changes
- **📦 Complete Data** – Get all metadata and media in one output
- **🎯 Precision Extraction** – No missed gallery images or video files
- **☁️ Cloud-Native** – Built specifically for Apify platform

***

### ⚠️ Limitations

- Only works with **public Reddit posts** (no private subreddits or deleted content)
- Video downloads limited to **Reddit-hosted content** (v.redd.it domain)
- Gallery extraction maximum depends on Reddit's native limit (typically 20+ images)
- Rate limits may apply for **extremely high-volume scraping** (1000+ posts/minute)

***

### 🔗🛠 Related Actors (Complete Social Media Scraping Suite)

Explore our full scraping suite for enhanced content extraction:

#### 📸 Instagram Scrapers:

- [Instagram Reels Downloader](https://apify.com/codenest/instagram-reels-downloader)

#### 🎵 Facebook Scrapers:

- [Facebook Video Downloader](https://apify.com/codenest/facebook-video-downloader)
- [Facebook Reels Downloader](https://apify.com/codenest/facebook-reels-downloader)

***

### 📧 Need Customization?

Want *higher resolution videos*, *comment extraction*, *user profile scraping*, or *custom output formats*?

✉ **Email**: <codenest2.0@gmail.com> for tailored solutions!

# Actor input Schema

## `post_urls` (type: `array`):

List of Reddit post URLs to extract media from. Also accepts 'reddit_urls' as key name.

## `key_value` (type: `boolean`):

Enable or disable storing downloaded media files in the key-value store.

## `include_preview_images` (type: `boolean`):

Include lower resolution preview images in the output.

## `include_gallery_images` (type: `boolean`):

Include all images from Reddit gallery posts.

## Actor input object example

```json
{
  "post_urls": [
    {
      "url": "https://www.reddit.com/r/videos/comments/example/post_title/"
    }
  ],
  "key_value": true,
  "include_preview_images": true,
  "include_gallery_images": true
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing scraped Reddit post details, direct media download links, and post metadata.

# 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 = {
    "post_urls": [
        {
            "url": "https://www.reddit.com/r/videos/comments/example/post_title/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("codenest/reddit-video-image-post-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 = { "post_urls": [{ "url": "https://www.reddit.com/r/videos/comments/example/post_title/" }] }

# Run the Actor and wait for it to finish
run = client.actor("codenest/reddit-video-image-post-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 '{
  "post_urls": [
    {
      "url": "https://www.reddit.com/r/videos/comments/example/post_title/"
    }
  ]
}' |
apify call codenest/reddit-video-image-post-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codenest/reddit-video-image-post-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/8sOMc6MCYjdKqQ4ZR/builds/1h7VIHvOwlOgsFlLn/openapi.json
