Sand AISand AI MAGI-2MAGI-2 kini tersedia di SandBase: video 1080p dengan audio nativeCoba sekarang

Reddit User Public Trophies

Dokumentasi 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.

Harga
$0.001USD / panggilan
Metode
POST
Respons
JSON
Parameter
1 wajib · 1 opsional

Playground

Input
Reddit username (without u/ prefix)
Whether to clean and format the data
OutputContoh
Responsoutputs · 1.4 KB · 49 baris
[
  {
    "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"
                    ]
                  }
                }
              }
            ]
          }
        }
      }
    }
  }
]

Contoh

Pilih contoh untuk memuat input dan hasilnya ke 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.

Jelajahi lebih lanjut

API Terkait

Semua APIs
APIHargaRespons
Reddit$0.001 per panggilanJSON
Reddit$0.001 per panggilanJSON
Reddit$0.001 per panggilanJSON
Reddit$0.001 per panggilanJSON
Reddit$0.001 per panggilanJSON
Reddit$0.001 per panggilanJSON

Panduan:Best Reddit API in 2026: Pricing Compared

Pertanyaan

FAQ

Bagaimana cara menggunakan API Reddit User Public Trophies?

Kirim permintaan POST ke https://api.sandbase.ai/v1/api/reddit/app/user-trophies dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.

Berapa biaya API Reddit User Public Trophies?

$0.001 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.

Parameter apa yang diterima API Reddit User Public Trophies?

Wajib: username (string). Opsional: need_format (boolean). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.

Apa yang dikembalikan API Reddit User Public Trophies?

Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.

Apakah saya memerlukan akun developer atau kunci API Reddit?

Tidak. Reddit User Public Trophies berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API Reddit secara terpisah.