GET /subreddit/wiki-pages

Subreddit Wiki Pages

All wiki pages of a subreddit. Reddit Scraper API endpoint /subreddit/wiki-pages: parameters, JSON response fields and code examples.

Every page of a community’s wiki, flattened from the page tree: path (the wiki_page of /subreddit/wiki), title, parent page, depth and exists. A community without a readable wiki answers items: []. Billed 1 request per call.

HTTP Request

GET /subreddit/wiki-pages

Cost (in requests): 1. Every successful answer reports its cost in data.billed_requests.

Parameters

ParameterTypeRequiredDefaultDescription
subredditstringYes-Subreddit name (case-insensitive, with or without r/) or its t5_ id.

Response

Real response to GET /subreddit/wiki-pages?subreddit=python (arrays trimmed to 2 items, long texts cut with …).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
  "status": true,
  "request_id": "c23a39ab-660b-c3ba-7119-2a0dbbe4",
  "data": {
    "subreddit": "Python",
    "items": [
      {
        "wiki_page": "automoderator-schedule",
        "name": "automoderator-schedule",
        "parent": null,
        "depth": 0,
        "exists": true,
        "visibility_status": "visible"
      },
      {
        "wiki_page": "config",
        "name": "config",
        "parent": null,
        "depth": 0,
        "exists": false,
        "visibility_status": "visible"
      }
    ],
    "billed_requests": 1
  },
  "request_params": {
    "subreddit": "python"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique request identifier
dataobjectPage list; null with error.code = not_found.
data.subredditstringSubreddit name.
data.itemsarray of objectsWiki page tree, flattened.
data.items[].wiki_pagestringPage path usable as wiki_page.
data.items[].namestringLast path segment.
data.items[].parentstring / nullParent page path for nested pages.
data.items[].depthintegerNesting depth (0 = top).
data.items[].existsbooleanThe page exists (the tree also lists parent paths that have no page).
data.items[].visibility_statusstringPage visibility as Reddit reports it, lower case (e.g. visible).
data.billed_requestsintegerRequests billed for this call (also sent as Requests in the X-RapidAPI-Billing header when it is not RapidAPI’s default of 1).
request_paramsobjectEcho of the parameters you sent

Error Responses

Invalid input returns HTTP 400, not billed. error is a plain string that names the parameter:

1
{ "status": false, "request_id": "99a1e6cd-2e57-9e8f-4e44-2dea7f6d", "error": "Invalid parameter 'post_id': must be a post id such as z1c9z or t3_z1c9z", "request_params": { "post_id": "!!" } }
Status CodeCauseDescription
400Invalid or missing parameterPlain-English message per field. Not billed
200 with status: falseItem not availableerror.code is not_found, banned, private, quarantined. data is null. Billed 1 request
503Reddit temporarily unreachable"error": "Service temporarily unavailable". Not billed, retry later

Code Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import requests

url = "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/subreddit/wiki-pages"

params = {
    "subreddit": "python",
}

headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=params)
data = response.json()["data"]

for item in data["items"]:
    print(item["name"])
print("Billed requests:", data["billed_requests"])
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
const url = "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/subreddit/wiki-pages";

const params = new URLSearchParams({
  subreddit: "python",
});

const response = await fetch(`${url}?${params}`, {
  headers: {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
  }
});

const { data } = await response.json();
data.items.forEach((item) => console.log(item.name));
1
2
3
4
curl -G "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/subreddit/wiki-pages" \
  --data-urlencode "subreddit=python" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
Start building today

Get your API key and make your first request in under a minute.

Get Your API Key on RapidAPI