> ## Documentation Index
> Fetch the complete documentation index at: https://docs.konbiniapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get subreddit rules

> Returns structured community rules for a subreddit.

## What it does

Returns structured community rules for a subreddit.

## Tool details

| Field         | Value                                         |
| ------------- | --------------------------------------------- |
| Tool name     | `reddit_get_subreddit_rules`                  |
| Platform      | Reddit                                        |
| REST endpoint | `GET /v1/reddit/subreddits/{subreddit}/rules` |
| Result type   | Collection tool                               |

## Parameters

| Parameter           | Type       | Required | Description                                                                                    |
| ------------------- | ---------- | -------- | ---------------------------------------------------------------------------------------------- |
| `subreddit`         | `string`   | Yes      | Subreddit name (with or without `r/` prefix)                                                   |
| `projection_preset` | `string`   | No       | Defaults to `minimal`. Allowed values: `full`, `minimal`, `identity`, `engagement`, `content`. |
| `data_fields`       | `string[]` | No       | Adds top-level keys from `data` on top of the selected `projection_preset`.                    |
| `item_fields`       | `string[]` | No       | Adds keys from `data.orderedItems[]` on top of the selected `projection_preset`.               |

## Example

```json theme={null}
{
  "name": "reddit_get_subreddit_rules",
  "arguments": {
    "subreddit": "programming",
    "projection_preset": "minimal",
    "data_fields": [
      "orderedItems",
      "totalItems",
      "url",
      "type"
    ],
    "item_fields": [
      "entityId",
      "name",
      "content"
    ]
  }
}
```

## Available data fields

* `@context`
* `type`
* `id`
* `url`
* `totalItems`
* `orderedItems`

## Available item fields

* `type`
* `entityId`
* `name`
* `content`

## Response notes

Successful calls return a JSON object with a top-level `data` field and, when
available, `metadata.creditsUsed` and `metadata.creditsRemaining`. See
[response format](/getting-started/response-format),
[pagination](/getting-started/pagination), and [credits](/getting-started/credits).
