usernamestringจำเป็น
Reddit username (without u/ prefix)
https://api.sandbase.ai/v1/api/reddit/app/user-trophiesReturns a list of public trophies and achievements for a specified Reddit account. Users can supply a username and optionally request cleaned, formatted data.
[
{
"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"
]
}
}
}
]
}
}
}
}
}
]เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
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.
700-Day Streak or 600-Day Streak.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.
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Reddit username (without u/ prefix) |
need_format | boolean | No | Whether to clean and format the data |
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"
}
}
]
}
}
}
]
}
}
}
}
| Field | Meaning |
|---|---|
redditorInfoByName | Root 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.__typename | Type of the trophy category, for example AchievementTrophyCategory. |
redditorInfoByName.trophyCase.categories.edges[].node.trophies.edges[].node.name | Display name of the trophy, such as Conversation Starter or 700-Day Streak. |
redditorInfoByName.trophyCase.categories.edges[].node.trophies.edges[].node.id | Identifier 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.url | URL of the trophy image. |
redditorInfoByName.trophyCase.categories.edges[].node.trophies.edges[].node.__typename | Type of the trophy, for example AchievementImageTrophy. |
username without the u/ prefix, for example spez.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
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"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
usernamestringจำเป็นReddit username (without u/ prefix)
need_formatbooleanWhether to clean and format the data
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"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"
]
}
}
}
]
}
}
}
}
}
]สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Reddit User Public TrophiesAPI นี้ Reddit | $0.001 ต่อการเรียก | JSON |
Reddit | $0.001 ต่อการเรียก | JSON |
Reddit | $0.001 ต่อการเรียก | JSON |
Reddit | $0.001 ต่อการเรียก | JSON |
Reddit | $0.001 ต่อการเรียก | JSON |
Reddit | $0.001 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/reddit/app/user-trophies โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: username (string). ตัวเลือก: need_format (boolean). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Reddit User Public Trophies ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Reddit API แยกต่างหาก