# Syllable Counter API

> Syllable Counter counts syllables across any submitted text string up to 500 characters. It returns the total syllable count, total word count, and average syllables per word.

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

## Overview

Syllable Counter works by analyzing text word-by-word using the CMU Pronouncing Dictionary to count syllables based on phonetic data. For unknown words, it uses rule-based syllable counting. Maximum text length is 500 characters.

## 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/syllablecounter" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"The quick brown fox jumps over the lazy dog"}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | string | Yes | The text to count syllables in (max 500 characters). length 0-500 |

## Response fields

- `text` — string · The input text that was analyzed, trimmed of leading and trailing whitespace
- `total_syllables` — number · Total syllable count across all words in text
- `word_count` — number · Total number of words analyzed
- `average_syllables_per_word` — number · Mean number of syllables per word (total_syllables divided by word_count), rounded to two decimal places
  - `words.0.word` — string · The word as analyzed, lowercased with surrounding punctuation stripped · (premium)
  - `words.0.syllables` — number · Number of syllables counted in this word · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "text": "The quick brown fox jumps over the lazy dog",
    "total_syllables": 11,
    "word_count": 9,
    "average_syllables_per_word": 1.22,
    "words": [
      {
        "word": "the",
        "syllables": 1
      },
      {
        "word": "quick",
        "syllables": 1
      },
      {
        "word": "brown",
        "syllables": 1
      },
      {
        "word": "fox",
        "syllables": 1
      },
      {
        "word": "jumps",
        "syllables": 1
      },
      {
        "word": "over",
        "syllables": 2
      },
      {
        "word": "the",
        "syllables": 1
      },
      {
        "word": "lazy",
        "syllables": 2
      },
      {
        "word": "dog",
        "syllables": 1
      }
    ]
  }
}
```

## Use cases

- **Readability Analysis** — Calculate syllable counts for readability scores like Flesch-Kincaid and Flesch Reading Ease
- **Poetry & Lyrics** — Verify syllable counts in poetry, song lyrics, and haiku to match required meters and structures
- **Education** — Create educational materials with appropriate syllable complexity for different reading levels
- **Content Optimization** — Analyze content syllable counts to adjust writing complexity for target audiences

## SDKs

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

## More

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