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

Reddit subreddit wiki API

One page of a community wiki: rendered HTML, markdown (the source as written with source=true), and who revised it last and when.

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

res = requests.get(
    "https://api.groundsocial.dev/v1/reddit/subreddits/Python/wiki?page=index&source=true",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"kind": "wikipage",
"data": {
"page": "index",
"content_md": "# Welcome to r/Python \nSubreddit dedicated to news about the dynamic, interpreted, interactive, \nobject-oriented, exten…",
"content_html": "<div class=\"md\"><div class=\"md wiki\"><h1 id=\"wiki_welcome_to_r.2Fpython\">Welcome to <a href=\"/r/Python\" rel=\"nofollow\">r…",
"may_revise": false,
"revision_date": 1603402766,
"revision_by": {
"kind": "t2",
"data": {
"name": "IAmKindOfCreative"
}
},
"revision_id": null,
"reason": null
}
}

Parameters

NameTypeDescription
namepath · requiredstringSubreddit name, with or without "r/". "all" and "popular" also work for posts. Example: typescript.
pagequerystringWiki page name. Default index. Example: index.
sourcequery"true" | "false"true: the markdown source as written. Default false. One of true, false.
Response fields

200 with a WikiPage, in Reddit’s own Things and Listings.

FieldTypeDescription
kind"wikipage"
dataobject
Status codes
StatusMeaning
200The wiki page.
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

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