Every page of a community’s wiki in one call, index first, merged into content and listed in pages. Restricted, missing and disabled pages are listed in skipped; pages not read within about 25 seconds in not_attempted (read them with /subreddit/wiki). A community without a readable wiki answers pages: []. Billed 1 request for the page list plus 1 per page read.
HTTP Request
GET /subreddit/wiki-export
Cost (in requests): 1 + 1 per page read. Every successful answer reports its cost in data.billed_requests.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
subreddit | string | Yes | - | Subreddit name (case-insensitive, with or without r/) or its t5_ id. |
max_pages | integer | No | 50 | Wiki pages read, 1–100 (default 50), index first, then the order of /subreddit/wiki-pages. Billed 1 request per page read. |
max_tokens | integer | No | 50000 | Size cap of content in estimated tokens (4 characters per token), 500–100,000 (default 50,000). The wiki is cut at the cap on a page boundary; pages still holds every page read. |
format | string | No | markdown | markdown (default): one document, each page as # title (the path when the page has no title) followed by its Markdown. jsonl: one JSON object per line and page {type, path, title, revised_at, revised_by, text}. |
include_html | boolean | No | false | Adds body_html (the rendered HTML) to every page. Default: left out; body_markdown carries the same text. |
Response
Real response to GET /subreddit/wiki-export?subreddit=python (arrays trimmed to 2 items, long texts cut with …).
| |
Response Fields
| Field | Type | Description |
|---|---|---|
status | boolean | true when the request succeeded |
request_id | string | Unique request identifier |
data | object | The wiki export; null with error.code = not_found (subreddit). |
data.subreddit | string | Subreddit name. |
data.pages_total | integer | Pages eligible for export: the pages the wiki has, without tree parents that have no page of their own and without moderator configuration pages (config/*, AutoModerator, Toolbox). |
data.pages_exported | integer | Pages present in content. |
data.truncated | boolean | True when content leaves part of the wiki out: the max_tokens cap, the max_pages cap or pages not read in time (not_attempted). |
data.token_count | integer | Estimated tokens in content (characters ÷ 4). |
data.char_count | integer | Characters in content. |
data.content | string | Every readable page merged in the requested format, index first then the wiki’s tree order; empty when the community has no readable wiki. |
data.pages | array of objects | Every readable page read, in the same order (also the ones max_tokens left out of content); empty when the community has no readable wiki. |
data.pages[].path | string | Page path (the wiki_page of /subreddit/wiki). |
data.pages[].parent | string / null | Parent page path for nested pages. |
data.pages[].depth | integer | Nesting depth (0 = top). |
data.pages[].revised_at | string | ISO-8601 UTC time of the latest revision. |
data.pages[].revised_by | string | Username of the latest editor. |
data.pages[].body_markdown | string | Page as Markdown: Reddit’s source when it serves it, else converted from the HTML; null when the page is empty. |
data.skipped | array | Pages read but not readable, in the same order; billed (they were read). |
data.not_attempted | array | Page paths not read in time, in the same order; not billed. Read them with /subreddit/wiki. |
data.billed_requests | integer | Requests billed for this call (also sent as Requests in the X-RapidAPI-Billing header when it is not RapidAPI’s default of 1). |
request_params | object | Echo of the parameters you sent |
Error Responses
Invalid input returns HTTP 400, not billed. error is a plain string that names the parameter:
| |
| Status Code | Cause | Description |
|---|---|---|
| 400 | Invalid or missing parameter | Plain-English message per field. Not billed |
200 with status: false | Item not available | error.code is not_found, banned, private, quarantined. data is null. Billed 1 request |
| 503 | Reddit temporarily unreachable | "error": "Service temporarily unavailable". Not billed, retry later |
Code Examples
| |
| |
| |
Related Endpoints
- Subreddit Wiki : A subreddit wiki page (HTML, markdown, latest revision)
- Subreddit Wiki Pages : All wiki pages of a subreddit
- Subreddit Insights : When to post and what works in a community: timing, flairs, post kinds, engagement