apyhub
Back
▣ DEVELOPER TOOLS · STANDARD DATA

Convert Words to Number API

What it does

Convert Words to Number API, converts spelled-out number phrases into digits, accepts phrase and language, and returns the parsed number for single or batch requests.

Use it when you need to normalize human-entered numbers from forms, chat logs, invoices, or imported records. It supports German (de), English (en), Spanish (es), French (fr), Italian (it), and Polish (pl), so you can handle multilingual text without building language-specific parsing logic yourself. More languages to be added.

The service only accepts non-negative whole numbers, up to 999,999,999,999. That makes it a good fit for cardinal values like quantities, totals, counts, and other integer fields where text input needs to become structured data.

For bulk conversion, send up to 20 items in the POST endpoint and get back a list of parsed results with the same phrase and language values alongside each number. Bulk conversion costs less than sending the same phrases one-by-one.

▣ ENDPOINT 01 / 02
GET
Converts a spelled-out number phrase in the specified language into numeric digits.
https://api.eu.apyhub.com/modernsoftware-pro/convert-words-to-number-api/single/word-to-number

QUICKSTART

GUIDE

Quickstart

Call this endpoint with your ApyHub API key:

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

What you'll get back

Returns a JSON object with the phrase and language passed in the query parameters, and the converted number value.

{
  "language": "en",
  "phrase": "fourteen",
  "number": 14
}
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.
The language the phrase is written in. We currently support 6 languages: German (de), English (en), Spanish (es), French (fr), Italian (it) and Polish (pl).

About this endpoint

Converts a single spelled-out numeric phrase in the selected language, and returns the parsed number as an integer.

Query Parameter(s)

AttributeTypeMandatoryDescription
phraseStringYesThe spelled-out number phrase to convert.
languageENUMYesLanguage of the phrase. Allowed values: de, en, es, fr, it, pl.

Response

Returns a JSON object with the original phrase and language passed in the query parameters, and the converted number value.

ParameterTypeMandatoryDescription
phraseStringYesThe original spelled-out number phrase.
languageENUMYesLanguage of the phrase. Allowed values: de, en, es, fr, it, pl.
numberIntegerYesThe phrase's numeric value. Only non-negative, whole (cardinal) numbers up to 999,999,999,999 are supported.
▣ ENDPOINT 02 / 02
POST
Converts a batch of spelled-out number phrases in the specified languages into numeric digits.
https://api.eu.apyhub.com/modernsoftware-pro/convert-words-to-number-api/bulk/word-to-number

QUICKSTART

GUIDE

Quickstart

Convert one or more number phrases into their numeric values.

curl -X POST "https://api.eu.apyhub.com/modernsoftware-pro/convert-words-to-number-api/bulk/word-to-number" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "phrase": "one hundred twenty three",
        "language": "en"
      },
      {
        "phrase": "trois cent vingt et un",
        "language": "fr"
      }
    ]
  }'

What you'll get back

Returns a JSON object with an items array. Each item contains phrase and language, plus number with the parsed non-negative integer value.

{
  "items": [
    {
      "phrase": "one hundred twenty three",
      "language": "en",
      "number": 123
    },
    {
      "phrase": "trois cent vingt et un",
      "language": "fr",
      "number": 321
    }
  ]
}
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*
items-1*
The language the phrase is written in. We currently support 6 languages: German (de), English (en), Spanish (es), French (fr), Italian (it) and Polish (pl).

About this endpoint

What it does

Converts a batch of spelled-out number phrases into numeric digits. You send an array of phrases with their language codes, and the response returns the same phrases with a parsed number as an integer for each item. If any item in the batch is invalid, the whole request fails and no results are returned.

Request Body

ParameterTypeMandatoryDescription
itemsObject ArrayYesArray of input phrases to convert. Minimum 1 item, maximum 20 items.
items[].phraseStringYesThe spelled-out number phrase to convert. Minimum length is 1.
items[].languageENUMYesLanguage of the phrase. Allowed values: de, en, es, fr, it, pl.

Response

Returns a JSON object with an items array field. Each array item is an object containing phrase as a string, language as a string enum, and number as an integer. The number field is the converted numeric value, limited to whole numbers from 0 to 999,999,999,999.

ParameterTypeMandatoryDescription
itemsObject ArrayYesArray of converted results.
items[].phraseStringYesThe original spelled-out number phrase.
items[].languageENUMYesLanguage of the phrase. Allowed values: de, en, es, fr, it, pl.
items[].numberIntegerYesThe phrase's numeric value. Only non-negative, whole (cardinal) numbers up to 999,999,999,999 are supported.
▣ 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.