Scoped Search Replace Preview
scoped_search_replace_previewPreview search-and-replace results across selected pages, folders, templates, or categories before applying changes, avoiding unintended site-wide edits.
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
Only live pages are searched: fork copies named in content_ids come back in "skipped" as {id, reason}.
Example: {"search": "old text", "replace": "new text", "folder_path": "/blog"}
Always run preview before execute.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| regex | No | If true, treat search as a Go regular expression. Use $1, $2 for capture group references in replace. | |
| search | Yes | Text to search for,required | |
| replace | Yes | Replacement text (empty string to delete) | |
| 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) | |
| template_name | No | Limit to pages using this template name (e.g. 'Concept Page') | |
| auto_republish | No | If true (execute only), re-publish all previously-published pages immediately after updating them (saves a separate publish_multiple call) | |
| version_comment | No | Version comment for updated pages |