# Reverse Text API

> Reverse Text transforms text by reversing characters, words, or lines with multiple reversal modes for different use cases.

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

## Overview

A reverse text API for flipping strings backwards and reordering words or lines. Send any text and choose how it should be reversed and reorganized: character by character for backwards text, word by word to flip the order of a sentence, or line by line to turn a list upside down.

Character reversal is the classic reverse string operation used in puzzles, novelty text, palindrome tools and coding exercises. Word reversal keeps every word readable but swaps their order, which suits word games and language exercises. Line reversal flips logs, lists and CSV rows so the newest or last entry comes first without parsing anything.

Each response includes the reversed result, the original text, the mode that was applied and the length of the input, so you can display both versions side by side or log what changed. Every field is returned on every plan, including the Free plan.

## 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/reversetext" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello World","mode":"characters"}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | string | Yes | Text to reverse |
| `mode` | string | No | Reversal mode. default characters. One of: characters, words, lines |

## Response fields

- `reversed` — string · Reversed text result
- `original` — string · Original input text
- `mode` — string · Reversal mode that was applied
- `length` — number · Character length of the original text

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "reversed": "dlroW olleH",
    "original": "Hello World",
    "mode": "characters",
    "length": 11
  }
}
```

## Use cases

- **Text Effects** — Create reversed text effects for creative content and visual designs
- **String Manipulation** — Reverse strings for data processing and algorithm testing
- **Content Transformation** — Transform text content with different reversal modes for specific formatting needs
- **Data Processing** — Process and reverse text data for analysis and transformation tasks

## SDKs

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

## More

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