# Reddit Subreddit Details API

Retrieve a subreddit's public identity and community description before collecting its discussions.

`GET https://socialmediascraper.org/v1/reddit/subreddit_details`

$0.002444 USD per request

## Authentication

Send your customer API key in x-api-key. Generate a new Idempotency-Key for each logical request and preserve it with identical input for retries.

## Request parameters

Query string

Provide at least one of: url.

### subreddit

string · Optional

Subreddit name to retrieve, such as technology.



Example: `"AskReddit"`

### url

string · Optional

Public reddit content or profile URL to retrieve. Paste the complete URL, including https://.



Example: `"https://www.reddit.com/r/AbsoluteUnits/"`

### cache_max_age

string · Optional

Maximum accepted age of a cached result. The allowed values below express days.

Allowed values: "1d", "3d", "7d", "14d", "30d"

Example: `"7d"`

## Request example

JavaScript examples use Node.js with built-in fetch; Python examples use the standard library. Configure SOCIALSCRAPER_API_KEY in the execution environment.

### cURL

```sh
curl --request GET 'https://socialmediascraper.org/v1/reddit/subreddit_details?url=https%3A%2F%2Fwww.reddit.com%2Fr%2FAbsoluteUnits%2F' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Idempotency-Key: example-request-0001' \
  --header 'x-price-version: 2026-11-23.retail-1'
```

### JavaScript

```javascript
const requestKey = crypto.randomUUID();
const response = await fetch("https://socialmediascraper.org/v1/reddit/subreddit_details?url=https%3A%2F%2Fwww.reddit.com%2Fr%2FAbsoluteUnits%2F", {
  method: "GET",
  headers: {
    "x-api-key": process.env.SOCIALSCRAPER_API_KEY,
    "Idempotency-Key": requestKey,
    "x-price-version": "2026-11-23.retail-1"
  }
});
const result = await response.json();
if (!response.ok) throw new Error(JSON.stringify(result));
console.log(result);
```

### Python

```python
import json, os, uuid
from urllib.request import Request, urlopen

request_key = str(uuid.uuid4())
request = Request(
    "https://socialmediascraper.org/v1/reddit/subreddit_details?url=https%3A%2F%2Fwww.reddit.com%2Fr%2FAbsoluteUnits%2F",
    method="GET",
    headers={
        "x-api-key": os.environ["SOCIALSCRAPER_API_KEY"],
        "Idempotency-Key": request_key,
        "x-price-version": "2026-11-23.retail-1",
    },
)
with urlopen(request, timeout=60) as response:
    print(json.load(response))
```

## Response and fields

The response uses request_id, data and meta. The table below describes the returned data object; keep null values when a source field has no value.

```json
{
  "request_id": "example-request-id",
  "data": {
    "platform": "reddit",
    "resource": "profile",
    "id": "123456789",
    "handle": null,
    "display_name": "Example text",
    "bio": "Example text",
    "profile_url": null,
    "avatar_url": null,
    "verified": null,
    "private": null,
    "metrics": {
      "followers": null,
      "following": null,
      "posts": null,
      "likes": null,
      "views": null
    }
  },
  "meta": {
    "platform": "reddit",
    "fetched_at": "2026-11-28T00:00:00.000Z",
    "cached": false,
    "schema_version": "2026-11-23.2",
    "route_version": 1,
    "billing": {
      "capability": "reddit.subreddit_details",
      "version": "2026-11-23.retail-1",
      "currency": "USD",
      "unit_scale": 1000000000,
      "amount_units": 2444000,
      "amount_usd": "0.002444000",
      "billing_basis": "request"
    }
  }
}
```

- `data.platform` (string): Source platform identifier.

- `data.resource` (string): Operation resource identifier.

- `data.id` (string): Source identity preserved as text.

- `data.handle` (null): Public account username or handle.

- `data.display_name` (string): Account or creator display name.

- `data.bio` (string): Public account biography or description.

- `data.profile_url` (null): Public account or channel URL.

- `data.avatar_url` (null): Account avatar reference.

- `data.verified` (null): Source verification flag when returned.

- `data.private` (null): Source privacy flag when returned.

- `data.metrics` (object): Available source metrics grouped by measurement.

- `data.metrics.followers` (null): Source-reported followers measurement when present.

- `data.metrics.following` (null): Source-reported following measurement when present.

- `data.metrics.posts` (null): Source-reported posts measurement when present.

- `data.metrics.likes` (null): Source-reported likes measurement when present.

- `data.metrics.views` (null): Source-reported views measurement when present.

## Pagination

Use the returned record or result set directly, then choose a related operation when your task needs additional data.

## Errors and recovery

Read the error code and request_id before deciding how to recover. Retain your original input and request identity when retrying the same operation.

400: Review parameter types and identifier-combination rules.

401: Check x-api-key and the key in your workspace.

402: Check the quoted request price and your available USD balance.

429: Wait for Retry-After before retrying with the original request identity.

If a request outcome is uncertain, read GET /v1/requests/:id using the returned request_id before starting a replacement.

## Build a workflow

Choose a Reddit community as a focused research source. Keep community identity with the collected records so your application can distinguish discussion within different audiences.

Price version: 2026-11-23.retail-1. Each additional page is billed as a request. Inspect meta.billing for the amount applied to your request.

[OpenAPI](https://socialmediascraper.org/api-reference/reddit.subreddit_details.openapi.json)

[API playground](https://socialmediascraper.org/playground/?capability=reddit.subreddit_details)
