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 件

プレイグラウンド

入力
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.
出力準備完了

出力はここに表示されます

入力を完了してから[実行]をクリックしてください。

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.

さらに探索

関連 APIs

すべての APIs
API価格レスポンス
Reddit1回あたり $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 key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/reddit/post-comments に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。

Reddit Post Comments API の料金はいくらですか?

1回あたり $0.0006 から、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。

Reddit Post Comments API はどのパラメータを受け付けますか?

必須: url (string)。 任意: cursor (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。

Reddit Post Comments API は何を返しますか?

同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。

Reddit の開発者アカウントまたは API key は必要ですか?

いいえ。Reddit Post Comments は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Reddit の API アクセスを別途申請する必要はありません。

この Comments API には、post ID か URL のどちらを渡すべきですか?

この endpoint は Reddit の投稿 URL を url として受け取り、任意で cursor も指定できます。チュートリアルでは、公開済みの完全な投稿 URL を使用してください。app の Post Comments 版は別のリクエスト契約です。ここにその post_id や after パラメータを流用しないでください。

返信の関係を保持し、さらにコメントを読むにはどうすればよいですか?

参照情報では data.comments のフラットな配列が示されています。 parentId を親コメントの id に対応付けてください。 parentId が空文字列なら最上位コメントを示します。参照元の親が取得したページに存在しない場合もあるため、その欠落した関連は、返信を最上位コメントとして扱わずに保持してください。完全な data.nextCursor が返された場合は、同じ投稿 URL とともに cursor として送信してください。1 回の応答でスレッド全体が完全であるとは限りません。

このエンドポイントは感情分析を行ったり、Reddit の全コメントを検索したりしますか?

いいえ。指定した投稿 URL のコメントを読み取るだけです。感情の解釈は別の分析ステップであり、サンプルされたスレッドはコミュニティ全体の代表的な指標ではありません。スコアやユーザー名は文脈情報であり、事実の裏付けではありません。公開データのみを使用し、適用されるプラットフォーム規約と利用規則に従ってください。