Text
Ordinalize integer API
Appends the correct English ordinal suffix to an integer, correctly handling the 11-13 'th' exceptions (21st, 112th, 2nd). Answers 'what is the ordinal form of this number?', 'is it -st, -nd, -rd, or -th?'.
Price$0.01per request
MethodPOST
Route/v1/text/ordinalize
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
textordinalizeordinalsuffixnumbersinflectionformattingenglish
API URL
Integration docshttps://x402.hexl.dev/v1/text/ordinalizeExample request
{
"number": 21
}Example response
{
"ordinal": "21st",
"suffix": "st",
"number": 21
}Input schema
{
"type": "object",
"required": [
"number"
],
"properties": {
"number": {
"type": "integer",
"examples": [
21
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}