subreddit_idstringwymagane
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
}
}
}
}
]Wybierz przykład, aby wczytać jego dane wejściowe i wynik do playgroundu.
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.
Zacznij tworzyć
Punkt końcowy API platformy z jednolitym uwierzytelnianiem i śledzeniem użycia.
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"
}'Ustaw klucz API SandBase w środowisku serwera. Żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym.
subreddit_idstringwymaganeSubreddit 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
Domyślnie: false
Zapisany przykładowy response dla tego API; podczas wyświetlania nie jest wykonywane żadne żądanie na żywo.
[
{
"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
}
}
}
}
]Odkryj więcej
| API | Cena | Odpowiedź |
|---|---|---|
Reddit | $0.001 za wywołanie | JSON |
Reddit | $0.001 za wywołanie | JSON |
Reddit | $0.001 za wywołanie | JSON |
Reddit | $0.001 za wywołanie | JSON |
Reddit | $0.001 za wywołanie | JSON |
Reddit | $0.001 za wywołanie | JSON |
Przewodniki:Best Reddit API in 2026: Pricing Compared
Pytania
Wyślij żądanie POST do https://api.sandbase.ai/v1/api/reddit/app/subreddit-settings z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.
$0.001 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.
Wymagane: subreddit_id (string). Opcjonalne: need_format (boolean). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.
Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.
Nie. Reddit App Subreddit Settings działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API Reddit.