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

Reddit User Public Trophies

Tài liệu API
https://api.sandbase.ai/v1/api/reddit/app/user-trophies

Returns a list of public trophies and achievements for a specified Reddit account. Users can supply a username and optionally request cleaned, formatted data.

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

Phòng thử nghiệm

Đầu vào
Reddit username (without u/ prefix)
Whether to clean and format the data
Đầu raVí dụ
Phản hồioutputs · 1.4 KB · 49 dòng
[
  {
    "data": {
      "redditorInfoByName": {
        "__typename": "Redditor",
        "trophyCase": {
          "categories": {
            "edges": [
              {
                "node": {
                  "__typename": "AchievementTrophyCategory",
                  "trophies": {
                    "edges": [
                      {
                        "node": {
                          "__typename": "AchievementImageTrophy",
                          "id": "600-day-streak",
                          "image": "…",
                          "name": "600-Day Streak"
                        }
                      },
                      {
                        "node": {
                          "__typename": "AchievementImageTrophy",
                          "id": "sharing-pro",
                          "image": "…",
                          "name": "Sharing Pro"
                        }
                      },
                      {
                        "node": {
                          "__typename": "AchievementImageTrophy",
                          "id": "500-day-streak",
                          "image": "…",
                          "name": "500-Day Streak"
                        }
                      },
                      "… 49 more items in the full response"
                    ]
                  }
                }
              }
            ]
          }
        }
      }
    }
  }
]

Ví dụ

Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.

README API

Reddit User Public Trophies API

Returns the public trophies shown on a Reddit user's profile. Each trophy has an ID, a name and an image URL. The only required input is the username, without the u/ prefix.

Use cases

  • Show a user's Reddit trophies and streak badges on an external profile page.
  • Check which streak trophies an account holds, such as 700-Day Streak or 600-Day Streak.
  • Collect trophy image URLs to display achievement icons in a dashboard.
  • Compare the trophy names of several accounts when reviewing community members.

Request

curl -X POST "https://api.sandbase.ai/v1/api/reddit/app/user-trophies" \
  -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",
    "trophyCase": {
      "categories": {
        "edges": [
          {
            "node": {
              "__typename": "AchievementTrophyCategory",
              "trophies": {
                "edges": [
                  {
                    "node": {
                      "__typename": "AchievementImageTrophy",
                      "id": "700-day-streak",
                      "image": {
                        "url": "https://preview.redd.it/h9a6sd4jhosf1.png?width=500&height=500&auto=webp&s=005d6…"
                      },
                      "name": "700-Day Streak"
                    }
                  }
                ]
              }
            }
          }
        ]
      }
    }
  }
}

Response fields

FieldMeaning
redditorInfoByNameRoot object for the Reddit user that matches the username.
redditorInfoByName.trophyCase.categories.edges[].node.trophies.edges[]List of trophies in one trophy category. Each entry holds a node object with the trophy details.
redditorInfoByName.trophyCase.categories.edges[].node.__typenameType of the trophy category, for example AchievementTrophyCategory.
redditorInfoByName.trophyCase.categories.edges[].node.trophies.edges[].node.nameDisplay name of the trophy, such as Conversation Starter or 700-Day Streak.
redditorInfoByName.trophyCase.categories.edges[].node.trophies.edges[].node.idIdentifier of the trophy. Values can be a number string like 11 or a slug like 700-day-streak.
redditorInfoByName.trophyCase.categories.edges[].node.trophies.edges[].node.image.urlURL of the trophy image.
redditorInfoByName.trophyCase.categories.edges[].node.trophies.edges[].node.__typenameType of the trophy, for example AchievementImageTrophy.

Notes

  • Pass the username without the u/ prefix, for example spez.
  • Trophy IDs are strings. Some are numeric and some are slugs, so treat them as text.
  • The response nests trophies under categories, so loop over the categories first and then over the trophies in each one.
  • To look up more about the same account, call Reddit App User Profile or Reddit User Posts.

Pricing

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

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
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
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 User Public Trophies?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/reddit/app/user-trophies 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 User Public Trophies có giá bao nhiêu?

$0.001 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 User Public Trophies chấp nhận những tham số nào?

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

API Reddit User Public Trophies 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 User Public Trophies 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.