# Palindrome Checker API

> Palindrome Checker tests whether a string reads the same forwards and backwards, with options to ignore casing, spacing, and punctuation. It returns the boolean verdict, the normalized text, the reversed comparison string, and the length of the longest palindromic sequence.

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

## Overview

Palindrome Checker works by cleaning and normalizing text according to specified options, then comparing it with its reverse. Also finds the longest palindromic substring using efficient algorithms for additional text analysis.

## 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 "https://api.apiverve.com/v1/palindromechecker?text=A%20man%20a%20plan%20a%20canal%20Panama&ignorecase=true&ignorespaces=true&ignorepunctuation=true" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | string | Yes | The text to check for palindrome. Maximum 20000 characters. length 0-20000 |
| `ignorecase` | boolean | No | Ignore case when checking (default: true). default true |
| `ignorespaces` | boolean | No | Ignore spaces when checking (default: true). default true |
| `ignorepunctuation` | boolean | No | Ignore punctuation when checking (default: true). default true |

## Response fields

- `text` — string · The text that was checked
- `is_palindrome` — boolean · Whether the text is a valid palindrome
- `cleaned_text` — string · Text after applying normalization options
- `reversed_text` — string · The normalised text reversed, which is what the comparison is made against
- `length` — number · Length of the text that was checked
- `options` — object · Which normalisations were applied before comparing
  - `options.ignore_case` — boolean · Whether capitalisation was ignored
  - `options.ignore_spaces` — boolean · Whether spaces were ignored
  - `options.ignore_punctuation` — boolean · Whether punctuation was ignored
- `longest_palindrome_substring` — string · Longest palindromic substring found · (premium)
- `longest_palindrome_length` — number · Length of longest_palindrome_substring, measured on the cleaned text.

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "text": "A man a plan a canal Panama",
    "is_palindrome": true,
    "cleaned_text": "amanaplanacanalpanama",
    "reversed_text": "amanaplanacanalpanama",
    "length": 21,
    "options": {
      "ignore_case": true,
      "ignore_spaces": true,
      "ignore_punctuation": true
    },
    "longest_palindrome_substring": "amanaplanacanalpanama",
    "longest_palindrome_length": 21
  }
}
```

## Use cases

- **Word Games** — Validate palindromes in word puzzles, games, and educational applications
- **Text Analysis** — Analyze text patterns and linguistic properties in natural language processing
- **Input Validation** — Check usernames, passwords, or text inputs for palindromic patterns
- **Educational Tools** — Create interactive learning tools for teaching palindromes and text patterns

## SDKs

- **npm** — `npm install @apiverve/palindromechecker` (https://www.npmjs.com/package/@apiverve/palindromechecker)
- **NuGet** — `dotnet add package APIVerve.API.PalindromeChecker` (https://www.nuget.org/packages/APIVerve.API.PalindromeChecker)
- **Source** — https://github.com/apiverve/palindromechecker-api

## More

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