# Phonetic Encoder API

> Phonetic Encoder generates phonetic codes for words using Soundex and Metaphone algorithms. These codes represent how words sound, enabling fuzzy matching of similar-sounding names.

**Endpoint:** `GET https://api.apiverve.com/v1/phonetic`  
**Category:** Text Processing  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/phonetic

## Overview

A phonetic encoder API with Soundex and Metaphone for matching words by how they sound rather than how they are spelled. Compare two words to check if they sound alike, or encode individual words for database indexing and search applications. Essential for name matching, spell checking, and genealogical research.

Encoding a word returns its Soundex code, its Metaphone code, or both. Comparing two words returns each word's codes and a match flag per algorithm, so "Smith" and "Smythe" can be recognized as the same name in a customer list. Store the codes next to your records and you get fuzzy name matching with a plain equality lookup, which is how sounds-alike search works in CRMs, record linkage, census and family-history data.

Soundex is coarse and forgiving, while Metaphone follows more English pronunciation rules; returning both lets you choose the trade-off per use. Every field is available 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 "https://api.apiverve.com/v1/phonetic?word=smith&algorithm=both" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `word` | string | Yes | The word to encode phonetically |
| `algorithm` | string | No | Algorithm to use. default both. One of: soundex, metaphone, both |

## Response fields

- `word` — string · Original word that was encoded
- `soundex` — string · Soundex phonetic code for the word
- `metaphone` — string · Metaphone phonetic code for the word

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "word": "smith",
    "soundex": "S530",
    "metaphone": "SM0"
  }
}
```

## Use cases

- **Name Matching** — Find similar names despite spelling variations
- **Search Enhancement** — Improve search results with phonetic matching
- **Data Deduplication** — Identify duplicate records with name variations
- **Genealogy Research** — Match historical records with spelling variations

## SDKs

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

## More

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