usernamestring필수
Reddit username (without u/ prefix)
https://api.sandbase.ai/v1/api/reddit/app/user-profileReturns detailed profile information for a specified Reddit app user by username. Supports an optional flag to clean and format the output data.
[
{
"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
}
}
}
}
]예시를 선택하면 입력값과 결과가 플레이그라운드에 로드됩니다.
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.
t2_ user ID to use in other Reddit lookups.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.
| 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",
"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
}
}
| Field | Meaning |
|---|---|
redditorInfoByName.name / redditorInfoByName.prefixedName | The username, and the same name with the u/ prefix. |
redditorInfoByName.id | The account ID, in the form t2_1w72. |
redditorInfoByName.karma.total | Total karma. fromPosts and fromComments show the split between the two sources. |
redditorInfoByName.contributionStats.postCount / redditorInfoByName.contributionStats.commentCount | The number of posts and comments counted for the account. |
redditorInfoByName.isEmployee / redditorInfoByName.isVerified / redditorInfoByName.isGilded | Boolean flags for employee status, verification, and gilded status. |
redditorInfoByName.isAcceptingChats / redditorInfoByName.isAcceptingFollowers / redditorInfoByName.isAcceptingPMs | Boolean flags that show whether the account accepts chats, followers, and private messages. |
redditorInfoByName.profile.createdAt | Account creation time as an ISO 8601 timestamp. |
redditorInfoByName.profile.publicDescriptionText | The public bio text shown on the profile. |
redditorInfoByName.profile.styles.icon | URL of the profile icon image. |
redditorInfoByName.trophyCase.totalUnlocked | The number of trophies the account has unlocked. |
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.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
빌드를 시작하세요
통합 인증 및 사용량 추적이 있는 플랫폼 API 엔드포인트입니다.
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",
"need_format": false
}'서버 환경에 SandBase API 키를 설정하세요. 요청에는 Bearer 인증이 사용됩니다.
export SANDBASE_API_KEY="YOUR_API_KEY"키는 서버에 보관하세요. 브라우저 코드에 노출하지 마세요.
usernamestring필수Reddit username (without u/ prefix)
need_formatbooleanWhether to clean and format the data
기본값: false
이 API의 저장된 예시 응답입니다. 확인할 때 라이브 요청은 실행되지 않습니다.
[
{
"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
}
}
}
}
]더 살펴보기
| API | 가격 | 응답 |
|---|---|---|
Reddit | $0.001 / 호출 | JSON |
Reddit | $0.001 / 호출 | JSON |
Reddit | $0.001 / 호출 | JSON |
Reddit | $0.001 / 호출 | JSON |
Reddit | $0.001 / 호출 | JSON |
Reddit | $0.001 / 호출 | JSON |
질문
Authorization 헤더(Bearer)에 SandBase API 키를 넣고, 매개변수를 JSON 본문으로 담아 https://api.sandbase.ai/v1/api/reddit/app/user-profile에 POST 요청을 보내세요. 이 페이지의 Playground에서도 코드를 작성하지 않고 직접 테스트할 수 있습니다.
호출당 $0.001, SandBase 잔액에서 청구됩니다. 사용한 호출에 대해서만 요금이 부과되며, 구독은 없습니다.
필수: username (string). 선택: need_format (boolean). 이 페이지의 Parameters 표와 Playground에 모든 필드가 나와 있습니다.
같은 HTTP 요청에서 반환되는 JSON 응답입니다(동기식). 이 페이지의 README에 샘플 응답이 포함되어 있습니다.
아니요. Reddit App User Profile은 SandBase를 통해 실행되므로, SandBase API 키 하나로 이 엔드포인트와 카탈로그의 다른 모든 API 및 모델을 사용할 수 있습니다. Reddit API 액세스를 별도로 신청할 필요는 없습니다.