NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Pig Latin API

POST

Translate sentences into Pig Latin while protecting key words.

Pig Latin translates English text into Pig Latin while preserving designated words from transformation. Pass any sentence along with an optional exclusion list to receive the encoded phrase and confirmed skipped terms.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/piglatin
Body
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "text": "Ethay uaresqay oodenway crate asway ackedpay otay ebay ippedshay. Otay avehay isyay etterbay anthay otay aitway andyay hope.",
    "exclusions": [
      "crate",
      "hope"
    ]
  }
}

About the Pig Latin API

A Pig Latin translator API that converts English text to Pig Latin. Submit plain text strings along with an optional array of words you want untouched, and the endpoint converts each non-excluded word into standard Pig Latin and returns the transformed string, so "The square wooden crate" comes back as "Ethay uaresqay oodenway crate" when "crate" is excluded.

It is used in word-game and kids' learning apps, chat bots and Discord commands, novelty text generators and classroom exercises about how language rules work. Because capitalization, punctuation and line breaks survive the translation, you can pass in whole paragraphs and display the result as-is.

The exclusion list is useful for names, brands and technical terms that should stay readable. Any provided exclusion terms are trimmed of whitespace, de-duplicated, and confirmed in the response next to the translated text. The full response is available on every plan, including the Free plan.

How it works

Pig Latin uses the pig-latinizer library to translate text. Words are split on whitespace, slashes, underscores and dashes. A word that begins with a consonant has its leading consonant cluster moved to the end followed by "ay", so "packed" becomes "ackedpay"; a word that begins with a vowel gets "yay" appended, so "is" becomes "isyay". Y is treated as a consonant at the start of a word and as a vowel elsewhere.

Capitalization is carried over to the translated word, so "The" becomes "Ethay" and an all-caps word stays all caps. Punctuation, spaces, tabs and line breaks are preserved in place. Apostrophes inside contractions and possessives are removed so "don't" translates cleanly, and when a translation would end in a hard-to-read repeated consonant the library inserts a hyphen. Tokens with no sensible Pig Latin form, such as words containing digits, are passed through unchanged.

exclusions is an optional array of strings. Each entry must be a string; any other type returns a 400 error naming the bad index. Entries are trimmed and duplicates removed, and each remaining entry is added to the translator's exclusion list so matching words are output untranslated. The cleaned list is echoed back as exclusions, or as an empty array when none were sent. text in the response holds the translated string. There are no plan-dependent fields.

What people use it for

Word Game Mechanics
Word game developers transform clues or puzzle prompts into Pig Latin while keeping player names and brand terms intact.
Chat Filter Plugins
Social messaging platforms offer playful message filters that translate conversational dialogue on demand before posting to a room.
Linguistics Practice Tools
To teach phonetics and syllable structures, reading software converts sample vocabulary while protecting punctuation and specific instructional terms.
Spoiler Text Obfuscation
Obfuscate plot spoilers in community discussion boards so readers must decode the Pig Latin sentences manually to see details.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Pig Latin

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Pig Latin API.

Read the docs →
Can I prevent specific words from being translated?
Yes. Pass an array of words in the exclusions parameter, and the API will leave those exact terms untouched in the output. This makes it easy to preserve brand names, proper nouns, or code tokens.
Does the encoder handle full sentences or only single words?
It accepts full sentences and longer blocks of text. Pass your string into the text parameter, and Pig Latin will process the entire passage in a single request.
What happens if an exclusion contains extra whitespace or duplicate entries?
The API handles them automatically. Any terms provided in the exclusions parameter are trimmed of extra spaces and de-duplicated before translation, and the cleaned list is returned in the response.
What would 20,000 text conversions cost me?
At 1 credit per call, 20,000 conversions take 20,000 credits, which uses a tenth of the Starter plan's 200,000 monthly credits. On Starter, that volume works out to about $0.15 per 1,000 calls or roughly $0.00015 per call. The Free plan includes 200 calls per month.
Does the response confirm which words were skipped?
Yes. Alongside the encoded text, the response includes an exclusions array showing every word left untranslated. This lets your code confirm which terms were protected without parsing the output yourself.

Ready to build with Pig Latin? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs