# Get subreddit

Fetch public community metadata, including Reddit's anonymous weekly-visitor estimate when available. May take up to 60 seconds.

- Platform: [Reddit](https://docs.upscrape.com/docs/platforms/reddit)
- Capability ID: `reddit.subreddit.get`
- Cost: 1 credit per request
- Maximum runtime: 60 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

Use the exact public capability ID in the shared execute envelope.

```bash
curl --request POST \
  --url https://data.upscrape.com/execute \
  --header "Authorization: Bearer $UPSCRAPE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "name": "webdev"
  },
  "capability": "reddit.subreddit.get"
}'
```

## Input


| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | Public Reddit subreddit name, prefixed name, or canonical Reddit community URL. |

### Example input

```json
{
  "name": "webdev"
}
```

## Response

Successful output is returned in `results[0].data`.

Raw platform output is intentionally open-ended and may evolve with the upstream source.

### Illustrative sample output

This example shows one response. Values and optional fields vary with the data available.

```json
{
  "active_users": null,
  "created_utc": null,
  "description": "A community dedicated to all things web development: both front-end and back-end. For more design-related questions, try /r/web_design.",
  "icon_url": "https://styles.redditmedia.com/t5_2qs0q/styles/communityIcon_kxcmzy9bt1381.jpg?width=64&frame=1&auto=webp&s=[redacted:token]",
  "name": "webdev",
  "nsfw": false,
  "subscribers": null,
  "title": null,
  "url": "https://www.reddit.com/r/webdev/",
  "weekly_visitors": 459900
}
```
### Illustrative output fields

Derived from the sample above for orientation only. These fields are not a fixed response schema.

| Path | Observed type | Example |
| --- | --- | --- |
| `active_users` | `null` | null |
| `created_utc` | `null` | null |
| `description` | `string` | A community dedicated to all things web development: both front-end and… |
| `icon_url` | `string` | https://styles.redditmedia.com/t5_2qs0q/styles/communityIcon_kxcmzy9bt1… |
| `name` | `string` | webdev |
| `nsfw` | `boolean` | false |
| `subscribers` | `null` | null |
| `title` | `null` | null |
| `url` | `string` | https://www.reddit.com/r/webdev/ |
| `weekly_visitors` | `integer` | 459900 |

## Execution behavior

A `200` response completed inline. A `202` response was queued; poll `GET /jobs/{id}` until the job reaches `completed` or `failed`. Use an `Idempotency-Key` when retrying must not create a duplicate logical job.

## Related documentation

- [Authentication](https://docs.upscrape.com/docs/api/authentication)
- [Jobs and results](https://docs.upscrape.com/docs/api/jobs)
- [Errors and retries](https://docs.upscrape.com/docs/api/errors)
- [Idempotency](https://docs.upscrape.com/docs/api/idempotency)
