Get a page
get_pageFetch a Wiki.js page by ID or path and locale. Choose metadata, outline, content, or rendered HTML; use section, offset, or max_chars to read long pages in windows.
Instructions
Reads one page, addressed by page_id or by path plus locale. Choose a mode: "metadata" for everything but the text, "outline" for the headings only (cheapest way to see what a long page contains), "content" for the source, "rendered" for the HTML. With mode=content, either pass section to get one heading’s worth, or offset and max_chars to read the page in windows — a large page will otherwise be truncated to fit the result budget.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | What to return (default "content"). | |
| path | No | Page path without a leading slash and without the locale prefix, e.g. "docs/setup". A browser URL looks like /en/docs/setup — drop the "en/", it is the locale argument. (Not enforced: "ci/", "db/" and "qa/" are perfectly good first segments that happen to look like locale codes.) | |
| locale | No | Locale code. Defaults to WIKIJS_LOCALE. The locale is part of a page’s identity. | |
| offset | No | With mode=content: character offset to start at. | |
| page_id | No | Numeric Wiki.js id. | |
| section | No | With mode=content: return only the section under this heading, including its subsections. Refuses an ambiguous heading rather than guessing. | |
| max_chars | No | With mode=content: how much to return (default 20000). |