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

# Reddit Subreddit Details

> Sell reddit.subreddit_details on AnyAPI: the request your endpoint receives, the response it must return, and what the live trial grades.

Fetch a subreddit's metadata (weekly active users, description, and category).

This page is the seller-facing summary of one catalog API, `reddit.subreddit_details`. The transport rules that apply to every API a seller serves - signed requests, the response envelope, timeouts, and body limits - are on [the operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md).

## The price you compete with

AnyAPI publishes this API from **\$0.38 per 1,000 requests**. That is the price a buyer sees today, so it is the price your endpoint has to come in under to win traffic.

## The request your endpoint receives

| Field | Type | Required | What it means |
| - | - | - | - |
| `requireFields` | array | no | Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `weeklyActiveUsers` or `advertiserCategory`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a subreddit that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. |
| `subreddit` | string | yes | Subreddit name without the r/ prefix. Case-sensitive (e.g. "AskReddit", not "askreddit"). |

> **Full input JSON Schema**
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/reddit.subreddit_details.input.json",
>   "example": {
>     "subreddit": "programming"
>   },
>   "title": "Reddit subreddit details input",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "subreddit"
>   ],
>   "properties": {
>     "requireFields": {
>       "type": "array",
>       "uniqueItems": true,
>       "items": {
>         "type": "string",
>         "enum": [
>           "advertiserCategory",
>           "weeklyActiveUsers"
>         ]
>       },
>       "description": "Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `weeklyActiveUsers` or `advertiserCategory`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a subreddit that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge."
>     },
>     "subreddit": {
>       "type": "string",
>       "description": "Subreddit name without the r/ prefix. Case-sensitive (e.g. \"AskReddit\", not \"askreddit\")."
>     }
>   }
> }
> ```

## The response your endpoint must return

| Field | Type | Always present | What it means |
| - | - | - | - |
| `data` | null or object | yes | The subreddit record, or null when nothing was found. |
| `data.advertiserCategory` | string or null | yes | Reddit advertiser category for the subreddit, or null when the serving source does not publish it. |
| `data.createdUtc` | number | yes | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| `data.description` | string | yes | Subreddit description text. |
| `data.iconUrl` | string | yes | URL of the subreddit icon. |
| `data.id` | string | yes | Reddit fullname, e.g. "t5\_2qh1i". |
| `data.name` | string | yes | Subreddit name (without the r/ prefix). |
| `data.weeklyActiveUsers` | integer or null | yes | Number of users active in the past week, or null when the serving source does not publish it. |
| `found` | boolean | yes | True when the subreddit was found; false when the lookup returned nothing. |

Extra fields are kept, missing declared fields fail.

> **Full output JSON Schema**
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/reddit.subreddit_details.output.json",
>   "title": "Reddit subreddit details output",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "found",
>     "data"
>   ],
>   "properties": {
>     "found": {
>       "type": "boolean",
>       "description": "True when the subreddit was found; false when the lookup returned nothing."
>     },
>     "data": {
>       "oneOf": [
>         {
>           "type": "null"
>         },
>         {
>           "type": "object",
>           "required": [
>             "id",
>             "name",
>             "weeklyActiveUsers",
>             "description",
>             "advertiserCategory",
>             "iconUrl",
>             "createdUtc"
>           ],
>           "properties": {
>             "id": {
>               "x-anyapi-must-populate": true,
>               "type": "string",
>               "description": "Reddit fullname, e.g. \"t5_2qh1i\"."
>             },
>             "name": {
>               "x-anyapi-must-populate": true,
>               "type": "string",
>               "description": "Subreddit name (without the r/ prefix)."
>             },
>             "weeklyActiveUsers": {
>               "type": [
>                 "integer",
>                 "null"
>               ],
>               "description": "Number of users active in the past week, or null when the serving source does not publish it."
>             },
>             "description": {
>               "x-anyapi-must-populate": true,
>               "type": "string",
>               "description": "Subreddit description text."
>             },
>             "advertiserCategory": {
>               "type": [
>                 "string",
>                 "null"
>               ],
>               "description": "Reddit advertiser category for the subreddit, or null when the serving source does not publish it."
>             },
>             "iconUrl": {
>               "x-anyapi-must-populate": true,
>               "type": "string",
>               "description": "URL of the subreddit icon."
>             },
>             "createdUtc": {
>               "x-anyapi-must-populate": true,
>               "type": "number",
>               "description": "UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds."
>             }
>           }
>         }
>       ],
>       "description": "The subreddit record, or null when nothing was found."
>     }
>   }
> }
> ```

## Fields that must never come back empty

* `createdUtc`
* `description`
* `iconUrl`
* `id`
* `name`

The repository marks these fields as ones every source must be able to fill. An empty value is only correct when the entity itself genuinely has nothing there.

## Not found, and how it differs from empty

When the entity does not exist, answer 2xx with the not-found shape:

```json theme={"dark"}
{
  "found": false,
  "data": null
}
```

An empty result is not a not-found: when the entity exists but carries nothing, answer 2xx with `found: true` and the empty values.

This output schema declares no `reason` field, so `found: false` is the whole not-found answer.

## Example request

```json theme={"dark"}
{
  "subreddit": "programming"
}
```

The compatibility checks fire the schema's example at your endpoint. After that, your answers are graded against what the currently serving source returned for the same real customer inputs.

## Next

* [The operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md) for signing, budgets, and the live trial.
* [Every API open to sellers](https://getanyapi.com/docs/sell/apis/index.md).
* Want to sell an API that is not on that list? Email [support@getanyapi.com](mailto:support@getanyapi.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.