---
title: "Find and Replace"
method: POST
path: "/api/v1/tools/find-and-replace"
tags: ["tools"]
---

# Find and Replace

`POST /api/v1/tools/find-and-replace`

## Request

- Base URL: `https://toolforte.com`
- URL: `https://toolforte.com/api/v1/tools/find-and-replace`
- Auth: HTTP bearer

Replace every occurrence of a string or regular expression in a text. Supports case sensitivity, whole word matching and regex groups in the replacement. Returns the new text and the number of replacements.

## Request body

- object
  - `text` string
  - `find` string
  - `replace` string
  - `caseSensitive` boolean
  - `wholeWord` boolean
  - `useRegex` boolean

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `result` string
    - `count` integer

## Other responses

- `400`: Missing or invalid request fields
- `401`: Invalid or missing API key
- `429`: Monthly plan limit reached

---

[API](https://skmtc.dev/toolforte/apis/toolforte-api.md) · [All operations](https://skmtc.dev/toolforte/apis/toolforte-api/llms.txt) · [OpenAPI document](https://skmtc.dev/toolforte/apis/toolforte-api/revisions/4d814d484dfc?raw)
