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

Reddit App User Profile

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

Returns detailed profile information for a specified Reddit app user by username. Supports an optional flag to clean and format the output data.

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

Playground

輸入
Reddit username (without u/ prefix)
Whether to clean and format the data
輸出範例
回應outputs · 2.7 KB · 96 行
[
  {
    "data": {
      "redditorInfoByName": {
        "__typename": "Redditor",
        "accountType": "USER",
        "contributionStats": {
          "commentCount": 3209,
          "postCount": 846
        },
        "contributorPublicProfile": {
          "tier": "NON_CONTRIBUTOR"
        },
        "id": "t2_1w72",
        "isAcceptingChats": true,
        "isAcceptingFollowers": true,
        "isAcceptingPMs": true,
        "isBlocked": false,
        "isEmployee": true,
        "isFriend": false,
        "isGilded": true,
        "isPremiumAvatarTreatment": true,
        "isProfileContentFiltered": true,
        "isVerified": true,
        "karma": {
          "fromComments": 756493,
          "fromPosts": 184509,
          "total": 941002
        },
        "name": "spez",
        "prefixedName": "u/spez",
        "profile": {
          "allowedPostTypes": [
            "LINK",
            "IMAGE",
            "VIDEO",
            "… 4 more items in the full response"
          ],
          "createdAt": "2005-06-06T04:00:00.000000+0000",
          "description": null,
          "isContributor": false,
          "isDefaultBanner": false,
          "isDefaultIcon": false,
          "isNsfw": false,
          "isSubscribed": false,
          "isUserBanned": false,
          "moderatorsInfo": {
            "edges": [
              {
                "node": {
                  "id": "t2_1w72"
                }
              },
              {
                "node": {
                  "id": "t2_3gkovlht"
                }
              },
              {
                "node": {
                  "id": "t2_3belm"
                }
              }
            ]
          },
          "path": "/user/spez/",
          "publicDescriptionText": "Reddit CEO",
          "socialLinks": [],
          "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": {
              "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,
            "profileBanner": null
          },
          "subscribersCount": 0,
          "title": "spez"
        },
        "profileExemptedExperiments": [],
        "profileInfo": {
          "__typename": "Profile"
        },
        "snoovatarIcon": null,
        "trophyCase": {
          "name": "Trophies",
          "totalUnlocked": 52
        }
      }
    }
  }
]

範例

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

API README

Reddit App User Profile API

Returns the public profile of a Reddit user, including karma, post and comment counts, account flags, and profile settings. It needs one input: the username without the u/ prefix.

Use cases

  • Check the karma totals and contribution counts of an account before you trust its posts.
  • Confirm whether an account is an employee, verified, or gilded.
  • Read the account creation date and bio text to build a user record.
  • Get the t2_ user ID to use in other Reddit lookups.

Request

curl -X POST "https://api.sandbase.ai/v1/api/reddit/app/user-profile" \
  -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 (without u/ prefix)
need_formatbooleanNoWhether to clean and format the data

Example response

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

{
  "redditorInfoByName": {
    "__typename": "Redditor",
    "accountType": "USER",
    "contributionStats": {
      "commentCount": 3228,
      "postCount": 851
    },
    "contributorPublicProfile": {
      "tier": "NON_CONTRIBUTOR"
    },
    "id": "t2_1w72",
    "isAcceptingChats": true,
    "isAcceptingFollowers": true,
    "isAcceptingPMs": true,
    "isBlocked": false,
    "isEmployee": true,
    "isFriend": false,
    "isGilded": true
  }
}

Response fields

FieldMeaning
redditorInfoByName.name / redditorInfoByName.prefixedNameThe username, and the same name with the u/ prefix.
redditorInfoByName.idThe account ID, in the form t2_1w72.
redditorInfoByName.karma.totalTotal karma. fromPosts and fromComments show the split between the two sources.
redditorInfoByName.contributionStats.postCount / redditorInfoByName.contributionStats.commentCountThe number of posts and comments counted for the account.
redditorInfoByName.isEmployee / redditorInfoByName.isVerified / redditorInfoByName.isGildedBoolean flags for employee status, verification, and gilded status.
redditorInfoByName.isAcceptingChats / redditorInfoByName.isAcceptingFollowers / redditorInfoByName.isAcceptingPMsBoolean flags that show whether the account accepts chats, followers, and private messages.
redditorInfoByName.profile.createdAtAccount creation time as an ISO 8601 timestamp.
redditorInfoByName.profile.publicDescriptionTextThe public bio text shown on the profile.
redditorInfoByName.profile.styles.iconURL of the profile icon image.
redditorInfoByName.trophyCase.totalUnlockedThe number of trophies the account has unlocked.

Notes

  • Pass username without the u/ prefix. The response gives the prefixed form in prefixedName.
  • need_format is optional and defaults to false. Set it to true to clean and format the data.
  • Call Reddit User Public Trophies for trophy details, Reddit User Posts for the posts of this user, or Reddit User Comments for the 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 App User Profile API?

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

Reddit App User Profile API 的費用是多少?

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

Reddit App User Profile API 接受哪些參數?

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

Reddit App User Profile API 會回傳什麼?

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

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

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