Social media4 min readBy Purrkey teamUpdated

How to fetch a subreddit's details on Reddit

Get a subreddit's weekly active users, advertiser category, description, icon, and creation date by name

On this page

Fetching a subreddit's details by name is a lookup task. You give the community name, and the tool returns metadata such as weekly active users, advertiser category, description, icon, and creation date. A practical deliverable is a table with one row per subreddit and columns for name, weeklyActiveUsers, advertiserCategory, description, iconUrl, and createdUtc. This design keeps the request small and makes the result easy to review. The goal is a repeatable batch that you can review row by row without guessing at missing values

Deliverable table design

Start with the community name in plain text, then map the response fields into the table. name is the subreddit name without the r/ prefix. weeklyActiveUsers is an integer or null. advertiserCategory is a string or null. description is text, iconUrl is a URL, and createdUtc is a UTC epoch timestamp in seconds. If a null appears, mark the row for manual review rather than filling the gap with a guess. Keep one row per input name so the batch stays easy to audit. Use a clearly invented community name in examples so the reader knows to swap in a real community

Input fields and routing limit

Call anyapi.reddit.subreddit_details with subreddit set to the community name without the r/ prefix. The name is case-sensitive. For example, use ExampleCommunity rather than r/ExampleCommunity. The optional requireFields array lets you name output fields this request must be able to return, such as weeklyActiveUsers or advertiserCategory. If you omit it, routing is unchanged and the cheapest source serves. If the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. Naming a combination that no single source returns together is refused as invalid input, with no charge. Fields you do not name are still returned when the serving source has them. This routing rule is the main price limit to watch next to the input step. A named field can still be absent on a subreddit that genuinely lacks it, so treat a null in a named field as valid data rather than a routing failure

How to read the response

The response includes found, data, and, when no result exists, reason. A lookup that returns found: false is a successful, billed call, not an error. In that case data is null and reason is not_found. When found is true, data contains the subreddit record. Read weeklyActiveUsers as an integer or null, and advertiserCategory as a string or null. A null means the serving source does not publish that field. The record also includes id, name, description, iconUrl, and createdUtc. id is the Reddit fullname, such as t5_2qh1i. createdUtc is a UTC epoch timestamp in seconds; multiply by 1000 for a JavaScript Date in milliseconds. The other text fields are populated when the provider has data for the entity. Check the found value before reading data, because a missing result does not fill the object with placeholder text

Agent prompt for a batch lookup

Use a short prompt that tells the agent to confirm the current input schema and price before it spends a call. This avoids running a stale plan. The prompt should name the tool, the batch size, the output columns, and the review rule for null values

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to fetch subreddit details for a batch of 25 community names. Use the anyapi.reddit.subreddit_details tool with subreddit set to each name without the r/ prefix. Check the current inputs and price of anyapi.reddit.subreddit_details before running. Return a table with name, weeklyActiveUsers, advertiserCategory, description, iconUrl and createdUtc. Mark null weeklyActiveUsers or advertiserCategory values for manual review.

Estimated tool cost

The tool runs through POST /v1/runs with toolId anyapi.reddit.subreddit_details. Tool path: anyapi.reddit.subreddit_details. Successful runs settle at the actual AnyAPI charge. The catalog path is social-media/reddit-subreddit-details. The totals below are ceilings

RowsMaximumBasis
1up to $0.0012one call
25up to $0.0325 calls at the per call ceiling
100up to $0.12100 calls at the per call ceiling

At the listed ceiling of up to $0.0012 per call, 25 calls total at most $0.03. Model fees are not counted. The table uses the per call ceiling, so actual charges can be lower when a cheaper source serves

Next action

Run the prompt on five subreddits first, check the table against the response, then expand to the full 25 rows

Get started by giving this to your agent

  • Claude Code
  • Codex
  • Gemini CLI
  • Cursor
  • GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Reddit.
Explore Reddit tools and pricing

FAQ

How do I fetch a subreddit's details by name?

Call anyapi.reddit.subreddit_details with subreddit set to the community name without the r/ prefix. The name is case-sensitive, and the response includes found, data and, when no result exists, reason.

What inputs does the tool take?

It takes subreddit, required, plus optional requireFields. requireFields is an array limited to advertiserCategory or weeklyActiveUsers.

What does found false mean in this tool?

found: false means the lookup returned nothing; data is null and reason is not_found. It is a successful, billed call rather than an error.

How do I read weeklyActiveUsers and advertiserCategory?

weeklyActiveUsers is an integer or null, and advertiserCategory is a string or null. A null means the serving source does not publish that field.

How much does it cost to fetch details for 25 subreddits?

At the listed ceiling of up to $0.0012 per call, 25 calls total at most $0.03. Successful runs settle at the actual AnyAPI charge, and model fees are not counted.

Can I use an r/ prefix in the subreddit field?

No. The input description says the subreddit name must omit the r/ prefix and is case-sensitive.

What happens if requireFields routes to a dearer source?

When the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. Naming a combination that no single source returns together is refused as invalid input, with no charge.

Next step

Try this with Reddit

The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.

See Reddit tools

Share this article