RedditAPIRedditAPIs
Write

Upvote or Downvote Reddit Posts and Comments

Upvote, downvote, or clear your vote on any Reddit post or comment via a single HTTP call — auto-detects whether the target is a post or comment for you.

POST/api/reddit/vote$0.005 / call

Upvote, downvote, or remove your vote on a Reddit post or comment. Automatically detects whether the target is a post or a comment from the thing_id prefix.

Request Body

Cookies are passed as flat top-level fields (same as /comment).

FieldTypeRequiredDescription
thing_idstringyest3_xxx for a post, t1_xxx for a comment
directionstringyesup, down, or none (clear existing vote)
reddit_sessionstringyesSession cookie from /api/reddit/login
loidstringyesLong-lived account identifier cookie
csrf_tokenstringyesAnti-CSRF cookie
token_v2, edgebucket, csv, session_tracker, pcstringnoExtra Reddit cookies

Example

curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{
    "thing_id": "t3_1spdhgt",
    "direction": "up",
    "reddit_session": "eyJhbGc...",
    "loid": "000000...",
    "token_v2": "eyJhbGc...",
    "csrf_token": "689ea9..."
  }' \
  "https://api.redditapis.com/api/reddit/vote"
const response = await fetch("https://api.redditapis.com/api/reddit/vote", {
  method: "POST",
  headers: {
    Authorization: "Bearer TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    thing_id: "t3_1spdhgt",
    direction: "up",
    reddit_session: "eyJhbGc...",
    loid: "000000...",
    token_v2: "eyJhbGc...",
    csrf_token: "689ea9...",
  }),
});
import requests

response = requests.post(
    "https://api.redditapis.com/api/reddit/vote",
    json={
        "thing_id": "t3_1spdhgt",
        "direction": "up",
        "reddit_session": "eyJhbGc...",
        "loid": "000000...",
        "token_v2": "eyJhbGc...",
        "csrf_token": "689ea9...",
    },
    headers={"Authorization": "Bearer TOKEN"},
)

Success Response

{
  "success": true,
  "thing_id": "t3_1spdhgt",
  "direction": "UP"
}

Direction Values

InputMeaning
up, 1, upvoteUpvote
down, -1, downvoteDownvote
none, 0, clear, unvoteRemove existing vote

Errors

StatusMeaning
400Missing thing_id / direction or required cookies; or thing_id doesn't start with t3_ or t1_
401Missing Bearer token
403Invalid Bearer token
502Could not register the vote (for example, the target post or comment was deleted)
500Unexpected server error

On this page