apyhub
Back
▣ DEVELOPER TOOLS · FINANCE

Convert Number to Words API

What it does

Convert Number to Words API , converts a single number or a batch of up to 20 numbers into spelled-out text in multiple languages. Send digits and a target language, and get the word form back in the same order you submitted them.

Use the GET endpoint for one value or the POST endpoint when you need to process a list. Each item accepts number and language, and can also include case and form. case controls output casing with lower, upper, sentence, or title. form defaults to cardinal, or you can request currency:{CURRENCY} for supported currencies when you need amounts expressed as currency names and values in words.

The response returns the original number, the selected language, form, case, and the generated words string. Whole numbers from 0 up to 999,999,999,999,999 are accepted, and currency mode supports fractional values with up to 2 digits. Supported languages include English, French, German, Spanish, Portuguese, Dutch, Italian, Polish, Turkish, and others listed in the schema.

Use Number to Words when you need readable amounts on invoices, checks, statements, reports, or localized user interfaces where numeric values should be spelled out consistently.

▣ ENDPOINT 01 / 02
GET
Converts a single number to its word representation.
https://api.eu.apyhub.com/modernsoftware-pro/convert-number-to-words/single/number

QUICKSTART

GUIDE

Quickstart

Convert a number to words with the language and formatting you choose.

curl -X GET "https://api.eu.apyhub.com/modernsoftware-pro/convert-number-to-words/single/number?number=25&language=en" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with number, language, form, case, and words fields. words contains the spelled-out result as a string. form and case describe the used form and letter case - if you have not defined them in the request, you will see default values here.

{
  "number": "25",
  "language": "en",
  "form": "cardinal",
  "case": "lower",
  "words": "twenty-five"
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Digits only, e.g. 1234 or 99.50. Decimals allowed only for currency.
cardinal (default) or currency:{CODE}, e.g. currency:USD

About this endpoint

What it does

Converts the input number into its word representation for the specified language. The response returns the original inputs along with the generated words string.

Query Parameter(s)

AttributeTypeMandatoryDescription
caseENUMNoAllowed values: lower (default), upper, sentence, title.
formStringNoPattern: cardinal (default) or currency:{CURRENCY}.
cardinal spells out the number itself.
currency:{CURRENCY} spells out a currency amount, including the currency name in the target language.
Supported currency codes: ALL, AED, AUD, BAM, BGN, BRL, BYR, CAD, CHF, CYP, CZK, DKK, DZD, EEK, EGP, EUR, GBP, HKD, HRK, HUF, IDR, ILS, ISK, JPY, LTL, LVL, LYD, MAD, MKD, MRO, MTL, MXN, MYR, NGN, NOK, PHP, PLN, RON, RUB, SAR, SEK, SIT, SKK, TMT, TND, TRL, TRY, UAH, USD, XAF, XOF, XPF, YUM, ZAR, UZS.
currency:{CURRENCY} is not available for cs, nl, et, it, mk, sv, fr_BE, which only support cardinal.
numberStringYesDigits with an optional single . followed by digits. No spaces, commas, sign, or exponent are allowed. Whole numbers from 0 up to 999,999,999,999,999 are accepted; a fractional part is only accepted when using the currency:{CURRENCY} form and is limited to up to 2 digits.
languageENUMYesAllowed values: al, fr_BE, pt_BR, bg, cs, dk, nl, en, et, ka, de, fr, hu, it, lt, lv, mk, pl, pt, ro, sr, sk, es, sv, tr, ua.

Response

Returns a JSON object with number, language, form, case, and words fields. The words field is the generated string representation of the input number, while the other fields echo the request values.

ParameterTypeMandatoryDescription
caseENUMYesAllowed values: lower, upper, sentence, title.
formStringYesPattern: cardinal or currency:{CURRENCY}.
cardinal spells out the number itself.
currency:{CURRENCY} spells out a currency amount, including the currency name in the target language.
Supported currency codes: ALL, AED, AUD, BAM, BGN, BRL, BYR, CAD, CHF, CYP, CZK, DKK, DZD, EEK, EGP, EUR, GBP, HKD, HRK, HUF, IDR, ILS, ISK, JPY, LTL, LVL, LYD, MAD, MKD, MRO, MTL, MXN, MYR, NGN, NOK, PHP, PLN, RON, RUB, SAR, SEK, SIT, SKK, TMT, TND, TRL, TRY, UAH, USD, XAF, XOF, XPF, YUM, ZAR, UZS.
currency:{CURRENCY} is not available for cs, nl, et, it, mk, sv, fr_BE, which only support cardinal.
wordsStringYesThe number written out in words.
numberStringYesDigits with an optional single . followed by digits. No spaces, commas, sign, or exponent are allowed. Whole numbers from 0 up to 999,999,999,999,999 are accepted; a fractional part is only accepted when using the currency:{CURRENCY} form and is limited to up to 2 digits.
languageENUMYesAllowed values: al, fr_BE, pt_BR, bg, cs, dk, nl, en, et, ka, de, fr, hu, it, lt, lv, mk, pl, pt, ro, sr, sk, es, sv, tr, ua.
▣ ENDPOINT 02 / 02
POST
Converts a batch of up to 20 numbers to their word representations.
https://api.eu.apyhub.com/modernsoftware-pro/convert-number-to-words/batch/number

QUICKSTART

GUIDE

Quickstart

Convert one or more numbers to words by sending the required items array in the request body.

curl -X POST "https://api.eu.apyhub.com/modernsoftware-pro/convert-number-to-words/batch/number" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "number": "25",
        "language": "en"
      }
    ]
  }'

What you'll get back

Returns a JSON object with an items array. Each item includes the original number, language, plus a words string with the number spelled out in words. form and case describe the used form and letter case - if you have not defined them in for the given item, you will see default values here.

{
  "items": [
    {
      "number": "25",
      "language": "en",
      "form": "cardinal",
      "case": "lower",
      "words": "twenty-five"
    }
  ]
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
items*
The numbers to convert, in the same order they should appear in the response. At least 1 and at most 20 entries are accepted; submitting more than 20 returns an error.
items-1*
Digits only, e.g. 1234 or 99.50. Decimals allowed only for currency.

About this endpoint

What it does

Converts a batch of numbers into their word representations and returns the converted entries in the same order they were submitted. The request accepts 1 to 20 items, and each item can include the number, language, form, and case used to generate the output.

Request Body

ParameterTypeMandatoryDescription
itemsObject ArrayYesThe numbers to convert, in the same order they should appear in the response. At least 1 and at most 20 entries are accepted; submitting more than 20 returns an error.
items[].numberStringYesDigits only, with an optional single . followed by digits. No spaces, commas, sign, or exponent are allowed. Whole numbers from 0 up to 999,999,999,999,999 are accepted; a fractional part is only accepted when using the currency:{CURRENCY} form and is limited to up to 2 digits.
items[].languageENUMYesSupported values: al, fr_BE, pt_BR, bg, cs, dk, nl, en, et, ka, de, fr, hu, it, lt, lv, mk, pl, pt, ro, sr, sk, es, sv, tr, ua.
items[].formStringNoMust match cardinal (default) or currency:{CURRENCY} where {CURRENCY} is one of: ALL, AED, AUD, BAM, BGN, BRL, BYR, CAD, CHF, CYP, CZK, DKK, DZD, EEK, EGP, EUR, GBP, HKD, HRK, HUF, IDR, ILS, ISK, JPY, LTL, LVL, LYD, MAD, MKD, MRO, MTL, MXN, MYR, NGN, NOK, PHP, PLN, RON, RUB, SAR, SEK, SIT, SKK, TMT, TND, TRL, TRY, UAH, USD, XAF, XOF, XPF, YUM, ZAR, UZS. cardinal spells out the number itself; currency:{CURRENCY} spells it out as a currency amount, including the currency name in the target language. The currency:{CURRENCY} form is not available for cs, nl, et, it, mk, sv, and fr_BE, which only support cardinal.
items[].caseENUMNoAllowed values: lower (default), upper, sentence, title.

Response

Returns a JSON object with an items array field. Each array element is an object containing number, language, form, case, and words, mirroring the submitted item with the converted word representation in words.

ParameterTypeMandatoryDescription
itemsObject ArrayYesArray of converted items, returned in the same order as submitted.
items[].numberStringYesThe submitted number.
items[].languageENUMYesThe submitted language code. Allowed values: al, fr_BE, pt_BR, bg, cs, dk, nl, en, et, ka, de, fr, hu, it, lt, lv, mk, pl, pt, ro, sr, sk, es, sv, tr, ua.
items[].formStringYesThe form used for conversion. Must match cardinal or currency:{CURRENCY} with the same supported currency codes as the request.
items[].caseENUMYesThe case applied to the output words. Allowed values: lower, upper, sentence, title.
items[].wordsStringYesThe converted number in words.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.