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/commentPost 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.
| Field | Type | Required | Description |
|---|---|---|---|
post_url | string | Yes | Any reddit.com post URL (new or old UI) |
text | string | Yes | Comment text — plain text, rich-text encoded automatically |
reddit_session | string | Yes | Account session cookie (from /login) |
loid | string | Yes | Account loid cookie (from /login) |
token_v2 | string | No | Reddit token_v2 cookie |
csrf_token | string | No | Reddit CSRF token cookie |
edgebucket | string | No | edgebucket cookie |
csv, session_tracker, pc | string | No | Additional cookies — any top-level string that isn't post_url / text / proxy is treated as a cookie |
proxy | object | No | Caller 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
| Status | Meaning |
|---|---|
400 | missing post_url / text / cookies, or bad proxy shape |
401 | missing Bearer token |
403 | invalid Bearer token |
502 | submit returned non-200, or comment didn't render in DOM |
500 | unexpected 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"},
)