# Subreddit details

> A community's size, activity, description, rules and images.

- **Request:** `GET https://api.lurkapi.com/v1/reddit/subreddit/details`
- **Auth:** `x-api-key` header ([get a free key](https://lurkapi.com/login?next=/dashboard))
- **Cost:** 1 credit per call. Validation errors, `401`/`402`/`429` rejections and `5xx` failures are free; `not_found` is charged ([how charging works](https://lurkapi.com/docs.md#credits)).
- **MCP tool:** `reddit_subreddit_details` on `https://api.lurkapi.com/mcp`
- **Freshness:** responses are cached for up to 1 hour
- **Try it live:** https://lurkapi.com/docs/reddit/subreddit-details#try (no signup)
- **Platform:** [Reddit](https://lurkapi.com/docs/reddit.md) (reddit.com)
- **Web page:** https://lurkapi.com/docs/reddit/subreddit-details

## When to use this

Use it to size up a community before posting: weekly visitors and contributions, rules and description. There's no subscriber count (reddit.com no longer shows it); `weekly_active_users` is the closest measure.

Stats and settings for one subreddit: the numbers reddit.com shows on the community page, numbered rules, icon, banner and creation date. Pass `subreddit` or a Reddit `url`.

Unknown or private subreddits return 404 `not_found`.

## Parameters

All parameters go in the query string.

| Name | Type | Required | Default | Allowed values | Description | Example |
| --- | --- | --- | --- | --- | --- | --- |
| `subreddit` | string | no |  |  | Subreddit name (e.g. `marketing`) or URL. Required unless you pass `url`. | `marketing` |
| `url` | string | no |  |  | Any Reddit URL containing /r/<name>, e.g. `https://www.reddit.com/r/marketing/`. |  |

## Example request

Replace `YOUR_API_KEY` with your key, or set `LURKAPI_KEY` for the code. [Get a free key](https://lurkapi.com/login?next=/dashboard).

curl:

```bash
curl "https://api.lurkapi.com/v1/reddit/subreddit/details?subreddit=marketing" \
  -H "x-api-key: YOUR_API_KEY"
```

JavaScript:

```js
const params = new URLSearchParams({
  subreddit: "marketing",
});
const res = await fetch(`https://api.lurkapi.com/v1/reddit/subreddit/details?${params}`, {
  headers: { "x-api-key": process.env.LURKAPI_KEY },
});
const data = await res.json();
if (!data.success) throw new Error(`${data.code}: ${data.error}`);
console.log(data);
```

Python:

```python
import os
import requests

res = requests.get(
    "https://api.lurkapi.com/v1/reddit/subreddit/details",
    params={
        "subreddit": "marketing",
    },
    headers={"x-api-key": os.environ["LURKAPI_KEY"]},
    timeout=60,
)
data = res.json()
if not data["success"]:
    raise RuntimeError(f"{data['code']}: {data['error']}")
print(data)
```

## Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in `…`.

200 OK (application/json):

```json
{
  "success": true,
  "credits_remaining": 994,
  "credits_charged": 1,
  "subreddit_id": "t5_2qhmg",
  "display_name": "marketing",
  "weekly_active_users": 70309,
  "weekly_contributions": 965,
  "rules": "1. Advertising, Self-Promotion, & Spam (Permanent Ban)\nIf you want to ad…",
  "description": "For marketing communications + advertising industry professionals to dis…",
  "header_img": "https://styles.redditmedia.com/t5_2qhmg/styles/bannerBackgroundImage_y1x…",
  "icon_img": "https://styles.redditmedia.com/t5_2qhmg/styles/communityIcon_amdb6rj8w5p…",
  "created_at": "2008-03-23T18:17:57.000Z"
}
```

## Response fields

Every field of a successful response. `[]` marks a list: `a[].b` is the `b` of each item in `a`. **nullable** fields can be `null`; **optional** fields can be missing.

| Field | Type | Description |
| --- | --- | --- |
| `success` | `true` | Always true here; errors have `success: false`. |
| `credits_remaining` | `number` | Your balance after this call. On anonymous playground calls: free tries left today. |
| `credits_charged` | `number` | Credits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1). |
| `subreddit_id` | `string` | Fullname, `t5_…`. |
| `display_name` | `string` | Name with Reddit's capitalization. |
| `description` | `string` | The public one-paragraph description. |
| `rules` | `string` | Community rules as numbered plain text: "1. Title\nDetails\n\n2. …". |
| `weekly_active_users` | `number`, nullable | Weekly visitors, as shown on the community page. |
| `weekly_contributions` | `number`, nullable | Posts plus comments in the last week. |
| `icon_img` | `string`, nullable | Community icon URL; null if none. |
| `header_img` | `string`, nullable | Banner image URL; null if none. |
| `created_at` | `string` | When the subreddit was created, ISO 8601. |

## Caching and freshness

Responses are cached for up to 1 hour, so a repeat call within that window can return the same data. It still costs 1 credit.

## Errors

Errors return `{ success: false, error, code, docs }` with the HTTP status below. Validation errors, `401`/`402`/`429` rejections and `5xx` failures are free; `not_found` is charged ([how charging works](https://lurkapi.com/docs.md#credits)). [All error codes](https://lurkapi.com/docs.md#errors).

| Status | Code | Meaning |
| --- | --- | --- |
| 401 | `missing_api_key` | No API key. Send it in the `x-api-key` header. |
| 401 | `invalid_api_key` | The key is unknown or was revoked. |
| 402 | `insufficient_credits` | Not enough credits for this call. Buy a pack or wait for tomorrow's top-up. |
| 404 | `not_found` | The endpoint, or the thing you asked for (ad, post, subreddit), doesn't exist. Charged when the platform was checked. |
| 405 | `method_not_allowed` | Endpoints take GET with query params. |
| 429 | `rate_limited` | Too many calls at once. Wait for the `retry-after` seconds, then retry. |
| 500 | `internal_error` | Something broke on our side. Retry; 5xx errors are free. |
| 502 | `upstream_error` | The platform didn't give a usable answer. Retry; 5xx errors are free. |
| 503 | `upstream_busy` | All our connections to the platform are busy. Retry in a few seconds; 5xx errors are free. |
| 504 | `upstream_timeout` | The platform took over 30 seconds to answer. Retry; timeouts are free. |

## Use it in Claude

Once LurkAPI is [connected to Claude](https://lurkapi.com/docs.md#claude), this endpoint is the `reddit_subreddit_details` tool. Ask in plain English, for example:

Ask Claude:

```text
Use LurkAPI's reddit_subreddit_details with subreddit "marketing" and summarize what you find.
```

Claude calls `reddit_subreddit_details` with arguments like these, and each call costs 1 credit:

Tool arguments:

```json
{
  "subreddit": "marketing"
}
```

Tool results skip nulls and empty lists to save tokens.

---

Previous: [Subreddit posts](https://lurkapi.com/docs/reddit/subreddit-posts.md) · Next: [Subreddit search](https://lurkapi.com/docs/reddit/subreddit-search.md)
