A community’s post flair templates (id, text, rich text, type, colours, mod-only and editable flags, allowed content), its user flair templates and its post-flair settings (flair on, authors can pick one) and whether custom emojis are on. Use a flair’s text as the flair filter of /subreddit/posts. Billed 1 request per call.
HTTP Request
GET /subreddit/flairs
Cost (in requests): 1. Every successful answer reports its cost in data.billed_requests.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
subreddit | string | Yes | - | Subreddit name (case-insensitive, with or without r/) or its t5_ id. |
Response
Real response to GET /subreddit/flairs?subreddit=python (arrays trimmed to 2 items, long texts cut with …).
| |
Response Fields
| Field | Type | Description |
|---|---|---|
status | boolean | true when the request succeeded |
request_id | string | Unique request identifier |
data | object | Flairs; null with error.code = not_found. |
data.subreddit_id | string | Subreddit id. |
data.post_flairs | array of objects | Post flair templates. |
data.post_flairs[].flair_id | string | Flair template id, the same as flair.flair_id on posts. A reference id, not an input of this API. |
data.post_flairs[].text | string | Flair text. |
data.post_flairs[].rich_text | array of objects | Rich-text flair as parts in display order (text, and emoji with their image URL); null for a plain-text flair. |
data.post_flairs[].rich_text[].type | string | text or emoji. |
data.post_flairs[].rich_text[].text | string | The text, or the emoji’s short code (e.g. :nba-1:). |
data.post_flairs[].rich_text[].url | string / null | Emoji image URL (emoji parts only). |
data.post_flairs[].type | string | text or richtext. |
data.post_flairs[].background_color | string | Hex background colour. |
data.post_flairs[].text_color | string | light or dark. |
data.post_flairs[].is_mod_only | boolean | Only moderators can assign it. |
data.post_flairs[].is_editable | boolean | Users may edit the text. |
data.post_flairs[].allowed_content | string | all, text or emoji. |
data.post_flairs[].max_emojis | integer | Maximum emojis allowed. |
data.user_flairs | array of objects | User flair templates (often empty: see user_flairs_available). |
data.user_flairs[].flair_id | string | Flair template id, the same as flair.flair_id on posts. A reference id, not an input of this API. |
data.user_flairs[].text | string / null | Flair text. |
data.user_flairs[].background_color | string | Hex background colour. |
data.user_flairs[].text_color | string | light or dark. |
data.user_flairs[].is_mod_only | boolean | Only moderators can assign it. |
data.user_flairs_available | boolean | True when user_flairs is the real list (the templates came back, or the community has user flair turned off); false when user flair is on but Reddit does not publish the templates; null when unknown. |
data.post_flair_settings | object | Post-flair settings of the community. |
data.post_flair_settings.is_enabled | boolean | Posts in this community can carry a flair; null when unknown. |
data.post_flair_settings.is_self_assignable | boolean | Authors can pick the flair of their own post; null when unknown. |
data.is_emojis_enabled | boolean | The community has custom emojis turned on; null when unknown. |
data.billed_requests | integer | Requests billed for this call (also sent as Requests in the X-RapidAPI-Billing header when it is not RapidAPI’s default of 1). |
request_params | object | Echo of the parameters you sent |
Error Responses
Invalid input returns HTTP 400, not billed. error is a plain string that names the parameter:
| |
| Status Code | Cause | Description |
|---|---|---|
| 400 | Invalid or missing parameter | Plain-English message per field. Not billed |
200 with status: false | Item not available | error.code is not_found, banned, private, quarantined. data is null. Billed 1 request |
| 503 | Reddit temporarily unreachable | "error": "Service temporarily unavailable". Not billed, retry later |
Code Examples
| |
| |
| |
Related Endpoints
- Subreddit Rule Check : Check a draft post against a community’s rules
- Subreddit Recommend : Communities where a product or topic fits, ranked, with their self-promotion policy
- Subreddit Highlights : Posts the moderators highlighted in a subreddit