class praw.models.WikiPage(reddit: Reddit, subreddit: Subreddit, name: str, revision: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)

An individual WikiPage object.

Typical Attributes

This table describes attributes that typically belong to objects of this class. Since attributes are dynamically provided (see Determine Available Attributes of an Object), there is not a guarantee that these attributes will always be present, nor is this list necessarily complete.




The contents of the wiki page, as HTML.


The contents of the wiki page, as Markdown.


A bool representing whether or not the authenticated user may edit the wiki page.


The name of the wiki page.


The Redditor who authored this revision of the wiki page.


The time of this revision, in Unix Time.


The Subreddit this wiki page belongs to.

__init__(reddit: Reddit, subreddit: Subreddit, name: str, revision: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)

Construct an instance of the WikiPage object.


revision – A specific revision ID to fetch. By default, fetches the most recent revision.

edit(content: str, reason: Optional[str] = None, **other_settings: Any)

Edit this WikiPage’s contents.

  • content – The updated Markdown content of the page.

  • reason – (Optional) The reason for the revision.

  • other_settings – Additional keyword arguments to pass.

For example, to replace the first wiki page of r/test with the phrase test wiki page:

page = next(iter(reddit.subreddit("test").wiki))
page.edit(content="test wiki page")

Provide an instance of WikiPageModeration.

For example, to add spez as an editor on the wikipage praw_test try:

classmethod parse(data: Dict[str, Any], reddit: Reddit) → Any

Return an instance of cls from data.

  • data – The structured data.

  • reddit – An instance of Reddit.

revision(revision: str)

Return a specific version of this page by revision ID.

To view revision [ID] of "praw_test" in /r/test:

page = reddit.subreddit("test").wiki["praw_test"].revision("[ID]")
revisions(**generator_kwargs: Union[str, int, Dict[str, str]]) → Generator[praw.models.reddit.wikipage.WikiPage, None, None]

Return a ListingGenerator for page revisions.

Additional keyword arguments are passed in the initialization of ListingGenerator.

To view the wiki revisions for "praw_test" in /r/test try:

for item in reddit.subreddit("test").wiki["praw_test"].revisions():

To get WikiPage objects for each revision:

for item in reddit.subreddit("test").wiki["praw_test"].revisions():


This list of attributes is not complete. PRAW dynamically provides the attributes that Reddit returns via the API. Because those attributes are subject to change on Reddit’s end, PRAW makes no effort to document them, other than to instruct you on how to discover what is available. See Determine Available Attributes of an Object for detailed information.