YepAPI
Reddit API

Subreddit Comments API

Get the latest comments posted anywhere in a subreddit, with author, score, and the post each comment belongs to. JSON, $0.01 per call.

POST/v1/reddit/subreddit-comments
$0.01/call

Returns the newest comments across a whole subreddit — a live feed of the community's conversation. Each comment carries the title and URL of the post it was left on. For the comment tree of a single post, use the Reddit Comments API.

Usage

const res = await fetch('https://api.yepapi.com/v1/reddit/subreddit-comments', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"subreddit": "python"}),
});
const { data } = await res.json();
console.log(data);
curl -X POST https://api.yepapi.com/v1/reddit/subreddit-comments \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subreddit": "python"}'
import requests

res = requests.post(
    "https://api.yepapi.com/v1/reddit/subreddit-comments",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={"subreddit": "python"},
)
print(res.json()["data"])

Request Body

ParameterTypeRequiredDescriptionDefault
subredditstringYesSubreddit name — python, r/python, or a reddit.com/r/python URL (2–21 characters)—
cursorstringNocursor from the previous response, to fetch the next page—

Response

{
  "ok": true,
  "data": {
    "comments": [
      {
        "author": "Amazing_Learn",
        "body": "Maybe, that can happen, if you look into the current [source](https://github.com/notypecheck/passlib/blob/73370df5fd9d1b864d3a1f7a6cd0b1c800ef8523/passlib/handlers/argon2.py#L106-L113) it is a bit tri…",
        "created_at": "2026-10-30T23:12:36+00:00",
        "created_utc": 1793401956,
        "edited": false,
        "id": "19rwhoa1trgqt",
        "is_submitter": true,
        "name": "t1_19rwhoa1trgqt",
        "parent_id": "t1_19rwhb2qcl1fn",
        "permalink": "https://www.reddit.com/r/Python/comments/1xj74pw/im_now_maintaining_passlib/19rwhoa1trgqt/",
        "post_id": "t3_1xj74pw",
        "post_title": "I'm now maintaining passlib",
        "post_url": "https://www.reddit.com/r/Python/comments/1xj74pw/im_now_maintaining_passlib/",
        "score": 1,
        "stickied": false,
        "subreddit": "Python"
      },
      {
        "author": "maikeu",
        "body": "Maybe I am recalling a different smaller library :o ",
        "created_at": "2026-10-30T23:04:23+00:00",
        "created_utc": 1793401463,
        "edited": false,
        "id": "19rwhb2qcl1fn",
        "is_submitter": false,
        "name": "t1_19rwhb2qcl1fn",
        "parent_id": "t1_19rwgybuvlabm",
        "permalink": "https://www.reddit.com/r/Python/comments/1xj74pw/im_now_maintaining_passlib/19rwhb2qcl1fn/",
        "post_id": "t3_1xj74pw",
        "post_title": "I'm now maintaining passlib",
        "post_url": "https://www.reddit.com/r/Python/comments/1xj74pw/im_now_maintaining_passlib/",
        "score": 2,
        "stickied": false,
        "subreddit": "Python"
      }
    ],
    "cursor": "t1_19rvzzpcbll7l"
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.commentsobject[]Latest comments, newest first
data.comments[].idstringComment ID
data.comments[].namestringFullname, t1_ + ID
data.comments[].authorstringAuthor username
data.comments[].bodystringComment text in Markdown
data.comments[].scorenumberNet upvotes
data.comments[].subredditstringSubreddit name
data.comments[].permalinkstringFull URL of the comment
data.comments[].parent_idstringFullname of the parent (t1_ comment or t3_ post)
data.comments[].post_idstringFullname of the post the comment is on
data.comments[].post_titlestringTitle of that post
data.comments[].post_urlstringURL of that post
data.comments[].created_utcnumberUnix timestamp (seconds)
data.comments[].created_atstringISO 8601 timestamp
data.comments[].editedbooleanComment was edited
data.comments[].stickiedbooleanPinned by moderators
data.comments[].is_submitterbooleanAuthor is the post's author (OP)
data.cursorstring | nullCursor for the next page

Pagination

Each response includes a cursor. Send the same request again with that value in cursor to get the next page. When cursor is null, there are no more results. A query with no matches returns 200 with an empty list and cursor: null. Every page is a separate $0.01 call.

Caching

Responses are cached for 15 minutes.

Errors

StatusCodeWhen
400VALIDATION_ERRORsubreddit is missing or not a valid subreddit name
429RATE_LIMITED_UPSTREAMToo many requests in a short burst — retry after a few seconds
502UPSTREAM_ERRORTemporary problem fetching data from Reddit — retry

Failed calls are not charged.

On this page