Skip to end of metadata
Go to start of metadata
Contents Summary


This REST API allows you to replace text in a document. The API replaces all occurrences of a specified string with another string. If a captured or replacement string contains one or more special characters: paragraph break, cell break, section break, field start, field separator, field end, inline picture, drawing object, footnote, the API returns HTTP 400 error response.

The request parameters are the following:

Parameter NameTypeDescription
OldValuestringOld text value (or regex pattern (see "IsOldValueRegex")) to replace.
NewValuestringNew text value to replace by.
IsMatchCaseboolFlag, true means the search is case-sensitive; false means the search is not case-sensitive. Not used if "IsOldValueRegex" is set.
IsMatchWholeWordboolThe flag means that only whole word matched are replaced. Not used if "IsOldValueRegex" is set.
IsOldValueRegexboolThe flag means that "OldValue" contains regex expression.

Moreover, resource properties are the following:

Property NameTypeDescription
MatchesintegerReturns the number of matches.

Resource URI

Swagger UI lets you call this REST API directly from the browser.  

cURL Example



Using an SDK (API client) is the quickest way for a developer to speed up the development. An SDK takes care of a lot of low-level details of making requests and handling responses and lets you focus on writing code specific to your particular project. Check out our GitHub repository for a complete list of Aspose.Words Cloud SDKs along with working examples, to get you started in no time. Please check Available SDKs article to learn how to add an SDK to your project.

SDK Examples

  • No labels