Search inside page text
grep_pagesFind specific text in Wiki.js pages using regex, returning matching lines with context. Use path prefix, tags, or locale to narrow the search.
Instructions
Searches the actual text of pages with a regular expression, by fetching them and matching locally. This exists because Wiki.js’ default search engine does not index page content at all. It is the expensive path — one request per page — so narrow it with path_prefix, tags or locale, and keep max_pages small. Returns matching lines with context, not whole pages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | ||
| locale | No | Locale code. Defaults to WIKIJS_LOCALE. The locale is part of a page’s identity. | |
| pattern | Yes | JavaScript regular expression, matched against page content. | |
| max_pages | No | How many pages to fetch at most (default 60). | |
| ignore_case | No | Case-insensitive matching (default true). | |
| path_prefix | No | Only pages whose path starts with this prefix. | |
| context_lines | No | Lines of context around each match (default 1). |