Get a Subreddit's Posting Rules
Fetch a subreddit's posting rules by name: each rule's name, description, what it applies to, violation reason and priority, plus Reddit's site rules.
/api/reddit/sub/:name/rules$0.002 / callA subreddit's posting rules (Reddit's /r/<name>/about/rules data): each
rule's name, description, what it applies to, violation reason, priority, and
creation date, plus Reddit's site-wide rules. Returns a rules list and a
site_rules string list.
When to use this
Reach for this to check a community's rules before posting or commenting, what a subreddit forbids, whether a rule applies to posts, comments, or both, and the reason a moderator will cite for a removal. One read.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Subreddit name (no r/ prefix) |
A subreddit that does not exist returns 404.
Example
curl -H "Authorization: Bearer $TOKEN" \
"https://api.redditapis.com/api/reddit/sub/AskReddit/rules"const response = await fetch(
"https://api.redditapis.com/api/reddit/sub/AskReddit/rules",
{ headers: { Authorization: "Bearer TOKEN" } }
);
const data = await response.json();import requests
response = requests.get(
"https://api.redditapis.com/api/reddit/sub/AskReddit/rules",
headers={"Authorization": "Bearer TOKEN"},
)Response Shape
{
"rules": [
{
"name": "Rule 1: Questions must be clear",
"description": "Posts must be phrased as a genuine, answerable question.",
"applies_to": "posts",
"violation_reason": "Unclear or rhetorical question",
"priority": 0,
"created_utc": 1201261935,
"created": "2008-01-25T12:32:15.000Z"
}
],
"site_rules": [
"Spam",
"Personal and confidential information",
"Threatening, harassing, or inciting violence"
]
}Response Fields
| Field | Type | Notes |
|---|---|---|
name | string | The rule's short name / title |
description | string | null | The rule's full description (may be empty / null) |
applies_to | string | posts | comments | all |
violation_reason | string | null | The reason shown when the rule is enforced (may be null) |
priority | number | null | Display order Reddit assigns the rule (may be null) |
created_utc | number | null | Unix epoch seconds the rule was created (may be null) |
created | string | null | ISO-8601 form of created_utc (may be null) |
site_rules | string[] | Reddit's site-wide rules (a list of strings) |
Independent third-party API for developers and researchers. Not affiliated with, endorsed by, or sponsored by Reddit, Inc.
Subreddit About
Fetch a subreddit's public metadata by name: title, description, subscriber and active-user counts, creation date, type, and NSFW flag.
Subreddit Moderators
Fetch a subreddit's moderator team by name, each moderator's username, id, mod permissions, flair text, and the time they were added.
