100 free credits. No credit card required. Get a key

groundsocial

Reddit subreddit API

A community’s description, member count, type (public, restricted, private) and flags, as the t5 Thing Reddit itself returns.

GET /v1/reddit/subreddits/{name}1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/reddit/subreddits/selfhosted",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit

No bundled sample for this call. The response is a Subreddit; its fields are listed below.

Parameters

NameTypeDescription
namepath · requiredstringSubreddit name, with or without "r/". "all" and "popular" also work for posts. Example: typescript.

Response

200 with a Subreddit, in Reddit’s own shape.

FieldTypeDescription
kind"t5"
dataobject

Status codes

StatusMeaning
200The subreddit.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404The subreddit, post or user does not exist.
429Too many requests. Wait for Retry-After seconds.
503Reddit is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Questions

About this endpoint. Reddit is a trademark of Reddit, Inc. We are not affiliated with or endorsed by Reddit.

Does it work for private communities?

No. A private or banned community answers 403 target_private and the call is refunded.