Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Reddit User Posts

API 文件
https://api.sandbase.ai/v1/api/reddit/app/user-posts

Returns a list of posts submitted by a specified Reddit user. Results can be sorted by new, top, hot, or controversial order with optional formatting.

價格
$0.001美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 3 個選填

Playground

輸入
Reddit username
Pagination parameter for fetching next page
Whether to clean and format the data
Sort method, options: NEW (newest), TOP (top rated), HOT (hot), CONTROVERSIAL (controversial)
輸出範例
回應outputs · 38.6 KB · 758 行
[
  {
    "data": {
      "identity": {
        "settings": {
          "postSetSettings": {
            "maxPostsPerPostSet": 5
          }
        }
      },
      "postFeed": {
        "__typename": "Redditor",
        "elements": {
          "dist": null,
          "edges": [
            {
              "node": {
                "__typename": "ProfilePost",
                "adSupplementaryTextRichtext": null,
                "attributionInfo": null,
                "authorFlair": null,
                "authorInfo": {
                  "__typename": "Redditor",
                  "accountType": "USER",
                  "iconSmall": {
                    "__typename": "MediaSource",
                    "dimensions": {
                      "height": 50,
                      "width": 50
                    },
                    "url": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png?width=50&height=50&frame=1&auto=webp&crop=50%3A50%2Csmart&s=638708ec49d2051716871e62d0b8a9da3b11402c"
                  },
                  "id": "t2_1w72",
                  "isBlocked": false,
                  "isCakeDayNow": false,
                  "name": "spez",
                  "newIcon": {
                    "__typename": "MediaSource",
                    "dimensions": {
                      "height": 256,
                      "width": 256
                    },
                    "url": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png?frame=1&auto=webp&crop=256%3A256%2Csmart&s=54cdc94b6359f38240017e6737d3c56933e0206b"
                  },
                  "profile": {
                    "isNsfw": false
                  },
                  "snoovatarIcon": null
                },
                "callToAction": null,
                "commentCount": 418,
                "content": {
                  "html": "Hi everyone,\nLast May, I shared how we were building Reddit for its next chapter. I owe you an update, including a few changes I know some people will have strong opinions about.\nWhile we’ve made upgrades to the platform over the last 21 years, we need to continually evolve to meet the rising expectations of everyone—mods, users, developers. Namely, starting and moderating a community should be easier than it is today. New users should be able to easily discover and participate in communities they’re interested in. And we need to make it harder for bad actors to scrape and sell Reddit data.\nWh…",
                  "markdown": "Hi everyone,\n\nLast May, I shared how we were building Reddit for its [next chapter](https://www.reddit.com/user/spez/comments/1kfciml/reddits_next_chapter_smarter_easier_still_human/). I owe you an update, including a few changes I know some people will have strong opinions about.\n\nWhile we’ve made upgrades to the platform over the last [21 years](https://www.reddit.com/user/spez/comments/1u7hraf/21_years_of_reddit/), we need to continually evolve to meet the rising expectations of everyone—mods, users, developers. Namely, starting and moderating a community should be easier than it is today. …",
                  "preview": "Hi everyone, Last May, I shared how we were building Reddit for its next chapter. I owe you an update, including a few changes I know some people will have strong opinions about. While we’ve made upgrades to the platform over the last 21 years, we need to continually evolve to meet the rising expect",
                  "richtext": "{\"document\":[{\"c\":[{\"e\":\"text\",\"t\":\"Hi everyone,\"}],\"e\":\"par\"},{\"c\":[{\"e\":\"text\",\"t\":\"Last May, I shared how we were building Reddit for its \"},{\"e\":\"link\",\"t\":\"next chapter\",\"u\":\"https://www.reddit.com/user/spez/comments/1kfciml/reddits_next_chapter_smarter_easier_still_human/\"},{\"e\":\"text\",\"t\":\". I owe you an update, including a few changes I know some people will have strong opinions about.\"}],\"e\":\"par\"},{\"c\":[{\"e\":\"text\",\"t\":\"While we\\u2019ve made upgrades to the platform over the last \"},{\"e\":\"link\",\"t\":\"21 years\",\"u\":\"https://www.reddit.com/user/spez/comments/1u7hraf/21_years_of_reddit/\"…",
                  "richtextMedia": []
                },
                "createdAt": "2026-08-05T16:03:56.264000+0000",
                "crosspostRoot": null,
                "crowdControlLevel": "OFF",
                "devvit": null,
                "distinguishedAs": "ADMIN",
                "domain": "self.spez",
                "editedAt": "2026-08-05T16:14:48.112000+0000",
                "flair": null,
                "gallery": null,
                "id": "t3_1vgbkge",
                "isArchived": false,
                "isCommercialCommunication": false,
                "isContestMode": false,
                "isCrosspostable": true,
                "isCrowdControlFilterEnabled": false,
                "isFollowed": false,
                "isGildable": true,
                "isHidden": false,
                "isLocked": false,
                "isNsfw": false,
                "isPollIncluded": false,
                "isReactAllowed": false,
                "isSaved": false,
                "isScoreHidden": false,
                "isSelfPost": true,
                "isSpoiler": false,
                "isStickied": false,
                "isThumbnailEnabled": false,
                "isTranslatable": true,
                "isTranslated": false,
                "languageCode": "en",
                "media": {
                  "__typename": "Media",
                  "animated": null,
                  "download": null,
                  "obfuscated_still": {
                    "__typename": "StillMedia",
                    "large": null,
                    "medium": null,
                    "small": null,
                    "source": null,
                    "xlarge": null,
                    "xxlarge": null,
                    "xxxlarge": null
                  },
                  "packagedMedia": null,
                  "previewMediaId": "-_NM9QKmwnaF7Ti3sXwY6oJD9PVQrQGXBx1288oLFXw",
                  "still": {
                    "__typename": "StillMedia",
                    "altText": null,
                    "large": {
                      "__typename": "MediaSource",
                      "dimensions": {
                        "height": 168,
                        "width": 320
                      },
                      "url": "https://external-preview.redd.it/-_NM9QKmwnaF7Ti3sXwY6oJD9PVQrQGXBx1288oLFXw.png?width=320&auto=webp&s=edd7dc4f8872e2fb7b167461be2ff99e5c0f90e5"
                    },
                    "medium": {
                      "__typename": "MediaSource",
                      "dimensions": {
                        "height": 113,
                        "width": 216
                      },
                      "url": "https://external-preview.redd.it/-_NM9QKmwnaF7Ti3sXwY6oJD9PVQrQGXBx1288oLFXw.png?width=216&auto=webp&s=caf8e18640092a19c147b6fa11391129476c2981"
                    },
                    "small": {
                      "__typename": "MediaSource",
                      "dimensions": {
                        "height": 56,
                        "width": 108
                      },
                      "url": "https://external-preview.redd.it/-_NM9QKmwnaF7Ti3sXwY6oJD9PVQrQGXBx1288oLFXw.png?width=108&auto=webp&s=630be5341fb0b77f90d4ada2793fc81ec5e8eae6"
                    },
                    "source": {
                      "__typename": "MediaSource",
                      "dimensions": {
                        "height": 630,
                        "width": 1200
                      },
                      "url": "https://external-preview.redd.it/-_NM9QKmwnaF7Ti3sXwY6oJD9PVQrQGXBx1288oLFXw.png?auto=webp&s=58d39b335111d200e60a1e6fa3ce9499441410bd"
                    },
                    "xlarge": {
                      "__typename": "MediaSource",
                      "dimensions": {
                        "height": 336,
                        "width": 640
                      },
                      "url": "https://external-preview.redd.it/-_NM9QKmwnaF7Ti3sXwY6oJD9PVQrQGXBx1288oLFXw.png?width=640&auto=webp&s=c52efa464e6d0556275fea582ac922a69499c260"
                    },
                    "xxlarge": {
                      "__typename": "MediaSource",
                      "dimensions": {
                        "height": 504,
                        "width": 960
                      },
                      "url": "https://external-preview.redd.it/-_NM9QKmwnaF7Ti3sXwY6oJD9PVQrQGXBx1288oLFXw.png?width=960&auto=webp&s=4d1fb2c487ab1ccc3890c05043b93ef9ff03c08d"
                    },
                    "xxxlarge": {
                      "__typename": "MediaSource",
                      "dimensions": {
                        "height": 567,
                        "width": 1080
                      },
                      "url": "https://external-preview.redd.it/-_NM9QKmwnaF7Ti3sXwY6oJD9PVQrQGXBx1288oLFXw.png?width=1080&auto=webp&s=af45a8102b5340a1b191b7f23bb023258e0323be"
                    }
                  },
                  "streaming": null,
                  "typeHint": null,
                  "video": null
                },
                "moderationInfo": null,
                "outboundLink": {
                  "expiresAt": "2026-08-20T14:38:16.429056+0000",
                  "url": "https://www.reddit.com/r/u_spez/comments/1vgbkge/modernizing_reddits_infrastructure_with_you/"
                },
                "permalink": "/user/spez/comments/1vgbkge/modernizing_reddits_infrastructure_with_you/",
                "poll": null,
                "postEventInfo": null,
                "postHint": "SELF",
                "postStats": {
                  "shareAllTotal": 329,
                  "viewCountTotal": null
                },
                "postStatsPrivate": {
                  "viewCountTotals": null
                },
                "postTitle": "Modernizing Reddit’s infrastructure with you",
                "profile": {
                  "__typename": "Profile",
                  "description": null,
                  "id": "t5_3k30p",
                  "isModeratable": false,
                  "isNsfw": false,
                  "modPermissions": null,
                  "name": "u_spez",
                  "redditorInfo": {
                    "__typename": "Redditor",
                    "accountType": "USER",
                    "id": "t2_1w72",
                    "name": "spez",
                    "prefixedName": "u/spez"
                  },
                  "styles": {
                    "icon": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png?width=64&height=64&frame=1&auto=webp&crop=64:64,smart&s=0af32bd27feadee648af9434f5d8ffa782225a45",
                    "legacyIcon": {
                      "__typename": "MediaSource",
                      "dimensions": {
                        "height": 256,
                        "width": 256
                      },
                      "url": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png?width=256&height=256&frame=1&auto=webp&crop=256:256,smart&s=b3afd3e423e96bcdc7e3c49d60a60a50dc2903aa"
                    },
                    "legacyPrimaryColor": null
                  },
                  "subscribersCount": 0
                },
                "reactedFrom": null,
                "removedByCategory": null,
                "score": 324,
                "suggestedCommentSort": null,
                "thumbnail": null,
                "translatedLanguage": null,
                "upvoteRatio": 0.8333333333333334,
                "url": "https://www.reddit.com/r/u_spez/comments/1vgbkge/modernizing_reddits_infrastructure_with_you/",
                "viewCount": null,
                "voteState": "NONE"
              }
            },
            {
              "node": {
                "__typename": "ProfilePost",
                "adSupplementaryTextRichtext": null,
                "attributionInfo": null,
                "authorFlair": null,
                "authorInfo": {
                  "__typename": "Redditor",
                  "accountType": "USER",
                  "iconSmall": {
                    "__typename": "MediaSource",
                    "dimensions": {
                      "height": 50,
                      "width": 50
                    },
                    "url": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png?width=50&height=50&frame=1&auto=webp&crop=50%3A50%2Csmart&s=638708ec49d2051716871e62d0b8a9da3b11402c"
                  },
                  "id": "t2_1w72",
                  "isBlocked": false,
                  "isCakeDayNow": false,
                  "name": "spez",
                  "newIcon": {
                    "__typename": "MediaSource",
                    "dimensions": {
                      "height": 256,
                      "width": 256
                    },
                    "url": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png?frame=1&auto=webp&crop=256%3A256%2Csmart&s=54cdc94b6359f38240017e6737d3c56933e0206b"
                  },
                  "profile": {
                    "isNsfw": false
                  },
                  "snoovatarIcon": null
                },
                "callToAction": null,
                "commentCount": 294,
                "content": {
                  "html": "Hi everyone,\nReddit turns 21 next week. Funny enough, it’s the same age I was when we started it. Save your jokes about r/13or30, I’ve already heard them.\nThat’s a long time in human years and an even longer time in internet years.\nWhen a few of us started Reddit back in 2005, the idea was simple: make it easier to find interesting things online. So we built a place where people could share links.\nAnd the links became prompts for conversations because people naturally like to talk about stuff. One of the first inside jokes on Reddit was, \"I didn't read the article but… [insert 2000 words on th…",
                  "markdown": "Hi everyone,\n\nReddit turns 21 next week. Funny enough, it’s the same age I was when we started it. Save your jokes about r/13or30, I’ve already [heard them](https://i.redd.it/mup6rvwj0o7h1.png).\n\nThat’s a long time in human years and an even longer time in internet years.\n\nWhen a few of us started Reddit back in 2005, the idea was simple: make it easier to find interesting things online. So we built a place where people could share links.\n\nAnd the links became prompts for conversations because people naturally like to talk about stuff. One of the first inside jokes on Reddit was, *\"I didn't re…",
                  "preview": "Hi everyone, Reddit turns 21 next week. Funny enough, it’s the same age I was when we started it. Save your jokes about r/13or30, I’ve already heard them. That’s a long time in human years and an even longer time in internet years. When a few of us started Reddit back in 2005, the idea was simple: m",
                  "richtext": "{\"document\":[{\"c\":[{\"e\":\"text\",\"t\":\"Hi everyone,\"}],\"e\":\"par\"},{\"c\":[{\"e\":\"text\",\"t\":\"Reddit turns 21 next week. Funny enough, it\\u2019s the same age I was when we started it. Save your jokes about \"},{\"e\":\"r/\",\"l\":false,\"t\":\"13or30\"},{\"e\":\"text\",\"t\":\", I\\u2019ve already \"},{\"e\":\"link\",\"t\":\"heard them\",\"u\":\"https://i.redd.it/mup6rvwj0o7h1.png\"},{\"e\":\"text\",\"t\":\".\"}],\"e\":\"par\"},{\"c\":[{\"e\":\"text\",\"t\":\"That\\u2019s a long time in human years and an even longer time in internet years.\"}],\"e\":\"par\"},{\"c\":[{\"e\":\"text\",\"t\":\"When a few of us started Reddit back in 2005, the idea was simple: make it eas…",
                  "richtextMedia": []
                },
                "createdAt": "2026-06-16T16:04:27.655000+0000",
                "crosspostRoot": null,
                "crowdControlLevel": "OFF",
                "devvit": null,
                "distinguishedAs": "ADMIN",
                "domain": "self.spez",
                "editedAt": "2026-06-16T16:05:52.956000+0000",
                "flair": null,
                "gallery": null,
                "id": "t3_1u7hraf",
                "isArchived": false,
                "isCommercialCommunication": false,
                "isContestMode": false,
                "isCrosspostable": true,
                "isCrowdControlFilterEnabled": false,
                "isFollowed": false,
                "isGildable": true,
                "isHidden": false,
                "isLocked": false,
                "isNsfw": false,
                "isPollIncluded": false,
                "isReactAllowed": false,
                "isSaved": false,
                "isScoreHidden": false,
                "isSelfPost": true,
                "isSpoiler": false,
                "isStickied": false,
                "isThumbnailEnabled": false,
                "isTranslatable": true,
                "isTranslated": false,

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

Reddit User Posts API

Returns a feed of posts submitted by one Reddit user, with the post text, comment count and author details for each post. It needs a Reddit username and can sort the posts by new, top, hot or controversial.

Use cases

  • Pull the latest posts from an executive or public figure account to monitor what they announce.
  • Archive the full text of a user's posts in Markdown or HTML for research.
  • Compare comment counts across a user's posts to see which ones drew the most discussion.
  • Page through an account's post history with the after cursor to build a posting timeline.

Request

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

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

Parameters

NameTypeRequiredDescription
usernamestringYesReddit username
afterstringNoPagination parameter for fetching next page
need_formatbooleanNoWhether to clean and format the data
sortstringNoSort method, options: NEW (newest), TOP (top rated), HOT (hot), CONTROVERSIAL (controversial)

Example response

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

{
  "identity": {
    "settings": {
      "postSetSettings": {
        "maxPostsPerPostSet": 5
      }
    }
  },
  "postFeed": {
    "__typename": "Redditor",
    "elements": {
      "dist": null,
      "edges": [
        {
          "node": {
            "__typename": "ProfilePost",
            "adSupplementaryTextRichtext": null,
            "attributionInfo": null,
            "authorFlair": null,
            "authorInfo": {
              "__typename": "Redditor",
              "accountType": "USER",
              "iconSmall": {
                "__typename": "MediaSource",
                "dimensions": {
                  "height": 50,
                  "width": 50
                },
                "url": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png?wid…"
              },
              "id": "t2_1w72",
              "isBlocked": false,
              "isCakeDayNow": false,
              "name": "spez",
              "newIcon": {
                "__typename": "MediaSource",
                "dimensions": {
                  "height": 256,
                  "width": 256
                },
                "url": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png?fra…"
              }
            },
            "callToAction": null,
            "commentCount": 481,
            "content": {
              "html": "I want to talk about a big change we're making on Reddit: we're going to evolve …",
              "markdown": "I want to talk about a big change we're making on Reddit: we're going to evolve …",
              "preview": "I want to talk about a big change we're making on Reddit: we're going to evolve …",
              "richtext": "{\"document\":[{\"c\":[{\"e\":\"text\",\"t\":\"I want to talk about a big change we're maki…",
              "richtextMedia": []
            }
          }
        }
      ],
      "pageInfo": {
        "__typename": "PageInfo",
        "endCursor": "dDNfM2N4ZWRu",
        "hasNextPage": false
      }
    },
    "profile": {
      "__typename": "Profile",
      "stickyPosts": []
    }
  }
}

Response fields

FieldMeaning
postFeed.elements.edges[].node.__typenameType of the feed item. The value ProfilePost marks a post on the user's profile.
postFeed.elements.edges[].node.commentCountNumber of comments on the post.
postFeed.elements.edges[].node.content.markdown / postFeed.elements.edges[].node.content.htmlPost body as Markdown or HTML. Some posts return only preview, so check which keys are present.
postFeed.elements.edges[].node.content.previewShort plain-text excerpt of the post body. Long text is cut off.
postFeed.elements.edges[].node.content.richtextPost body as a JSON string in Reddit's rich text document format.
postFeed.elements.edges[].node.authorInfo.nameUsername of the post author.
postFeed.elements.edges[].node.authorInfo.idAuthor account ID, which starts with t2_.
postFeed.elements.edges[].node.authorInfo.newIcon.url / postFeed.elements.edges[].node.authorInfo.iconSmall.urlLinks to the author's profile icon in a 256 by 256 size and a 50 by 50 size.
postFeed.elements.pageInfo.endCursorCursor for the last post on this page.
postFeed.elements.pageInfo.hasNextPageTells you whether another page of posts exists. It is false in this response.

Notes

  • Pass pageInfo.endCursor as after in the next request when hasNextPage is true.
  • Set sort to NEW, TOP, HOT or CONTROVERSIAL. The default is NEW.
  • Set need_format to true to have the data cleaned and formatted.
  • To fetch the comments a user wrote instead of their posts, call Reddit User Comments.

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相關 APIs

所有 APIs
API價格回應
Reddit每次呼叫 $0.001JSON
Reddit每次呼叫 $0.001JSON
Reddit每次呼叫 $0.001JSON
Reddit每次呼叫 $0.001JSON
Reddit每次呼叫 $0.001JSON
Reddit每次呼叫 $0.001JSON

指南:Best Reddit API in 2026: Pricing Compared

問題

常見問題

我要如何使用 Reddit User Posts API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/reddit/app/user-posts。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Reddit User Posts API 的費用是多少?

每次 $0.001,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Reddit User Posts API 接受哪些參數?

必要:username (string)。 選填:after (string), need_format (boolean) 和 sort (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Reddit User Posts API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Reddit 開發者帳號或 API 金鑰嗎?

不需要。Reddit User Posts 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Reddit API 存取權。