Reddit API
Write

Comment

Post a comment on any Reddit thread programmatically. Runs inside headless Chromium and handles reCAPTCHA, CSRF tokens, and rich-text encoding automatically.

POST/api/reddit/comment

Post a comment on any Reddit post using browser-pool automation. Handles reCAPTCHA, CSRF, and rich-text encoding automatically inside headless Chromium.

Request Body

Cookies are passed as flat top-level fields.

FieldTypeRequiredDescription
post_urlstringYesAny reddit.com post URL (new or old UI)
textstringYesComment text — plain text, rich-text encoded automatically
reddit_sessionstringYesAccount session cookie (from /login)
loidstringYesAccount loid cookie (from /login)
token_v2stringNoReddit token_v2 cookie
csrf_tokenstringNoReddit CSRF token cookie
edgebucketstringNoedgebucket cookie
csv, session_tracker, pcstringNoAdditional cookies — any top-level string that isn't post_url / text / proxy is treated as a cookie
proxyobjectNoCaller sticky IP — {server, username, password}. Recommended to match /login proxy.
{
  "post_url":       "https://www.reddit.com/r/X/comments/.../",
  "text":           "your comment text",

  "reddit_session": "...",
  "loid":           "...",
  "token_v2":       "...",
  "csrf_token":     "...",

  "proxy": {
    "server":   "http://host:port",
    "username": "...",
    "password": "..."
  }
}

Response (200)

{
  "success": true,
  "author": "CalmOrganization7179",
  "comment_id": "t1_ohfsdj0",
  "permalink": "https://www.reddit.com/r/X/comments/.../comment/ohfsdj0/",
  "body": "your comment text",
  "timing": {
    "total":  11460,
    "setup":     29,
    "nav":     4314,
    "type":    3143,
    "submit":   662
  }
}

Errors

StatusMeaning
400missing post_url / text / cookies, or bad proxy shape
401missing Bearer token
403invalid Bearer token
502submit returned non-200, or comment didn't render in DOM
500unexpected Playwright/server error

Example

curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{
    "post_url": "https://www.reddit.com/r/test/comments/xxx/title/",
    "text": "hello from api",
    "reddit_session": "eyJhbGc...",
    "loid": "000000...",
    "token_v2": "eyJhbGc...",
    "csrf_token": "689ea9..."
  }' \
  "https://api.redditapis.com/api/reddit/comment"
const response = await fetch("https://api.redditapis.com/api/reddit/comment", {
  method: "POST",
  headers: {
    Authorization: "Bearer TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    post_url: "https://www.reddit.com/r/test/comments/xxx/title/",
    text: "hello from api",
    reddit_session: "eyJhbGc...",
    loid: "000000...",
    token_v2: "eyJhbGc...",
    csrf_token: "689ea9...",
  }),
});
import requests

response = requests.post(
    "https://api.redditapis.com/api/reddit/comment",
    json={
        "post_url": "https://www.reddit.com/r/test/comments/xxx/title/",
        "text": "hello from api",
        "reddit_session": "eyJhbGc...",
        "loid": "000000...",
        "token_v2": "eyJhbGc...",
        "csrf_token": "689ea9...",
    },
    headers={"Authorization": "Bearer TOKEN"},
)

On this page