scoped_search_replace_preview
Preview text replacements on specific pages before applying changes. Control scope by folder, template, category, or page IDs to avoid site-wide modifications.
Instructions
Preview a search-and-replace limited to a subset of pages. Safer than site-wide replacement.
Scope options (all optional — leave blank to match all pages):
content_ids: specific page IDs
folder_path: pages under /blog, /docs, etc.
template_name: pages using "Concept Page", "Blog Post", etc.
category: pages with a matching category
Example: {"search": "old text", "replace": "new text", "folder_path": "/blog"}
Always run preview before execute.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auto_republish | No | If true (execute only), re-publish all previously-published pages immediately after updating them (saves a separate publish_multiple call) | |
| category | No | Limit to pages in this category | |
| content_ids | No | Limit to specific content IDs | |
| folder_path | No | Limit to pages whose URL starts with this path (e.g. /blog) | |
| regex | No | If true, treat search as a Go regular expression. Use $1, $2 for capture group references in replace. | |
| replace | Yes | Replacement text (empty string to delete) | |
| search | Yes | Text to search for,required | |
| template_name | No | Limit to pages using this template name (e.g. 'Concept Page') | |
| version_comment | No | Version comment for updated pages |