subreddit_idstringwajib
Subreddit ID with format starting with t5_, e.g., "t5_2qh0u" (can be obtained from the fetch_subreddit_info endpoint)
https://api.sandbase.ai/v1/api/reddit/app/subreddit-settingsReturns settings and configuration details for a specified Reddit subreddit, including posting rules, flair settings, and moderation configurations.
[
{
"data": {
"subredditInfoById": {
"__typename": "Subreddit",
"allAllowedPostTypes": [
"LINK",
"IMAGE",
"GALLERY"
],
"amaSettings": {
"postPermissions": "OFF"
},
"authorFlairSettings": {
"isEnabled": true,
"isSelfAssignable": false
},
"commentContributionSettings": {
"allowedMediaTypes": [
"GIPHY",
"STATIC",
"EXPRESSION",
"… 1 more items in the full response"
]
},
"countrySiteSettings": {
"countryCode": "",
"isCountrySiteEditable": true,
"languageCode": "",
"modMigrationAt": "2023-07-03T16:04:00.000000+0000"
},
"id": "t5_2qh0u",
"isArchivePostsEnabled": true,
"isDiscoveryAllowed": true,
"isSubredditChannelsEnabled": {
"isChatEnabled": false,
"isPostEnabled": true
},
"isTopListingAllowed": true,
"language": "en",
"postFlairSettings": {
"isEnabled": true,
"isSelfAssignable": false
}
}
}
}
]Pilih contoh untuk memuat input dan hasilnya ke playground.
Returns settings for one Reddit subreddit, such as allowed post types, flair settings, comment media types and channel options. It needs a subreddit_id that starts with t5_.
LINK, IMAGE, GALLERY) a subreddit accepts before you build a posting tool.curl -X POST "https://api.sandbase.ai/v1/api/reddit/app/subreddit-settings" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"subreddit_id": "t5_2qh0u"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
subreddit_id | string | Yes | Subreddit ID with format starting with t5_, e.g., "t5_2qh0u" (can be obtained from the fetch_subreddit_info endpoint) |
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.
{
"subredditInfoById": {
"__typename": "Subreddit",
"allAllowedPostTypes": [
"LINK"
],
"amaSettings": {
"postPermissions": "OFF"
},
"authorFlairSettings": {
"isEnabled": true,
"isSelfAssignable": false
},
"commentContributionSettings": {
"allowedMediaTypes": [
"GIPHY"
]
},
"countrySiteSettings": {
"countryCode": "",
"isCountrySiteEditable": true,
"languageCode": "",
"modMigrationAt": "2023-07-03T16:04:00.000000+0000"
},
"id": "t5_2qh0u",
"isArchivePostsEnabled": true,
"isDiscoveryAllowed": true,
"isSubredditChannelsEnabled": {
"isChatEnabled": false,
"isPostEnabled": true
},
"isTopListingAllowed": true,
"language": "en"
}
}
| Field | Meaning |
|---|---|
subredditInfoById.id | The subreddit ID, in the same t5_ format as the input. |
subredditInfoById.allAllowedPostTypes[] | The post types the subreddit accepts, such as LINK, IMAGE and GALLERY. |
subredditInfoById.postFlairSettings.isEnabled / subredditInfoById.authorFlairSettings.isEnabled | Whether post flair and author flair are enabled in this subreddit. |
subredditInfoById.postFlairSettings.isSelfAssignable / subredditInfoById.authorFlairSettings.isSelfAssignable | Whether users can assign the flair to themselves. |
subredditInfoById.commentContributionSettings.allowedMediaTypes[] | The media types allowed in comments, such as GIPHY, STATIC and EXPRESSION. |
subredditInfoById.isSubredditChannelsEnabled.isChatEnabled / subredditInfoById.isSubredditChannelsEnabled.isPostEnabled | Whether chat channels and post channels are enabled for the subreddit. |
subredditInfoById.isDiscoveryAllowed / subredditInfoById.isTopListingAllowed | Whether the subreddit may appear in discovery and in top listings. |
subredditInfoById.isArchivePostsEnabled | Whether archiving of posts is enabled. |
subredditInfoById.language | The language code set for the subreddit, such as en. |
subredditInfoById.amaSettings.postPermissions | The AMA post permission setting. The value OFF is returned in this example. |
subreddit_id from the Reddit App Subreddit Info API. The ID starts with t5_, for example t5_2qh0u.need_format to true to clean and format the data. The default is false.countrySiteSettings.modMigrationAt is an ISO 8601 timestamp in UTC.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Mulai membangun
Endpoint API platform dengan autentikasi dan pelacakan penggunaan terpadu.
curl -X POST "https://api.sandbase.ai/v1/api/reddit/app/subreddit-settings" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"need_format": false,
"subreddit_id": "t5_2qh0u"
}'Atur SandBase API key Anda di environment server Anda. Permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key Anda di server. Jangan tampilkan di kode browser.
subreddit_idstringwajibSubreddit ID with format starting with t5_, e.g., "t5_2qh0u" (can be obtained from the fetch_subreddit_info endpoint)
need_formatbooleanWhether to clean and format the data
Default: false
Contoh respons yang disimpan untuk API ini; tidak ada permintaan langsung yang dibuat saat melihatnya.
[
{
"data": {
"subredditInfoById": {
"__typename": "Subreddit",
"allAllowedPostTypes": [
"LINK",
"IMAGE",
"GALLERY"
],
"amaSettings": {
"postPermissions": "OFF"
},
"authorFlairSettings": {
"isEnabled": true,
"isSelfAssignable": false
},
"commentContributionSettings": {
"allowedMediaTypes": [
"GIPHY",
"STATIC",
"EXPRESSION",
"… 1 more items in the full response"
]
},
"countrySiteSettings": {
"countryCode": "",
"isCountrySiteEditable": true,
"languageCode": "",
"modMigrationAt": "2023-07-03T16:04:00.000000+0000"
},
"id": "t5_2qh0u",
"isArchivePostsEnabled": true,
"isDiscoveryAllowed": true,
"isSubredditChannelsEnabled": {
"isChatEnabled": false,
"isPostEnabled": true
},
"isTopListingAllowed": true,
"language": "en",
"postFlairSettings": {
"isEnabled": true,
"isSelfAssignable": false
}
}
}
}
]Jelajahi lebih lanjut
| API | Harga | Respons |
|---|---|---|
Reddit | $0.001 per panggilan | JSON |
Reddit | $0.001 per panggilan | JSON |
Reddit | $0.001 per panggilan | JSON |
Reddit | $0.001 per panggilan | JSON |
Reddit | $0.001 per panggilan | JSON |
Reddit | $0.001 per panggilan | JSON |
Pertanyaan
Kirim permintaan POST ke https://api.sandbase.ai/v1/api/reddit/app/subreddit-settings 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.
$0.001 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.
Wajib: subreddit_id (string). Opsional: need_format (boolean). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.
Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.
Tidak. Reddit App Subreddit Settings 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.