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

Reddit Trending Posts

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

Get currently trending Reddit posts across all subreddits with stable cursor pagination.

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

Phòng thử nghiệm

Đầu vào
Pagination cursor from a previous response's nextCursor. Omit for the first page.
1100
Maximum number of trending posts to return (1-100, default 25). Phạm vi: 1 đến 100.
Đầ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 Trending Posts API

Returns a list of Reddit posts that are currently trending across all subreddits. Each post includes its title, subreddit, author, score, comment count, and link. The only inputs are an optional page size (limit) and an optional cursor (after).

Use cases

  • Track which topics are trending on Reddit right now and in which subreddits.
  • Build a feed or dashboard that shows the top trending posts with their scores and comment counts.
  • Spot fast-growing posts by comparing score and numComments across calls.
  • Collect trending post links and domain values to see which sites and image hosts get shared most.

Request

curl -X POST "https://api.sandbase.ai/v1/api/reddit/trending-posts" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit": 25}'

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

Parameters

NameTypeRequiredDescription
afterstringNoPagination cursor from a previous response's nextCursor. Omit for the first page.
limitintegerNoMaximum number of trending posts to return (1-100, default 25).

Example response

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

{
  "data": {
    "nextCursor": "t3_1xmlmgw",
    "posts": [
      {
        "author": "Negative_1by12_aura",
        "authorId": "2eyayz4qcy",
        "createdUtc": 1793676776,
        "domain": "i.redd.it",
        "id": "1xmids8",
        "isArchived": false,
        "isLocked": false,
        "nsfw": false,
        "numComments": 801,
        "permalink": "/r/interesting/comments/1xmids8/hiv_is_no_longer_a_terminal_disease/",
        "score": 21475,
        "selftext": ""
      }
    ]
  },
  "found": true
}

Response fields

FieldMeaning
data.posts[].idPost ID without a prefix. Use it to look up the post in other APIs.
data.posts[].titleTitle of the post.
data.posts[].subredditName of the subreddit where the post was made.
data.posts[].author / data.posts[].authorIdUsername and ID of the post author.
data.posts[].score / data.posts[].numCommentsPost score and number of comments.
data.posts[].upvoteRatioShare of votes that are upvotes, as a decimal between 0 and 1 (for example 0.94).
data.posts[].createdUtcCreation time of the post as a Unix timestamp in seconds.
data.posts[].permalink / data.posts[].urlpermalink is the Reddit path of the post. url is the link the post points to, such as an image.
data.posts[].isArchived / data.posts[].isLocked / data.posts[].nsfwBoolean flags for archived posts, locked posts, and posts marked NSFW.
data.nextCursorCursor for the next page. Pass it as after in the next request.

Notes

  • For the first page, omit after. For the next page, send the value of data.nextCursor as after.
  • limit accepts 1 to 100 and defaults to 25.
  • selftext is empty for link and image posts, so text only appears for text posts.
  • To read a post in full, call Reddit Post Details. To list comments, use Reddit Post Comments.

Pricing

Billed at the actual cost of each call, about $0.0003 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
RedditTừ $0.0003 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 Trending Posts?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/reddit/trending-posts 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 Trending Posts có giá bao nhiêu?

Từ $0.0003 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 Trending Posts chấp nhận những tham số nào?

Không có tham số bắt buộc. Tùy chọn: after (string) và limit (integer). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Reddit Trending Posts 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 Trending Posts 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.