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 URL
Integration docshttps://x402.hexl.dev/v1/text/words-to-numberExample 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
}