Sand AISand AI MAGI-2ตอนนี้ MAGI-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.0006USD / คำขอ
Method
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.

สำรวจเพิ่มเติม

APIs ที่เกี่ยวข้อง

APIs ทั้งหมด
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

คำถาม

คำถามที่พบบ่อย

ฉันจะใช้ Reddit Post Comments API ได้อย่างไร?

ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/reddit/post-comments โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด

Reddit Post Comments API ราคาเท่าไร?

เริ่มต้นที่ $0.0006 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน

Reddit Post Comments API รับพารามิเตอร์อะไรบ้าง?

ที่ต้องระบุ: url (string). ตัวเลือก: cursor (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์

Reddit Post Comments API ส่งคืนอะไร?

การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ

ฉันจำเป็นต้องมีบัญชีนักพัฒนาหรือ API key ของ Reddit ไหม?

ไม่จำเป็น Reddit Post Comments ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Reddit API แยกต่างหาก

ฉันควรส่ง post ID หรือ URL ไปยัง Comments API นี้?

endpoint นี้รับ URL ของ Reddit post เป็น url พร้อม cursor แบบเลือกได้ ใช้ URL โพสต์สาธารณะฉบับเต็มสำหรับบทแนะนำ app Post Comments variant มีสัญญาคำขอแยกต่างหาก; อย่านำ post_id หรือ after parameters จากที่นั่นมาใช้ที่นี่

ฉันจะคงความสัมพันธ์ของการตอบกลับและอ่านคอมเมนต์เพิ่มเติมได้อย่างไร?

เอกสารอ้างอิงอธิบายอาร์เรย์ data.comments แบบแบน จับ parentId ให้ตรงกับ id ของคอมเมนต์แม่; สตริงว่างใน parentId หมายถึงคอมเมนต์ระดับบนสุด คอมเมนต์แม่ที่อ้างอิงอาจไม่มีอยู่ในหน้าที่คุณดึงมา ดังนั้นให้คงความสัมพันธ์ที่หายไปนั้นไว้ แทนที่จะมองว่าคำตอบเป็นคอมเมนต์ระดับบนสุด หากมีการส่งกลับ data.nextCursor แบบสมบูรณ์ ให้ส่งต่อเป็น cursor พร้อม post URL เดิม การตอบเพียงครั้งเดียวไม่ได้รับประกันว่าจะได้เธรดที่สมบูรณ์

เอ็นด์พอยต์นี้ทำ sentiment analysis หรือค้นหาคอมเมนต์ Reddit ทุกข้อความหรือไม่?

ไม่ มันอ่านคอมเมนต์สำหรับ post URL ที่คุณระบุ การตีความ sentiment เป็นขั้นตอนการวิเคราะห์แยกต่างหาก และเธรดตัวอย่างไม่ได้เป็นตัวแทนของทั้งคอมมูนิตี้ คะแนนและชื่อผู้ใช้เป็นข้อมูลบริบท ไม่ใช่การยืนยันข้อเท็จจริง ใช้เฉพาะข้อมูลสาธารณะและปฏิบัติตามกฎของแพลตฟอร์มและการใช้งานที่เกี่ยวข้อง