Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Reddit App Subreddit Settings

Tài liệu API
https://api.sandbase.ai/v1/api/reddit/app/subreddit-settings

Returns settings and configuration details for a specified Reddit subreddit, including posting rules, flair settings, and moderation configurations.

Giá
$0.001USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 1 tùy chọn

Phòng thử nghiệm

Đầu vào
Subreddit ID with format starting with t5_, e.g., "t5_2qh0u" (can be obtained from the fetch_subreddit_info endpoint)
Whether to clean and format the data
Đầu raVí dụ
Phản hồioutputs · 1.2 KB · 48 dòng
[
  {
    "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
        }
      }
    }
  }
]

Ví dụ

Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.

README API

Reddit App Subreddit Settings API

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

Use cases

  • Check which post types (LINK, IMAGE, GALLERY) a subreddit accepts before you build a posting tool.
  • Find out whether post flair and user flair are turned on and whether users can assign them to themselves.
  • Compare discovery and top listing settings across a list of subreddits.
  • Check which comment media types a community allows, such as GIPHY or static images.

Request

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.

Parameters

NameTypeRequiredDescription
subreddit_idstringYesSubreddit ID with format starting with t5_, e.g., "t5_2qh0u" (can be obtained from the fetch_subreddit_info endpoint)
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.

{
  "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"
  }
}

Response fields

FieldMeaning
subredditInfoById.idThe 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.isEnabledWhether post flair and author flair are enabled in this subreddit.
subredditInfoById.postFlairSettings.isSelfAssignable / subredditInfoById.authorFlairSettings.isSelfAssignableWhether 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.isPostEnabledWhether chat channels and post channels are enabled for the subreddit.
subredditInfoById.isDiscoveryAllowed / subredditInfoById.isTopListingAllowedWhether the subreddit may appear in discovery and in top listings.
subredditInfoById.isArchivePostsEnabledWhether archiving of posts is enabled.
subredditInfoById.languageThe language code set for the subreddit, such as en.
subredditInfoById.amaSettings.postPermissionsThe AMA post permission setting. The value OFF is returned in this example.

Notes

  • Get the subreddit_id from the Reddit App Subreddit Info API. The ID starts with t5_, for example t5_2qh0u.
  • Set need_format to true to clean and format the data. The default is false.
  • For the rules and style of a subreddit, call Reddit Subreddit Rules and Style Info.
  • countrySiteSettings.modMigrationAt is an ISO 8601 timestamp in UTC.

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Reddit$0.001 mỗi lần gọiJSON
Reddit$0.001 mỗi lần gọiJSON
Reddit$0.001 mỗi lần gọiJSON
Reddit$0.001 mỗi lần gọiJSON
Reddit$0.001 mỗi lần gọiJSON
Reddit$0.001 mỗi lần gọiJSON

Hướng dẫn:Best Reddit API in 2026: Pricing Compared

Câu hỏi

FAQ

Làm thế nào để dùng API Reddit App Subreddit Settings?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/reddit/app/subreddit-settings với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Reddit App Subreddit Settings có giá bao nhiêu?

$0.001 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API Reddit App Subreddit Settings chấp nhận những tham số nào?

Bắt buộc: subreddit_id (string). Tùy chọn: need_format (boolean). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Reddit App Subreddit Settings trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Reddit không?

Không. Reddit App Subreddit Settings chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Reddit.