# Remove Punctuation API

> Remove Punctuation strips punctuation marks from any submitted text string and returns the cleaned text. Paid plans add the total count and a list of every punctuation character removed.

**Endpoint:** `POST https://api.apiverve.com/v1/removepunctuation`  
**Category:** Text Processing  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/removepunctuation

## Overview

A remove punctuation API for cleaning text before you analyze, index or compare it. Remove Punctuation strips all standard punctuation characters from text, including quotes, brackets, dashes, and special symbols, and returns clean text with single spaces between words, ready for word counts, tokenizers, search indexes or slug generation.

It handles more than the keyboard set: curly quotes, em and en dashes, ellipses, guillemets and inverted Spanish question and exclamation marks are removed too, which is where simple find-and-replace scripts usually miss. Emoji and currency symbols such as the euro sign are left alone, so the text keeps its meaning. Data teams use it to normalize survey answers and product titles, developers use it before matching user input against stored values, and NLP pipelines use it as a text cleaning step before tokenizing.

The Free plan returns the cleaned text. Paid plans also return the list of distinct punctuation characters that were removed and the total number of characters stripped, which is useful for auditing what a cleaning step changed.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/removepunctuation" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello, world! How are you doing today? I'\''m great - thanks for asking. This text has lots of punctuation: periods, commas, hyphens & more!","replacement":"value","keepNumbers":true}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | string | Yes | The text to remove punctuation from |
| `replacement` | string | No | What removed punctuation becomes: none (deleted, the default) or space, so well-known becomes well known instead of wellknown. Apostrophes inside words are always deleted (don't becomes dont). default none. One of: none, space |
| `keepNumbers` | boolean | No | Keep periods, commas and colons that sit between two digits, so 3.14, 1,000 and 5:30 survive; they are not counted as removed. default false |

## Response fields

- `cleaned` — string · Text with all punctuation removed
- `punctuation_removed` — array · List of punctuation characters removed · (premium)
- `count` — number · Total count of punctuation characters removed · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "cleaned": "Hello world How are you doing today Im great thanks for asking This text has lots of punctuation periods commas hyphens more",
    "punctuation_removed": [
      "!",
      "&",
      "'",
      ",",
      "-",
      ".",
      ":",
      "?"
    ],
    "count": 11
  }
}
```

## Use cases

- **Text Analysis** — Clean text data before performing word frequency analysis, sentiment analysis, or natural language processing
- **Search Optimization** — Remove punctuation from search queries to improve matching and relevance in search systems
- **Data Normalization** — Standardize text data by removing punctuation before comparison or deduplication
- **Content Processing** — Clean user input or scraped content by removing punctuation for storage or display

## SDKs

- **npm** — `npm install @apiverve/removepunctuation` (https://www.npmjs.com/package/@apiverve/removepunctuation)
- **PyPI** — `pip install apiverve-removepunctuation` (https://pypi.org/project/apiverve-removepunctuation/)
- **NuGet** — `dotnet add package APIVerve.API.RemovePunctuation` (https://www.nuget.org/packages/APIVerve.API.RemovePunctuation)
- **Source** — https://github.com/apiverve/removepunctuation-api

## More

- Full reference: https://docs.apiverve.com/ref/removepunctuation
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
