Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Reddit Post

Tài liệu API
https://api.sandbase.ai/v1/api/reddit/post

Fetch a single Reddit post by URL, including its full body text, score, comment count, upvote ratio, and subreddit, as normalized JSON.

Giá
Từ $0.0005USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 0 tùy chọn

Phòng thử nghiệm

Đầu vào
Reddit post URL on reddit.com, e.g. "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/". The /r/<subreddit>/comments/<id>/, /user/<name>/comments/<id>/, /comments/<id>/ and /gallery/<id> forms are accepted. Any other link, such as a share link or a link to another site, is refused as invalid input, with no charge.
Đầu raSẵn sàng

Đầu ra của bạn sẽ xuất hiện ở đây

Hoàn tất đầu vào, rồi nhấp Run.

README API

Reddit Post API

Returns one Reddit post as JSON, including its title, full body text, author, score, comment count, upvote ratio, and subreddit. It needs a single Reddit post url on reddit.com.

Use cases

  • Archive the text and score of a specific Reddit thread for a research dataset.
  • Check how well a linked post performed by reading its score, numComments, and upvoteRatio.
  • Flag NSFW or locked posts before showing them in a content feed.
  • Resolve a post URL to its id, subreddit, and author for later lookups.

Request

curl -X POST "https://api.sandbase.ai/v1/api/reddit/post" \
  -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
urlstringYesReddit post URL on reddit.com, e.g. "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/". The /r/<subreddit>/comments/<id>/, /user/<name>/comments/<id>/, /comments/<id>/ and /g

Example response

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

{
  "data": {
    "author": "PresidentObama",
    "authorId": "8t1cq",
    "body": "Hi, I’m Barack Obama, President of the United States. Ask me anything. I’ll be t…",
    "createdUtc": 1346270496,
    "domain": "self.IAmA",
    "editedUtc": 1346276503,
    "id": "z1c9z",
    "image": "https://external-preview.redd.it/KftOKw5o_G5ug7ENkLFbplFDpcApH0MvkQoOQD4nKng.jpg…",
    "isArchived": true,
    "isLocked": false,
    "isNsfw": false,
    "numComments": 22716
  },
  "found": true
}

Response fields

FieldMeaning
data.titleTitle of the post.
data.bodyFull text of the post. Link or image posts may have little or no text here.
data.author / data.authorIdUsername of the post author and the author's ID.
data.subredditName of the subreddit the post belongs to, without the r/ prefix.
data.score / data.numCommentsNet score of the post and the number of comments on it.
data.upvoteRatioShare of votes that were upvotes, as a decimal between 0 and 1.
data.createdUtc / data.editedUtcCreation time and last edit time of the post, as Unix timestamps in seconds.
data.isArchived / data.isLocked / data.isNsfwBoolean flags for archived, locked, and NSFW status.
data.permalink / data.urlPath of the post on Reddit and its full URL.
foundtrue when the post was found. A lookup that finds nothing returns found: false.

Notes

  • Send the post link in url. The /r/<subreddit>/comments/<id>/, /user/<name>/comments/<id>/, /comments/<id>/ and /gallery/<id> forms are accepted. Share links and links to other sites are refused as invalid input.
  • The post id is the short code in the URL, such as z1c9z.
  • To read the replies to a post, call Reddit Post Comments.
  • To list more posts from the same community, call Reddit Subreddit Posts.

Pricing

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

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Reddit PostAPI này
Reddit
Từ $0.0005 mỗi lần gọiJSON
Reddit$0.001 mỗi lần gọiJSON
Reddit$0.001 mỗi lần gọiJSON
Reddit$0.001 mỗi lần gọiJSON
Reddit$0.001 mỗi lần gọiJSON
Reddit$0.001 mỗi lần gọiJSON

Hướng dẫn:Best Reddit API in 2026: Pricing Compared

Câu hỏi

FAQ

Làm thế nào để dùng API Reddit Post?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/reddit/post với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Reddit Post có giá bao nhiêu?

Từ $0.0005 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API Reddit Post chấp nhận những tham số nào?

Bắt buộc: url (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Reddit Post trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Reddit không?

Không. Reddit Post chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Reddit.