# Reddit subreddit API

The Reddit subreddit API returns a Reddit community by its name: description, members, users active and contributions made in the last week, when it was created. One call costs 2 credits ($0.004 to $0.0067 depending on the pack); failed calls are free. Call it over HTTP or from your AI client over MCP. Last tested 2026-10-17.

- Page: https://socialtoai.com/reddit-subreddit-api/
- Last updated: 2026-10-17
- Last tested: 2026-10-17

| Request | Price key | Credits |
| --- | --- | --- |
| `POST /v1/call/reddit.subreddit` | `reddit.subreddit` | 2 |

Preview: this interface is not marked stable yet, so its parameters and fields may still change. It is charged like any other call, and a failed call is not charged.

## Request

```bash
curl https://api.socialtoai.com/v1/call/reddit.subreddit \
  -H "Authorization: Bearer $SOCIALTOAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "nasa"
  }'
```

```python
import os
import requests

response = requests.post(
    "https://api.socialtoai.com/v1/call/reddit.subreddit",
    headers={"Authorization": f"Bearer {os.environ['SOCIALTOAI_KEY']}"},
    json={
        "id": "nasa",
    },
)
print(response.json())
```

## Parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `id` | string | Required | — | Community name, without the r/ |

## Where the values come from

- `id`: Community name, without the r/ (e.g. `nasa`)
  Returned as `ref` by: [user_subreddits](https://socialtoai.com/reddit-user-subreddits-api.md)

## Response fields

| Field | Type | Meaning | Given |
| --- | --- | --- | --- |
| `items[].title` | string | The entry's title or name. | yes |
| `items[].url` | string | A link that opens it; null where the platform's list has none. | yes |
| `items[].rank` | integer | Position on a board, from 1. | yes |
| `items[].heat` | integer | The platform's heat score. | yes |
| `items[].fields.description` | string | The community's description. | yes |
| `items[].fields.nsfw` | boolean | Whether it is marked as adult content. | yes |
| `items[].fields.created_at` | string | When it was created, ISO 8601 in UTC. | yes |
| `items[].fields.members` | integer | Member count. | yes |

Every item also has platform, id, ref, approx and type; the response around the items is the same on every call. [Response format](https://socialtoai.com/docs/api/response.md)

## Sample response

Sample data: names, links and text are replaced by placeholders; the numbers are as recorded.

```json
{
  "request_id": "req_00000000-0000-4000-8000-000000000001",
  "schema_version": "v1",
  "fetched_at": "2026-10-12T22:02:32.000Z",
  "action": "call",
  "op": "reddit.subreddit",
  "platform": "reddit",
  "status": "ok",
  "items": [
    {
      "platform": "reddit",
      "id": "…",
      "ref": "…",
      "approx": [],
      "type": "entry",
      "entry_type": "community",
      "title": "…",
      "url": "https://example.com/…",
      "rank": null,
      "heat": null,
      "fields": {
        "description": "…",
        "nsfw": false,
        "created_at": "2008-05-10T16:54:23.304Z",
        "members": 127858
      }
    }
  ],
  "unavailable": [],
  "warnings": [],
  "applied_params": {
    "id": "nasa"
  },
  "cost_credits": 2,
  "billing": {
    "cost_credits": 2,
    "balance_credits": 98,
    "today_spend_credits": 2,
    "daily_limit_credits": null,
    "daily_remaining_credits": null,
    "display": "This call: 2 credits. Balance: 98 credits."
  },
  "replayed": false
}
```

## Paging and failures

- One call returns one object, with no pages, for 2 credits.
- 1 call per second per key, 5 after a purchase; going over is not charged. [Rate limits](https://socialtoai.com/docs/credits-and-billing.md#rate-limits)
- A failed call costs 0 credits and is never retried on its own. [Error codes](https://socialtoai.com/docs/api/errors.md)

## Ask your AI

- Get a Reddit community by its name: nasa. → `call {"op":"reddit.subreddit","id":"nasa"}`, 2 credits
- Get the communities a Reddit user is active in by username: nasa, then for the first 3: get a Reddit community by its name. → `call {"op":"reddit.user_subreddits","username":"nasa"}`, `call {"op":"reddit.subreddit","id":"<ref>"}` × 3, 8 credits

## More on Reddit

| Interface | What it does | Price key | Credits | Page |
| --- | --- | --- | --- | --- |
| `user_subreddits` | Get the communities a Reddit user is active in by username. | `reddit.user_subreddits` | 2 | https://socialtoai.com/reddit-user-subreddits-api.md |
| `subreddit_posts` | Get a page of the posts of a Reddit community by its name, hot, newest or top score first. | `reddit.subreddit_posts` | 2 | https://socialtoai.com/reddit-subreddit-posts-api.md |
| `search` | Find posts by keyword: text, author, comment count and publish time. | `reddit.search` | 2 | https://socialtoai.com/reddit-search-api.md |
| `trending` | The posts trending now. | `reddit.trending` | 2 | https://socialtoai.com/reddit-trending-api.md |
| `detail` | One post by ID or link: text, author, comment count and publish time. | `reddit.detail` | 2 | https://socialtoai.com/reddit-detail-api.md |
| `comments` | The comments under one post: text, reply count and time. | `reddit.comments` | 2 | https://socialtoai.com/reddit-comments-api.md |
| `user_profile` | One account: name, bio and post count. | `reddit.user_profile` | 2 | https://socialtoai.com/reddit-user-profile-api.md |
| `user_posts` | The recent posts of one account. | `reddit.user_posts` | 2 | https://socialtoai.com/reddit-user-posts-api.md |

## FAQ

**Do I need a Reddit account or Reddit's own API access?**

No. You only need a SocialToAI key. The call returns content and account information publicly visible on Reddit; you never sign in to Reddit or apply for anything there.

**What does “Preview” mean here?**

Preview: this interface is not marked stable yet, so its parameters and fields may still change. It is charged like any other call, and a failed call is not charged.
