Get a Subreddit's Wiki Page (Markdown, HTML)
Fetch a subreddit's wiki page by name and page, the page's markdown and HTML content, a may-revise flag, and the last revision. Returns a single object.
/api/reddit/sub/:name/wiki/:page$0.002 / callA subreddit's wiki page (Reddit's /r/<name>/wiki/<page> data): the page's
markdown and HTML content, a may-revise flag, and the last revision's metadata.
Returns a single object, not a list. The page may be multi-segment, for
example index, rules, or config/sidebar.
When to use this
Use it to read a community's wiki programmatically: its rules page, its FAQ,
or a config page like config/sidebar. You get both the raw markdown
(content_md) and the rendered HTML (content_html), plus who last revised the
page and when. One read.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Subreddit name (no r/ prefix) |
page | string | Yes | Wiki page name (e.g. index, rules). May be multi-segment like config/sidebar |
A subreddit or wiki page that does not exist returns 404.
Example
curl -H "Authorization: Bearer $TOKEN" \
"https://api.redditapis.com/api/reddit/sub/python/wiki/index"const response = await fetch(
"https://api.redditapis.com/api/reddit/sub/python/wiki/index",
{ headers: { Authorization: "Bearer TOKEN" } }
);
const data = await response.json();import requests
response = requests.get(
"https://api.redditapis.com/api/reddit/sub/python/wiki/index",
headers={"Authorization": "Bearer TOKEN"},
)Response Shape
{
"page": "index",
"content_md": "# Welcome to r/python\n\nRead the rules before posting.",
"content_html": "<div class=\"md\"><h1>Welcome to r/python</h1></div>",
"may_revise": true,
"revision_id": "a1b2c3d4-0000-1111-2222-333344445555",
"revision_date_utc": 1682000000,
"revision_date": "2023-04-20T14:13:20.000Z",
"revised_by": "some_moderator",
"reason": "Updated the posting rules"
}Response Fields
| Field | Type | Notes |
|---|---|---|
page | string | The wiki page that was requested (echoed back) |
content_md | string | null | The page's raw markdown (may be null on an empty page) |
content_html | string | null | The page's rendered HTML (may be null on an empty page) |
may_revise | boolean | null | Whether the calling account may revise the page (may be null) |
revision_id | string | null | Id of the last revision (may be null) |
revision_date_utc | number | null | Unix epoch seconds of the last revision (may be null) |
revision_date | string | null | ISO-8601 form of revision_date_utc (may be null) |
revised_by | string | null | Username of the last reviser (may be null) |
reason | string | null | The revision reason, if the reviser gave one (may be null) |
Independent third-party API for developers and researchers. Not affiliated with, endorsed by, or sponsored by Reddit, Inc.
Subreddit Moderators
Fetch a subreddit's moderator team by name, each moderator's username, id, mod permissions, flair text, and the time they were added.
Popular Subreddits
Browse the most-subscribed, trending subreddits right now, no keyword needed. Returns a subreddits listing with a cursor, for discovery.
