Catalog/text-words-to-number

Text

Words to number API

Parses English cardinal number words (with 'and', hyphens, and negatives) into an integer value. Answers 'what integer is spelled out here?', 'how do I parse "two thousand five hundred and twelve" into 2512?'.

Price$0.02per request
MethodPOST
Route/v1/text/words-to-number
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
textwords-to-numberparsenumbersspell-outcardinalnlpconversion
API URLhttps://x402.hexl.dev/v1/text/words-to-number
Integration docs
Example request
{
  "words": "two thousand five hundred and twelve"
}
Example response
{
  "value": 2512,
  "negative": false,
  "tokensParsed": 5
}
Input schema
{
  "type": "object",
  "required": [
    "words"
  ],
  "properties": {
    "words": {
      "type": "string",
      "examples": [
        "two thousand five hundred and twelve"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}