# Anagram Detector API

> Anagram Detector checks whether two words or phrases are anagrams of each other. Submit two strings to receive a true or false match verdict, cleaned comparison text, and character counts with options to ignore letter case, spaces, punctuation and accents.

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

## Overview

An anagram checker API for word games, puzzles and text comparison. Anagram Detector takes two words or phrases and tells you whether one is a rearrangement of the other, after normalizing both texts the way you choose: ignoring letter case, ignoring spaces, or both.

Every request returns the true or false verdict, the two cleaned strings that were actually compared, and their character counts, so you can show a player exactly why "Dormitory" and "dirty room" matched. Game builders use it to validate guesses in anagram rounds, teachers use it for vocabulary exercises, and developers use it to compare short strings without writing their own normalization rules.

The Free plan returns the verdict, cleaned text and lengths. Paid plans add the alphabetically sorted letters of each input and a similarity percentage, which help when two inputs are close but not exact anagrams, for example to tell a player they are one letter away.

## 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/anagramdetector?text1=listen&text2=silent&ignorecase=true&ignorespaces=true&ignorepunctuation=true&ignoreaccents=true" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text1` | string | Yes | The first text to compare |
| `text2` | string | Yes | The second text to compare |
| `ignorecase` | boolean | No | Ignore case when comparing (default: true). default true |
| `ignorespaces` | boolean | No | Ignore spaces when comparing (default: true). default true |
| `ignorepunctuation` | boolean | No | Ignore punctuation and symbols when comparing, so Funeral! and Real fun. match (default: true). default true |
| `ignoreaccents` | boolean | No | Ignore accents and other diacritics when comparing, so résumé matches resume (default: true). default true |

## Response fields

- `text1` — string · The first input text provided for comparison
- `text2` — string · The second input text provided for comparison
- `is_anagram` — boolean · Boolean indicating whether the texts are anagrams
- `cleaned_text1` — string · First text after applying ignore case and space options
- `cleaned_text2` — string · Second text after applying ignore case and space options
- `sorted_text1` — string · Characters of first text sorted alphabetically · (premium)
- `sorted_text2` — string · Characters of second text sorted alphabetically · (premium)
- `length_text1` — number · Character count of the first text
- `length_text2` — number · Character count of the second text
- `similarity_percentage` — number · Percentage similarity score between the two texts · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "text1": "listen",
    "text2": "silent",
    "is_anagram": true,
    "cleaned_text1": "listen",
    "cleaned_text2": "silent",
    "sorted_text1": "eilnst",
    "sorted_text2": "eilnst",
    "length_text1": 6,
    "length_text2": 6,
    "similarity_percentage": 100
  }
}
```

## Use cases

- **Word Games** — Validate anagrams in word puzzles, Scrabble, and anagram-based games
- **Cryptography** — Analyze anagram-based ciphers and cryptographic puzzles
- **Linguistics** — Study anagram relationships in language research and text analysis
- **Educational Apps** — Create interactive tools for teaching anagrams and word patterns

## SDKs

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

## More

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