Reddit API
Schedule and automate Reddit posts with Zernio API - Text posts, link posts, image posts, subreddit targeting, flair selection, and gallery posts
Quick Reference
| Property | Value |
|---|---|
| Title limit | 300 characters (required, cannot edit after) |
| Body text | 40,000 characters |
| Images per post | 1 (single), multiple (gallery) |
| Videos per post | Not supported via API |
| Image formats | JPEG, PNG, GIF |
| Image max size | 20 MB |
| Post types | Text, Link, Image, Gallery |
| Scheduling | Yes |
| Inbox (DMs) | Yes (add-on, text only) |
| Inbox (Comments) | Yes (add-on) |
| Analytics | No |
Before You Start
Reddit is fundamentally different from every other platform. Each subreddit (community) is independently moderated with its own rules. There is no universal set of rules. What works in one subreddit will get you banned in another.
Before posting to any subreddit via API, you must:
- Check if the subreddit allows your post type (text, link, or image)
- Check if flair is required (many subreddits auto-remove posts without flair)
- Check if the subreddit allows third-party/automated posting
- Check karma and account age requirements
More than half of all Reddit posts via Zernio fail. Almost every failure is preventable by reading the target subreddit's rules first.
Additional warnings:
- Title is permanent -- Reddit titles cannot be edited after posting
- New accounts are restricted -- Low karma and new account age will block most subreddits
- No video uploads -- Reddit's API does not support video uploads for third-party apps
- Each subreddit has unique, independent rules -- Always check before posting
Quick Start
Post to Reddit in under 60 seconds:
const { post } = await zernio.posts.createPost({
content: "What is your favorite programming language and why?\n\nI have been using Python for years but considering learning Rust.",
platforms: [
{
platform: 'reddit',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
subreddit: 'learnprogramming'
}
}
],
publishNow: true
});
console.log('Posted to Reddit!', post._id);result = client.posts.create(
content="What is your favorite programming language and why?\n\nI have been using Python for years but considering learning Rust.",
platforms=[
{
"platform": "reddit",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"subreddit": "learnprogramming"
}
}
],
publish_now=True
)
post = result.post
print(f"Posted to Reddit! {post['_id']}")curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "What is your favorite programming language and why?\n\nI have been using Python for years but considering learning Rust.",
"platforms": [
{
"platform": "reddit",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"subreddit": "learnprogramming"
}
}
],
"publishNow": true
}'Content Types
Text Post (Self Post)
A text post with a title and optional body. This is the default post type when no media or URL is provided. The first line of content becomes the title, and the rest becomes the body. Reddit Markdown is supported in the body.
const { post } = await zernio.posts.createPost({
content: "Tips for learning a new programming language\n\nHere are some things that worked for me:\n\n1. Start with the official tutorial\n2. Build a small project immediately\n3. Read other people's code\n4. Contribute to open source",
platforms: [
{
platform: 'reddit',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
subreddit: 'learnprogramming'
}
}
],
publishNow: true
});
console.log('Text post created!', post._id);result = client.posts.create(
content="Tips for learning a new programming language\n\nHere are some things that worked for me:\n\n1. Start with the official tutorial\n2. Build a small project immediately\n3. Read other people's code\n4. Contribute to open source",
platforms=[
{
"platform": "reddit",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"subreddit": "learnprogramming"
}
}
],
publish_now=True
)
post = result.post
print(f"Text post created! {post['_id']}")curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Tips for learning a new programming language\n\nHere are some things that worked for me:\n\n1. Start with the official tutorial\n2. Build a small project immediately\n3. Read other people'\''s code\n4. Contribute to open source",
"platforms": [
{
"platform": "reddit",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"subreddit": "learnprogramming"
}
}
],
"publishNow": true
}'Link Post
Share an external URL. When platformSpecificData.url is provided, Reddit creates a link post instead of a text post. The content becomes the post title.
const { post } = await zernio.posts.createPost({
content: 'Interesting article about modern API design patterns',
platforms: [
{
platform: 'reddit',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
subreddit: 'programming',
url: 'https://example.com/api-design-article'
}
}
],
publishNow: true
});
console.log('Link post created!', post._id);result = client.posts.create(
content="Interesting article about modern API design patterns",
platforms=[
{
"platform": "reddit",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"subreddit": "programming",
"url": "https://example.com/api-design-article"
}
}
],
publish_now=True
)
post = result.post
print(f"Link post created! {post['_id']}")curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Interesting article about modern API design patterns",
"platforms": [
{
"platform": "reddit",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"subreddit": "programming",
"url": "https://example.com/api-design-article"
}
}
],
"publishNow": true
}'Image Post
Attach a single image to a post. The content becomes the post title.
const { post } = await zernio.posts.createPost({
content: 'Check out this view from my hike!',
mediaItems: [
{ type: 'image', url: 'https://example.com/hiking-photo.jpg' }
],
platforms: [
{
platform: 'reddit',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
subreddit: 'hiking'
}
}
],
publishNow: true
});
console.log('Image post created!', post._id);result = client.posts.create(
content="Check out this view from my hike!",
media_items=[
{"type": "image", "url": "https://example.com/hiking-photo.jpg"}
],
platforms=[
{
"platform": "reddit",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"subreddit": "hiking"
}
}
],
publish_now=True
)
post = result.post
print(f"Image post created! {post['_id']}")curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Check out this view from my hike!",
"mediaItems": [
{"type": "image", "url": "https://example.com/hiking-photo.jpg"}
],
"platforms": [
{
"platform": "reddit",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"subreddit": "hiking"
}
}
],
"publishNow": true
}'Gallery Post
Attach multiple images to create a gallery post. Not all subreddits support galleries.
const { post } = await zernio.posts.createPost({
content: 'My weekend woodworking project - start to finish',
mediaItems: [
{ type: 'image', url: 'https://example.com/step1.jpg' },
{ type: 'image', url: 'https://example.com/step2.jpg' },
{ type: 'image', url: 'https://example.com/step3.jpg' },
{ type: 'image', url: 'https://example.com/finished.jpg' }
],
platforms: [
{
platform: 'reddit',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
subreddit: 'woodworking'
}
}
],
publishNow: true
});
console.log('Gallery post created!', post._id);result = client.posts.create(
content="My weekend woodworking project - start to finish",
media_items=[
{"type": "image", "url": "https://example.com/step1.jpg"},
{"type": "image", "url": "https://example.com/step2.jpg"},
{"type": "image", "url": "https://example.com/step3.jpg"},
{"type": "image", "url": "https://example.com/finished.jpg"}
],
platforms=[
{
"platform": "reddit",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"subreddit": "woodworking"
}
}
],
publish_now=True
)
post = result.post
print(f"Gallery post created! {post['_id']}")curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "My weekend woodworking project - start to finish",
"mediaItems": [
{"type": "image", "url": "https://example.com/step1.jpg"},
{"type": "image", "url": "https://example.com/step2.jpg"},
{"type": "image", "url": "https://example.com/step3.jpg"},
{"type": "image", "url": "https://example.com/finished.jpg"}
],
"platforms": [
{
"platform": "reddit",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"subreddit": "woodworking"
}
}
],
"publishNow": true
}'Media Requirements
Images
| Property | Requirement |
|---|---|
| Max images | 1 per post (single), multiple (gallery) |
| Formats | JPEG, PNG, GIF |
| Max file size | 20 MB |
| Recommended | 1200 x 628 px |
Aspect Ratios
Reddit is flexible with aspect ratios:
| Ratio | Use Case |
|---|---|
| 16:9 | Standard landscape |
| 4:3 | Classic format |
| 1:1 | Square images |
| 9:16 | Mobile screenshots |
GIFs
- Static display until clicked
- Max 20 MB
- May convert to video format internally
- Keep under 10 MB for better performance
Platform-Specific Fields
All fields go inside platformSpecificData on the Reddit platform entry.
| Field | Type | Required | Description |
|---|---|---|---|
subreddit | string | Effectively yes | Target subreddit (without r/ prefix). Falls back to account default if omitted. Aliases: subredditName, sr |
title | string | Yes (by Reddit) | Post title, max 300 characters. Cannot be edited after posting. If omitted, first line of content is used. |
url | string | No | External URL for link posts. If provided, creates a link post instead of a text post. |
flairId | string | Varies | Reddit flair ID. Many subreddits require this. Get flairs via GET /v1/accounts/{accountId}/reddit-flairs?subreddit=NAME. Aliases: redditFlairId |
forceSelf | boolean | No | Force text/self post even when media is attached. |
Subreddit Selection
Posts are submitted to the subreddit configured on the connected Reddit account by default. To post to a specific subreddit, set platformSpecificData.subreddit (without the r/ prefix).
Post Flairs
Some subreddits require a post flair. First, list available flairs for a subreddit:
const { flairs } = await zernio.accounts.getRedditFlairs('YOUR_ACCOUNT_ID', {
subreddit: 'socialmedia'
});
console.log(flairs);result = client.accounts.get_reddit_flairs(
"YOUR_ACCOUNT_ID",
subreddit="socialmedia"
)
print(result.flairs)curl -X GET "https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/reddit-flairs?subreddit=socialmedia" \
-H "Authorization: Bearer YOUR_API_KEY"Then, create a post with flairId:
const { post } = await zernio.posts.createPost({
content: 'What is your favorite programming language and why?',
platforms: [
{
platform: 'reddit',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
subreddit: 'socialmedia',
flairId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
}
}
],
publishNow: true
});
console.log('Posted to Reddit!', post._id);result = client.posts.create(
content="What is your favorite programming language and why?",
platforms=[
{
"platform": "reddit",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"subreddit": "socialmedia",
"flairId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
],
publish_now=True
)
post = result.post
print(f"Posted to Reddit! {post['_id']}")curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "What is your favorite programming language and why?",
"platforms": [
{
"platform": "reddit",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"subreddit": "socialmedia",
"flairId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
],
"publishNow": true
}'If a subreddit requires a flair and you do not provide flairId, Zernio will attempt to use the first available flair as a fallback.
Formatting
Reddit supports Markdown in text post bodies:
# Heading
## Subheading
**Bold text**
*Italic text*
~~Strikethrough~~
- Bullet points
1. Numbered lists
[Link text](https://example.com)
> Block quotes
`inline code`Auto-Retry Behavior
Zernio automatically retries failed Reddit posts in certain situations:
- Link post in text-only subreddit -- If a link post fails with a
NO_LINKSerror (subreddit only allows text posts), Zernio auto-retries as a text/self post with the URL included in the body. - Missing required flair -- If a subreddit requires flair but none was provided, Zernio tries to use the first available flair automatically.
Analytics
Requires Analytics add-on
Available metrics via the Analytics API:
| Metric | Available |
|---|---|
| Likes (upvotes) | ✅ |
| Comments | ✅ |
Reddit does not provide impressions, reach, shares, clicks, or view counts through its API.
const analytics = await zernio.analytics.getAnalytics({
platform: 'reddit',
fromDate: '2024-01-01',
toDate: '2024-01-31'
});
console.log(analytics.posts);analytics = client.analytics.get(
platform="reddit",
from_date="2024-01-01",
to_date="2024-01-31"
)
print(analytics["posts"])curl "https://zernio.com/api/v1/analytics?platform=reddit&fromDate=2024-01-01&toDate=2024-01-31" \
-H "Authorization: Bearer YOUR_API_KEY"What You Can't Do
These features are not available through Reddit's API:
- Upload videos (Reddit API limitation for third-party apps)
- Create polls
- Crosspost to other subreddits
- Edit post title after creation
- Add post to collections
- Create live chat threads
- Award/give gold to posts
- See upvote/downvote counts (score only)
If you need to post videos to Reddit, upload to a video hosting service (YouTube, Imgur, etc.) and create a link post with the video URL.
Common Errors
Reddit has a 53.9% failure rate across Zernio's platform (4,785 failures out of 8,877 attempts). Here are the most frequent errors and how to fix them:
| Error | What it means | How to fix |
|---|---|---|
| "SUBREDDIT_NOTALLOWED: only trusted members" | Subreddit restricts who can post | Join the community, build karma, or choose a different subreddit |
| "NO_SELFS: doesn't allow text posts" | Subreddit only accepts link or image posts | Provide a URL via platformSpecificData.url or attach an image |
| "SUBMIT_VALIDATION_FLAIR_REQUIRED" | Subreddit requires flair on all posts | Fetch flairs with GET /v1/accounts/{accountId}/reddit-flairs?subreddit=NAME and provide the correct flairId |
| "SUBREDDIT_NOEXIST" | Typo in subreddit name or subreddit is private | Check spelling, do not include the r/ prefix |
| "AI-generated content not allowed" | Subreddit bans AI-generated content | Write original content or choose a different subreddit |
| "Reddit removed the post" | Moderators or AutoMod removed the post after submission | Check subreddit rules, ensure content complies |
| "Reddit requires a subreddit" | No subreddit was specified and no default is set | Always provide platformSpecificData.subreddit |
| "Rate limited" | Reddit's rate limit was hit | Space posts further apart. New accounts are limited to around 10 posts per day. |
Inbox
Requires Inbox add-on — Build: +$10/mo · Accelerate: +$50/unit · Unlimited: +$1,000/mo
Reddit supports DMs (private messages) and comments.
Direct Messages
| Feature | Supported |
|---|---|
| List conversations | ✅ |
| Fetch messages | ✅ |
| Send text messages | ✅ |
| Send attachments | ❌ (API limitation) |
| Archive/unarchive | ✅ |
Comments
| Feature | Supported |
|---|---|
| List comments on posts | ✅ |
| Reply to comments | ✅ |
| Delete comments | ✅ |
| Upvote/downvote | ✅ |
| Remove vote | ✅ |
Limitations
- No DM attachments - Reddit's API does not support media in private messages
- Subreddit required - When replying to comments, you must provide the
subredditparameter
See Messages and Comments API Reference for endpoint details.
Related Endpoints
- Connect Reddit Account - OAuth flow
- Create Post - Post creation and scheduling
- Upload Media - Image uploads
- Reddit Search - Search Reddit content
- Reddit Subreddits - List subscribed subreddits
- Reddit Flairs - Get available flairs for a subreddit
- Messages and Comments - Inbox API