Sand AISand AI MAGI-2MAGI-2가 이제 SandBase에서 제공됩니다: 네이티브 오디오가 포함된 1080p 동영상지금 사용해 보기

Reddit Post Comments

API 문서
https://api.sandbase.ai/v1/api/reddit/post-comments

List the comments on a Reddit post by URL (author, body, score, timestamp, parent comment). Replies carry the parentId of the comment they answer.

가격
$0.0006부터USD / 호출
메서드
POST
응답
JSON
매개변수
필수 1개 · 선택 사항 1개

Playground

입력
Full Reddit post URL on reddit.com. A gallery link (https://www.reddit.com/gallery/<id>) is read as the post it belongs to, and a relative permalink (/r/<subreddit>/comments/<id>/...) as the same path on https://www.reddit.com.
Cursor from a previous response for more comments.
출력준비됨

출력이 여기에 표시됩니다

입력을 완료한 다음 Run을 클릭하세요.

API README

Reddit Post Comments API

Returns the comments on a Reddit post, with author, body, score, creation time and the parent comment for each reply. It needs the full URL of the post as url.

Use cases

  • Collect the replies to a popular AMA to study which questions got the most upvotes.
  • Rebuild a comment thread as a tree by matching each parentId to a comment id.
  • Pull the top-scored comments on a post to summarize what readers think.
  • Link each comment back to its page on Reddit using its url to review or moderate it.

Request

curl -X POST "https://api.sandbase.ai/v1/api/reddit/post-comments" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
urlstringYesFull Reddit post URL on reddit.com. A gallery link (https://www.reddit.com/gallery/<id>) is read as the post it belongs to, and a relative permalink (/r/<subreddit>/comments/<id>/...) as the same path on https://www.redd
cursorstringNoCursor from a previous response for more comments.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "comments": [
      {
        "author": "Biinaryy",
        "body": "Here is a collection of all the questions and answers:\n\nQuestion: [Link](http://…",
        "createdUtc": 1346276659,
        "id": "c60o0iw",
        "parentId": "",
        "score": 5399,
        "url": "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_…"
      }
    ],
    "media": null,
    "nextCursor": "cur_E_QuTid3jKG5pjQCweyA_g"
  },
  "found": true
}

Response fields

FieldMeaning
data.comments[].authorReddit username of the person who wrote the comment.
data.comments[].bodyText of the comment. It uses Reddit markdown, so links and emphasis appear as markdown.
data.comments[].idID of the comment, for example c60o0iw. Replies point to it in parentId.
data.comments[].parentIdThe id of the comment this one answers. It is an empty string for a top-level comment.
data.comments[].scoreScore of the comment, as a number.
data.comments[].createdUtcCreation time of the comment as a Unix timestamp in seconds (UTC).
data.comments[].urlDirect link to the comment on reddit.com.
data.nextCursorCursor for the next page of comments. Send it as cursor in the next request.
data.mediaMedia attached to the post. It is null in this response.
foundtrue when the post was found. A lookup that finds nothing returns false.

Notes

Need to find a thread first? Search posts within one subreddit. Then follow the Python request walkthrough to read a selected thread without assuming complete comment coverage.

  • Copy the post URL from Reddit. A gallery link or a relative permalink such as /r/<subreddit>/comments/<id>/... also works.
  • To get more comments, repeat the request with the same url and the nextCursor value as cursor.
  • Comments are listed in a flat array. Use parentId to see which comment each reply answers.

Pricing

Billed at the actual cost of each call, about $0.0006 for the request above. Failed calls are not charged.

더 살펴보기

관련 API

모든 API
API가격응답
Reddit호출당 $0.0006부터JSON
Reddit$0.001 / 호출JSON
Reddit$0.001 / 호출JSON
Reddit$0.001 / 호출JSON
Reddit$0.001 / 호출JSON
Reddit$0.001 / 호출JSON

가이드:Best Reddit API in 2026: Pricing Compared

질문

FAQ

Reddit Post Comments API를 어떻게 사용하나요?

Authorization 헤더(Bearer)에 SandBase API 키를 넣고, 매개변수를 JSON 본문으로 담아 https://api.sandbase.ai/v1/api/reddit/post-comments에 POST 요청을 보내세요. 이 페이지의 Playground에서도 코드를 작성하지 않고 직접 테스트할 수 있습니다.

Reddit Post Comments API 비용은 얼마인가요?

호출당 $0.0006부터, SandBase 잔액에서 청구됩니다. 사용한 호출에 대해서만 요금이 부과되며, 구독은 없습니다.

Reddit Post Comments API는 어떤 매개변수를 받나요?

필수: url (string). 선택: cursor (string). 이 페이지의 Parameters 표와 Playground에 모든 필드가 나와 있습니다.

Reddit Post Comments API는 무엇을 반환하나요?

같은 HTTP 요청에서 반환되는 JSON 응답입니다(동기식). 이 페이지의 README에 샘플 응답이 포함되어 있습니다.

Reddit 개발자 계정이나 API 키가 필요한가요?

아니요. Reddit Post Comments은 SandBase를 통해 실행되므로, SandBase API 키 하나로 이 엔드포인트와 카탈로그의 다른 모든 API 및 모델을 사용할 수 있습니다. Reddit API 액세스를 별도로 신청할 필요는 없습니다.

이 Comments API에 post ID를 보내야 하나요, URL을 보내야 하나요?

이 endpoint는 url로 Reddit post URL을 받고, 선택적으로 cursor를 받습니다. 튜토리얼에는 전체 공개 post URL을 사용하세요. app Post Comments 변형은 별도의 요청 계약을 가지므로, 여기에는 post_id나 after parameter를 복사하지 마세요.

답글 관계를 유지하고 더 많은 댓글을 읽으려면 어떻게 하나요?

참조는 평면적인 data.comments 배열을 설명합니다. parentId를 상위 댓글의 id와 일치시키세요. parentId의 빈 문자열은 최상위 댓글을 뜻합니다. 참조된 상위 댓글이 가져온 페이지에 없을 수 있으므로, 답글을 최상위로 처리하지 말고 그 누락된 관계를 그대로 보존하세요. 완전한 data.nextCursor가 반환되면, 같은 게시물 URL과 함께 cursor로 보내세요. 응답 한 번으로 전체 스레드가 보장되지는 않습니다.

이 엔드포인트가 감성 분석을 수행하거나 Reddit 댓글을 전부 검색하나요?

아니요. 제공한 게시물 URL의 댓글을 읽습니다. 감성을 해석하는 것은 별도의 분석 단계이며, 일부만 샘플링한 스레드는 전체 커뮤니티를 대표하는 지표가 아닙니다. 점수와 사용자 이름은 맥락일 뿐 사실 검증이 아닙니다. 공개 데이터만 사용하고 해당 플랫폼과 사용 규칙을 준수하세요.