# Reddit Poster (`viralanalyzer/reddit-poster`) Actor

- **URL**: https://apify.com/viralanalyzer/reddit-poster.md
- **Developed by:** [viralanalyzer](https://apify.com/viralanalyzer) (community)
- **Categories:** Social media
- **Stats:** 1 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Poster — Auto-Post to Subreddits via Browser — $0.35/post

> English | [Portugues](#portugues)

Post to Reddit subreddits automatically via browser automation. No OAuth app approval needed. Supports text, link, image/video posts, comments, and flair.

---

### Features

| Feature | Description |
|---------|-------------|
| **Text Posts** | Title + Markdown body |
| **Link Posts** | Title + URL |
| **Image/Video** | Upload media directly |
| **Comments** | Reply to any post or comment |
| **Flair Support** | Auto-select subreddit flair |
| **Stealth Mode** | Chrome fingerprint, WebGL spoof, webdriver removal |
| **Residential Proxy** | Apify residential network — avoids IP blocks |
| **Session Persistence** | Cookies saved in KV Store (7-day TTL) |
| **Dry Run** | Test without posting — screenshot proof |

### Pricing

| Usage | Cost |
|-------|------|
| 1 post/comment | $0.35 |
| Trial | 1 free action per run |

Pay-per-event: you only pay for successfully submitted posts or comments.

### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `username` | string | Yes* | Reddit username |
| `password` | string | Yes* | Reddit password |
| `cookies` | string | Yes* | Browser cookies JSON (skip login) |
| `subreddit` | string | Yes** | Target subreddit (without r/) |
| `postTitle` | string | Yes** | Post title |
| `postBody` | string | No | Post body (Markdown) |
| `postType` | select | No | text, link, image, video (default: text) |
| `linkUrl` | string | No | URL for link posts |
| `imageUrl` | string | No | Image URL for image posts |
| `videoUrl` | string | No | Video URL for video posts |
| `flair` | string | No | Post flair text |
| `commentText` | string | No*** | Comment text (reply mode) |
| `commentTargetUrl` | string | No*** | URL to reply to |
| `captchaApiKey` | string | No | 2Captcha API key |
| `proxyCountry` | string | No | Proxy country (default: US) |
| `dryRun` | boolean | No | Test mode — fill form but don't submit |

*Either username+password or cookies. **For posts. ***For comments (both required together).

### Input Examples

#### Text Post
```json
{
    "cookies": "[{\"name\":\"reddit_session\",\"value\":\"...\",\"domain\":\".reddit.com\"}]",
    "subreddit": "marketing",
    "postTitle": "How AI is changing content strategy in 2026",
    "postBody": "We analyzed 25+ platforms and found...",
    "postType": "text",
    "dryRun": false
}
````

#### Comment Reply

```json
{
    "cookies": "...",
    "commentText": "Great insight! We built a tool that does exactly this.",
    "commentTargetUrl": "https://www.reddit.com/r/marketing/comments/abc123/post_title/"
}
```

### Output

```json
{
    "success": true,
    "platform": "reddit",
    "type": "post",
    "subreddit": "marketing",
    "postUrl": "https://www.reddit.com/r/marketing/comments/xyz/...",
    "proof": { "screenshotKey": "proof-reddit-post-2026-04-08" },
    "dryRun": false
}
```

### LGPD / Privacy

- Credentials: `isSecret: true` — encrypted by Apify, never in logs
- Cookies: KV Store with 7-day TTL — auto-expire
- No third-party data accessed — posts to your own account only

***

### Portugues

Poste em subreddits do Reddit automaticamente via automacao de navegador. Sem necessidade de aprovacao OAuth. Suporta posts de texto, links, imagem/video, comentarios e flair.

| Uso | Custo |
|-----|-------|
| 1 post/comentario | $0.35 |
| Trial | 1 acao gratis por run |

**Funcionalidades**: Posts de texto, link, imagem/video, comentarios, flair, stealth mode, proxy residencial, modo dry-run, screenshot de prova.

**Privacidade (LGPD)**: Credenciais criptografadas (`isSecret`), cookies com TTL de 7 dias, nenhum dado de terceiros acessado.

# Actor input Schema

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

Your Reddit username for login.

## `password` (type: `string`):

Your Reddit password.

## `cookies` (type: `string`):

Exported cookies from browser as JSON array. If valid, login is skipped.

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

Target subreddit name (without r/ prefix). Example: 'marketing'

## `postTitle` (type: `string`):

Title of the Reddit post (required for new posts).

## `postBody` (type: `string`):

Body text of the post (supports Markdown).

## `postType` (type: `string`):

Type of post to create.

## `linkUrl` (type: `string`):

URL for link posts.

## `imageUrl` (type: `string`):

URL of image to upload for image posts.

## `imageBase64` (type: `string`):

Base64-encoded image data. Alternative to imageUrl.

## `videoUrl` (type: `string`):

URL of video to upload for video posts (MP4).

## `flair` (type: `string`):

Flair text to apply to the post (if subreddit requires it).

## `commentText` (type: `string`):

If set, posts a comment instead of a new post. Use with commentTargetUrl.

## `commentTargetUrl` (type: `string`):

URL of the post or comment to reply to.

## `captchaApiKey` (type: `string`):

2Captcha or CapSolver API key for automatic CAPTCHA solving.

## `proxyCountry` (type: `string`):

Country code for residential proxy (e.g., US, BR, GB).

## `dryRun` (type: `boolean`):

If true, fills the post form but does NOT submit. Takes screenshot as proof.

## Actor input object example

```json
{
  "postType": "text",
  "proxyCountry": "US",
  "dryRun": false
}
```

# 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 = {};

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

# Run the Actor and wait for it to finish
run = client.actor("viralanalyzer/reddit-poster").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 '{}' |
apify call viralanalyzer/reddit-poster --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Reddit Poster",
        "version": "1.0",
        "x-build-id": "hzxSzuwbXbxxCbzVg"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/viralanalyzer~reddit-poster/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-viralanalyzer-reddit-poster",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/viralanalyzer~reddit-poster/runs": {
            "post": {
                "operationId": "runs-sync-viralanalyzer-reddit-poster",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/viralanalyzer~reddit-poster/run-sync": {
            "post": {
                "operationId": "run-sync-viralanalyzer-reddit-poster",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "username": {
                        "title": "Reddit Username",
                        "type": "string",
                        "description": "Your Reddit username for login."
                    },
                    "password": {
                        "title": "Reddit Password",
                        "type": "string",
                        "description": "Your Reddit password."
                    },
                    "cookies": {
                        "title": "Browser Cookies (JSON)",
                        "type": "string",
                        "description": "Exported cookies from browser as JSON array. If valid, login is skipped."
                    },
                    "subreddit": {
                        "title": "Subreddit",
                        "type": "string",
                        "description": "Target subreddit name (without r/ prefix). Example: 'marketing'"
                    },
                    "postTitle": {
                        "title": "Post Title",
                        "type": "string",
                        "description": "Title of the Reddit post (required for new posts)."
                    },
                    "postBody": {
                        "title": "Post Body",
                        "type": "string",
                        "description": "Body text of the post (supports Markdown)."
                    },
                    "postType": {
                        "title": "Post Type",
                        "enum": [
                            "text",
                            "link",
                            "image",
                            "video"
                        ],
                        "type": "string",
                        "description": "Type of post to create.",
                        "default": "text"
                    },
                    "linkUrl": {
                        "title": "Link URL",
                        "type": "string",
                        "description": "URL for link posts."
                    },
                    "imageUrl": {
                        "title": "Image URL",
                        "type": "string",
                        "description": "URL of image to upload for image posts."
                    },
                    "imageBase64": {
                        "title": "Image Base64",
                        "type": "string",
                        "description": "Base64-encoded image data. Alternative to imageUrl."
                    },
                    "videoUrl": {
                        "title": "Video URL",
                        "type": "string",
                        "description": "URL of video to upload for video posts (MP4)."
                    },
                    "flair": {
                        "title": "Post Flair",
                        "type": "string",
                        "description": "Flair text to apply to the post (if subreddit requires it)."
                    },
                    "commentText": {
                        "title": "Comment Text",
                        "type": "string",
                        "description": "If set, posts a comment instead of a new post. Use with commentTargetUrl."
                    },
                    "commentTargetUrl": {
                        "title": "Comment Target URL",
                        "type": "string",
                        "description": "URL of the post or comment to reply to."
                    },
                    "captchaApiKey": {
                        "title": "CAPTCHA Solver API Key",
                        "type": "string",
                        "description": "2Captcha or CapSolver API key for automatic CAPTCHA solving."
                    },
                    "proxyCountry": {
                        "title": "Proxy Country",
                        "type": "string",
                        "description": "Country code for residential proxy (e.g., US, BR, GB).",
                        "default": "US"
                    },
                    "dryRun": {
                        "title": "Dry Run",
                        "type": "boolean",
                        "description": "If true, fills the post form but does NOT submit. Takes screenshot as proof.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
